I'm trying to anchor a tooltip to a widget, which is working, except that I don't seem to be able to control the anchor position. Whenever I call setAnchor on the ToolTipConfig, it just seems to default to 'right'.
Is this a bug, or am I doing something wrong? See attached screenshot to illustrate the problem.
Example code:
Code:
/**
* This is the entry point method.
*/
public void onModuleLoad() {
LayoutContainer container = new LayoutContainer();
container.setLayout(new CenterLayout());
Button button = new Button("test");
ToolTipConfig config = new ToolTipConfig();
config.setTitle("Title");
config.setText("Tip text");
config.setAnchor("top");
config.setMouseOffset(new int[] { 0, 0 });
button.setToolTip(config);
ContentPanel panel = new ContentPanel();
panel.setWidth(200);
panel.add(button);
container.add(panel);
RootPanel.get().add(container);
}