Jump to content

UniBitButton text align


JDDEV

Recommended Posts

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 by JDDEV
i can't answer direct on my topic. I don't see answer button !
Link to comment
Share on other sites

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;

 

Link to comment
Share on other sites

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;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...