Preferred aspect ratio currently affects the height if it is less than 1, and the width if it is greater than or equal to 1. However, I can see why you might expect that setting it to a value of 1 would produce a square button. I'll look into that.

In the meantime, your best bet is to either a) use square content (such as an icon whose width and height are equal) or b) manually set the preferred width and height to the same value.

G

On Aug 6, 2009, at 8:44 PM, Scott Lanham wrote:

Hi,

I would like to create a PushButton that stays square no matter what its button data contains. I have tried to set preferredAspectRatio to 1 but it only appears to affect the button width. Is there any way I can keep a button
square besides setting the preferred height and width to be the same?

Thanks,

Scott.



Reply via email to