MOGSY Posted January 22, 2020 Share Posted January 22, 2020 Hi How can we make the carot appears at the centre of the Edit box and have text justified to centre please. How can we use CSS with TUniEdit? Can we have example please. Thanks Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2020 Share Posted January 22, 2020 2 hours ago, MOGSY said: How can we make the carot appears at the centre of the Edit box and have text justified to centre please. Hi, Can you please explain in more detail? Link to comment Share on other sites More sharing options...
MOGSY Posted January 22, 2020 Author Share Posted January 22, 2020 Hi Can we have uniedit, the cursor be placed at the centre of the editbox and the text be justified to centre, so the text is always at the centre of the box. "text-align:centre" The second question is how to use CSS on a component like TUniEdit? Regards Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2020 Share Posted January 22, 2020 3 minutes ago, MOGSY said: Can we have uniedit, the cursor be placed at the centre of the editbox and the text be justified to centre, so the text is always at the centre of the box. "text-align:centre" UniEdit -> Alignment = taCenter ? Link to comment Share on other sites More sharing options...
MOGSY Posted January 22, 2020 Author Share Posted January 22, 2020 Hi The property Alignment := taCentre is not working in UniGui. I am using version 1.90.0.1514. Thanks Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2020 Share Posted January 22, 2020 Make a simple testcase if possible. I couldn't reproduce. Link to comment Share on other sites More sharing options...
MOGSY Posted January 23, 2020 Author Share Posted January 23, 2020 Hi Please see attached. Regards Test.7z Link to comment Share on other sites More sharing options...
Sherzod Posted January 23, 2020 Share Posted January 23, 2020 6 minutes ago, MOGSY said: Test.7z You meant TUnimEdit, but said TUniEdit. Link to comment Share on other sites More sharing options...
Sherzod Posted January 23, 2020 Share Posted January 23, 2020 1. CustomCSS: .customEdit .x-input-el{ text-align: center; } 2. procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimEdit1.Alignment := taCenter; UnimEdit1.JSInterface.JSConfig('userCls', ['customEdit']); end; Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now