JDDEV Posted March 27, 2019 Share Posted March 27, 2019 (edited) Hi, I would like to cutomize UniBitButton to align icon and text on the left (not centered). How can i do that ? Thanks version complète 1.70.0.1491 PS : i can't answer direct on my topic. I don't see answer button ! Edited March 27, 2019 by JDDEV i can't answer direct on my topic. I don't see answer button ! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 27, 2019 Share Posted March 27, 2019 Hi, Sorry, can you please specify which edition and build of UniGUI are you using?! Quote Link to comment Share on other sites More sharing options...
JDDEV Posted March 28, 2019 Author Share Posted March 28, 2019 Licenced version 1.70.0.1491 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 28, 2019 Share Posted March 28, 2019 18 minutes ago, JDDEV said: Licenced version 1.70.0.1491 OK, Thank you Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 28, 2019 Share Posted March 28, 2019 On 3/27/2019 at 3:46 PM, JDDEV said: I would like to cutomize UniBitButton to align icon and text on the left (not centered). Can you try to use this config?: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniBitBtn1.JSInterface.JSConfig('textAlign', ['left']); end; Quote Link to comment Share on other sites More sharing options...
JDDEV Posted March 28, 2019 Author Share Posted March 28, 2019 Thanks it works fine Is it possible to increase margin between icon and text ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 28, 2019 Share Posted March 28, 2019 3 hours ago, JDDEV said: Is it possible to increase margin between icon and text ? One possible solution: with UniBitBtn1.JSInterface do begin JSConfig('textAlign', ['left']); JSAddListener('afterrender', 'function(me){me.btnEl.setStyle("margin-left", "5px")}'); end; Quote Link to comment Share on other sites More sharing options...
JDDEV Posted April 1, 2019 Author Share Posted April 1, 2019 Thank you, but i always tried that, and that solution increase margin between the left border and icon. I would like to increase margin between the icon and text. Best regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 2, 2019 Share Posted April 2, 2019 23 hours ago, JDDEV said: Thank you, but i always tried that, and that solution increase margin between the left border and icon. I would like to increase margin between the icon and text. Ok I will check Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.