pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Square PushButton
Date Fri, 07 Aug 2009 01:47:24 GMT
I understand your use case. I think that a vertical box pane with fill  
set to true would meet your needs, if we can get PushButton to behave  
correctly with respect to preferred aspect ratio.  :-)  I'm looking  
into it right now.

On Aug 6, 2009, at 9:42 PM, Scott Lanham wrote:

> Thanks Greg,
> What I originally expected aspect ratio to do is to increase the  
> smallest of
> either height or width to keep the ratio constant. But my focus is  
> only on my
> own needs so it is hard to see the big picture. It turns out a  
> square button
> looks terrible when I did get it working and I ended up using an  
> aspect ratio
> of 1.2. To get that ratio to work I had to set preferred height but  
> I don't
> like setting explicit dimensions if it can be avoided though.
> What I am ultimately trying to do at the moment is create a vertical  
> "toolbar"
> that keeps all buttons the same size. The size of the buttons are  
> dictated by
> the button with the largest content and the aspect ratio is to keep  
> all the
> buttons at a nice shape. One of the apps I work on is touch screen  
> based so
> keeping the buttons large and a nice shape is important.
> On Fri, 7 Aug 2009 11:21:22 am Greg Brown wrote:
>> 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.

View raw message