StackLayoutPanel change default behaveeior for header onclick

2012-07-27 Thread Mark Wengranowski
Hi Everyone, I want my stacklayoutpanel to only change stacks when i click on a button i've created and not when someone clicks on the header. i.e. i only want the stack to change once my validation has passed. The only way I can see to do this is to copy/paste the StackLayoutPanel.java code

Re: StackLayoutPanel change default behaveeior for header onclick

2012-07-27 Thread Rob Whiteside
Looks like you can register a BeforeSelectionHandler then just call cancel on the event. Looks like that's what it's intended for. --Rob On Friday, July 27, 2012 9:13:43 AM UTC-7, Mark Wengranowski wrote: Hi Everyone, I want my stacklayoutpanel to only change stacks when i click on a

Re: StackLayoutPanel change default behaveeior for header onclick

2012-07-27 Thread Mark Wengranowski
OK, if i do that i can call event.cancel() wich stops it from changing. My button that changes the stackpanel to the next stack uses the showWidget(int) method and when i call that it triggers the same event which is then cancelled. Is there a work around for this? I guess i could just put in

Re: StackLayoutPanel change default behaveeior for header onclick

2012-07-27 Thread Rob Whiteside
Yup, Probably gotta add a switch. Or do your validation in your beforeSelectionHandler rather than on the button click, then you'd remove the button all together. (Unless of course your button has other purposes) Good luck, --Rob On Friday, July 27, 2012 2:06:34 PM UTC-7, Mark Wengranowski

Re: StackLayoutPanel change default behaveeior for header onclick

2012-07-27 Thread Mark Wengranowski
Thanks for your help Rob! Cheers, -Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/VUrC8EZUh0gJ. To post to this group, send email to