Jump to content

TUniButton TextAlignment and Wrap


Jorge Sousa

Recommended Posts

Is it possible to set the text alignment to left, when TUniButton.IconPos = ipButtonEdge and and .IconAlign=iaLeft (default)

And is it possible to wrap the text of the button?

Since there is no apparently an event where we can change the rendered HTML, is it possible to inherit any virtual method to be able to make these changes to simple custom controls?

This is how it is currently:

https://ibb.co/RjjTRdK

This is how I wanted

https://ibb.co/NNHz53J

Thanks in advance

js

Link to comment
Share on other sites

1 hour ago, Jorge Sousa said:

Is it possible to set the text alignment to left, when TUniButton.IconPos = ipButtonEdge and and .IconAlign=iaLeft (default)

You can try this approach:

1. UniServerModule -> CustomCSS:

.wordwrapbtn .x-btn-button {
    white-space: normal;
}

.wordwrapbtn .x-btn-inner {
    text-align: left !important;
}

2. UniButton -> ClientEvents -> UniEvents -> function beforeInit:

function beforeInit(sender, config)
{
    config.cls='wordwrapbtn';
}

 

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...