Making some progress but still having the same problem. If i change my
onClick event to onMouseDown it works.

Why it works on the mousedown and not the onclick im not sure. It
seems to be something to do with the order that events are being
triggered. If i call the add function to add a tab to the tabpanel and
then call selectTab() to change the to the new tab in the onclick
handler the selectTab() doesn't change the value. Maybe it's getting
overridden by an event that is fired in the tabpanel?

If i put it into to a onMouseOut event it works because the tab has
been added and appears on the screen before i move my mouse and the
onmouseout event is triggered.

I would greatly appreciate some insight into why this might be
happening.

Thanks,
-Mark

On Jul 7, 9:08 am, Mark Wengranowski <m...@greatlittlebox.com> wrote:
> Hi everyone,
>
> I'm having a wierd problem with a TabLayoutPanel where the selectTab()
> function does not work when called from my custom header composite.
>
> So far this is what i've done.
>
> 1. Create a new UI binder composiete that has a tablayoutpanel
> 2. Create a custom header UI binder composite which consists of 3
> labels. the labels are used for a url, close tab button, and new tab
> button.
> 3. Add the custom header to the tablayoutpanel
> 4. Created onClick events for the new tab label and the close tab
> label.
>
> What's weird is that if i call  mylayoutpanel.selectTab(1) from inside
> my custom header with the onclick events it will not set the index or
> change the selected tab on the layoutpanel. I can call many other
> functions on mylayoutpanel such as setVisible(false) and they work
> just fine.
>
> If i Call selectTab() from the class that contains the tablayoutpanel
> it works just fine. I've followed it through the debugger and all of
> the references seem to be there. is there something im missing?

-- 
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