Adding tooltips for Button (Ext GWT) : Tooltip « GWT « Java






Adding tooltips for Button (Ext GWT)

Adding tooltips for Button (Ext GWT)
 
/*
 * Ext GWT - Ext for GWT
 * Copyright(c) 2007-2009, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */
package com.google.gwt.sample.hello.client;

import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.layout.FlowData;
import com.extjs.gxt.ui.client.widget.tips.ToolTipConfig;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.RootPanel;

public class Hello implements EntryPoint {
  public void onModuleLoad() {
    RootPanel.get().add(new ToolTipsExample());
  }
}
class ToolTipsExample extends LayoutContainer {

  @Override
  protected void onRender(Element parent, int pos) {
    super.onRender(parent, pos);
    Button btn = new Button("Print");
    btn.setToolTip(new ToolTipConfig("Information", "Prints the current document"));

    add(btn, new FlowData(10));
  }

}

   
  








Ext-GWT.zip( 4,297 k)

Related examples in the same category

1.Tooltip component for GWT
2.Add buttons to ToolStrip(ToolBar) (Smart GWT)Add buttons to ToolStrip(ToolBar) (Smart GWT)
3.Hovers Tooltips Sample (Smart GWT)Hovers Tooltips Sample (Smart GWT)
4.Adding tooltip for Button (Smart GWT)Adding tooltip for Button (Smart GWT)
5.Adding tooltip for Img (Smart GWT)Adding tooltip for Img (Smart GWT)
6.HTML based tooltip (Smart GWT)HTML based tooltip (Smart GWT)
7.Adding tooltip based help information next to a field (Smart GWT)Adding tooltip based help information next to a field (Smart GWT)
8.Hover anywhere over the field to see what the current value means. (Smart GWT)Hover anywhere over the field to see what the current value means. (Smart GWT)