Jump to content


Photo

Autosize TUniButton


  • Please log in to reply
3 replies to this topic

#1 hph

hph

    Newbie

  • uniGUI Subscriber
  • Pip
  • 6 posts

Posted 28 October 2017 - 11:36 AM

Hi

How can I autosizing TUniButton.width with text from caption (like autosize property from TUniLabel)?  


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3432 posts

Posted 28 October 2017 - 12:02 PM

Hi,

 

One of the possible solutions:

 

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

function beforeInit(sender, config)
{
    config.width="auto"
}

Best regards,


  • 0

#3 hph

hph

    Newbie

  • uniGUI Subscriber
  • Pip
  • 6 posts

Posted 28 October 2017 - 12:35 PM

Hi DD

 

...your support is so quick and helpful - thank you very much! 


  • 0

#4 cgarrotti

cgarrotti

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 13 November 2017 - 10:21 AM

Hi,

 

One of the possible solutions:

 

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

function beforeInit(sender, config)
{
    config.width="auto"
}

Best regards,

In Delphi, how  do I get the beforeinit?


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users