Hi all,

This is how I came up with being able to determine if the group
changed or not.

I extended the StackPandel class as the following.

private class sStackPanel extends StackPanel {
        public void onBrowserEvent(Event event) {
                super.onBrowserEvent(event);

                                // curindex is a private for the main
class.  It is set to the
                                // getSelectedIndex.  It starts at 0.
                if (curIndex != this.getSelectedIndex()) {
                        curIndex = this.getSelectedIndex();
                        Window.alert("Selected index is " + curIndex);
                        ButtonGroup group = myGroups.get(curIndex);
                        ButtonBase button = group.getDefaultButton();
                        if (button != null) {
                                group.ClearOthers(button);
                                if (button instanceof TheToggleButton) {
                                        ((TheToggleButton) 
button).setDown(true);
                                        ((TheToggleButton) 
button).CallHandler();
                                }
                        }
                }
        }
} ;

On May 10, 2:04 pm, "Donald.W.Long" <donald.w.l...@thelongsfamily.com>
wrote:
> Nope, I wish to know when a user selects another group.  The widgets
> in the group already have event handlers.
>
> Example
>
> GROUP1
> <.....>
> GROUP2
> <.....>
> GROUP3
> <......>
>
> When you first display the stackpandel you se the contents of group1
> and group2 and group3 a closed.  What I need is when a user opens
> group2 or group3 I wish to detect this.
>
> The items inside the group I am already handling.
>
> On May 9, 6:34 am, Salvador Diaz <diaz.salva...@gmail.com> wrote:
>
>
>
> > You can add ClickHandlers to the widgets you add to the stack panel.
> > Would that suit your needs ?
>
> > Cheers,
>
> > Salvador
>
> > On May 9, 12:55 am, "Donald.W.Long" <donald.w.l...@thelongsfamily.com>
> > wrote:
>
> > > I am trying to figure out how one get determine when the user selects
> > > another child.  I do not see a way to create an event to when the
> > > child is selected it fires, like a button.
>
> > > Is this supported?
>
> > > Thanks
>
> > >DonaldW. Long- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to