1. #1
    Ext GWT Premium Member
    Join Date
    Jun 2009
    Location
    Bath, UK
    Posts
    28
    Vote Rating
    0
    dno is on a distinguished road

      0  

    Default Tooltip Anchor location

    Tooltip Anchor location


    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);
    
    	}
    Attached Images

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    At the moment this defaults to right, but it bubbles around if there is not enough space on the right side. We are looking into adding better support for it in a future release.

  3. #3
    Ext GWT Premium Member
    Join Date
    Jun 2009
    Location
    Bath, UK
    Posts
    28
    Vote Rating
    0
    dno is on a distinguished road

      0  

    Default


    Thanks for this. Do you have any indication when you'll be adding support to control the anchor position?

Thread Participants: 1