pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Button Groups
Date Wed, 05 Aug 2009 02:17:57 GMT
Your suggestion makes sense, but might be a bit limiting. What layout  
rules would such a ButtonGroup container apply?

The current approach allows you to choose a layout that makes sense  
(possibly distributing your buttons across multiple containers) yet  
still get the grouping behavior your app needs.


On Aug 4, 2009, at 9:16 PM, Scott Lanham wrote:

> Hello,
>
> I must be becoming one of those really annoying users.
>
> This is just my opinion and should be ignored at will.
>
> With button groups I think having a ButtonGroup container instance  
> to hold the
> buttons is cleaner than having a static method that gets a  
> Button.Group. I
> could then use something like:
>
> <BoxPane orientation="vertical" styles="{padding:4}">
>   <ButtonGroup wtkx:id="numbersGroup">
>            <RadioButton wtkx:id="oneButton" buttonData="One"
> selected="true"/>
>            <RadioButton wtkx:id="twoButton" buttonData="Two" />
>            <RadioButton wtkx:id="threeButton" buttonData="Three" />
>   </ButtonGroup>
>            <PushButton wtkx:id="selectButton" buttonData="Select"/>
>        </BoxPane>
>
> Then in code:
>
> 	@WTKX private ButtonGroup numbersGroup;
>
> Which my little brain finds easier to work with rather than the  
> syntax in the
> tutorial:
>
> 	final Button.Group numbersGroup =  
> Button.getNamedGroups().get("numbers");
>
> Cheers,
>
> Scott.


Mime
View raw message