Hello Sumit, Now I am writing code of TabPanel with some bottons.
package com.mycompany.project.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.ClickListener; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TabPanel; import com.google.gwt.user.client.ui.Widget; /** * Entry point classes define <code>onModuleLoad()</code>. */ public class ImageViewer implements EntryPoint { public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); TabPanel tabPanel = new TabPanel(); Button buttonFirst = new Button("first"); Button buttonSecond = new Button("Second"); Button buttonThird = new Button("Third"); Button buttonFour = new Button("Four"); Button buttonFive = new Button("Five"); tabPanel.add(buttonFirst, "First"); tabPanel.add(buttonSecond, "Second"); tabPanel.add(buttonThird, "Third"); tabPanel.add(buttonFour, "Four"); tabPanel.add(buttonFive, "Five"); rootPanel.add(tabPanel); } } Now i need mouse over functionality on tabs first,second.................. So what should i do . Here is no tabPanel , If you have any solution please tell me, I also want to make resizable dialog. Is it possible ? Thanks for your suggestion Nitin Jain On Sep 5, 1:12 am, "Sumit Chandel" <[EMAIL PROTECTED]> wrote: > Hi Nitin, > With the current code you have implemented, you will get MOUSEOVER and > MOUSEOUT events over the entire TabPanel widget, which is composed of > separate components itself. This would explain why you are receiving > multiple "over" and "out" messages when you mouse over and out of the > TabPanel. > > However, I don't think this is what you really want to do since I can't > think of any interface where moving over the entire tab panel leads to an > interesting event. The TabPanel itself is composed of a TabBar which holds a > number of tabs and their associated tab content in the form of various > subpanels or other widgets. > > From the fact that you asked about the difference between a TabPanel and a > TabBar, it seems like what you actually want to do is have a TabListener > added to the TabPanel and do interesting things when different tabs are > selected. > > If that's the case, the link below should help get you on your way. If not, > please reply back and let us know what you're really trying to do. The way > you're trying to do it in the code snippet above isn't correct because of > the composition of the TabPanel itself. > > TabPanel.addTabListener() > javadoc:http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...) > > Hope that helps, > -Sumit Chandel > > > > On Tue, Sep 2, 2008 at 8:50 AM, Nitin <[EMAIL PROTECTED]> wrote: > > > Hello GWT Expert, > > > I need Mouse Over and Mouse Out property of TabPanel . I have used > > this code . But It is not implementing mouse over property. > > > import com.google.gwt.user.client.DOM; > > import com.google.gwt.user.client.Element; > > import com.google.gwt.user.client.Event; > > import com.google.gwt.user.client.Window; > > > public class TabPanel extends com.google.gwt.user.client.ui.TabPanel > > { > > > public TabPanel() { > > > sinkEvents(Event.ONMOUSEOVER); > > sinkEvents(Event.ONMOUSEOUT); > > } > > > public void onBrowserEvent(Event event) { > > super.onBrowserEvent(event); > > Window.alert("over"); > > > switch (DOM.eventGetType(event)) { > > case Event.ONMOUSEOVER: { > > Window.alert("over"); > > > break; > > } > > case Event.ONMOUSEOUT: { > > Window.alert("out"); > > break; > > } > > default: { > > } > > } > > } > > > } > > > Please suggest solution . > > Could any one tell what is difference between TabPanel and TabBar . > > > Thanks > > > Nitin- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---