Jump to content
Sign in to follow this  
chronicsilence

Vertically Centering Button Text

Recommended Posts

Hi everyone,

 

Pretty simple thing I'm trying to do, but somehow everything is failing at it. I have a button (RscButton), and I would like to vertically align the text in it. I have tried all of the following:

 

1) setting "style = 0x0C" (listed as "ST_VCENTER" on this page)

2) Using the following code (structured text works in buttons for everything except for this)

_button ctrlSetStructuredText parseText "<t valign='middle'>Button Text</t>";

3) Adding an "Attributes" sub-class to my button class, with "valign = 'middle';"

 

 

None of these work, which is insane. Is there not any way to vertically center the text in a button?

 

Thanks!

Share this post


Link to post
Share on other sites

 

Thanks, I figured I might have to do something like that to make it work. It's quite unfortunate that you have to manually add the proper spacing, which makes it difficult for buttons with dynamic text where the number of lines is not known.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×