I'm probably just stupid, but my google searches do not work well.
I have a bunch of buttons that I add to code that has dynamic text. I set a background image for each of these buttons, since by default greybutton does not work well for my application.
This works fine, and when the text size (or content) changes, the button automatically increases to accommodate the expanded text. What doesn't work is that I want the button to scale proportionally - that is, if the background image is round, I would like it to stay round rather than oval when the button gets bigger.
Using the image button, there is the “Customize the scope of the view" property, which does just that, but I can not overlay text on the image button. Is there something equivalent for a regular button?
or am i going to do it wrong?
I also tried setting the width of the button in the code, but I can’t determine the new height (button.getHeight () returns 0)
source
share