PDA

View Full Version : [FIXED] Tooltips problems in fields and other elements different than buttons



vjrj
13 May 2008, 4:27 PM
Tooltips seems that only work well in buttons but not in fields or other elements.

Here a test EntryPoint:


package org.myapp;

import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
import com.extjs.gxt.ui.client.widget.Button;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.FillLayout;
import com.extjs.gxt.ui.client.widget.tips.ToolTipConfig;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class Sandbox implements EntryPoint {
public void onModuleLoad() {
Viewport viewport = new Viewport();
viewport.setLayout(new FillLayout(5));

FormPanel form = new FormPanel();
form.setHeading("Form title");
form.setToolTip(new ToolTipConfig("form title tip", "form text tip"));
form.setButtonAlign(HorizontalAlignment.LEFT);
TextField field = new TextField();
field.setFieldLabel("Some label");
field.setToolTip(new ToolTipConfig("field title", "field text tip"));
form.add(field);
Button button = new Button("Ok");
button.setToolTip(new ToolTipConfig("button title", "button text tip"));
form.addButton(button);
viewport.add(form);

RootPanel.get().add(viewport);
}
}

darrellmeyer
14 May 2008, 2:49 PM
ToolTip was not sinking mouse events for the target component. So only components that were already sinking mouse events, such as button, would generate mouse events. Fix is in SVN.