Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Create a component with an attached panel

    Hi,

    I want to create a component , where on the click of the button in that component , I get a panel ( NOT a modal panel) attached to that component , such that the top,left of the panel coincides with the bottom,left of the component . The panel should appear on top of any other component present , and it should NOT disable other components like a modal window does .

    I have attached 2 images to illustrate my requirement .

    Please help .

    Thanks .
    Attached Files

    #2
    Doesn't have to be a VLayout per se, just an example of what you need to do.

    Code:
    public void onModuleLoad() {  
            
    		final VLayout component = new VLayout();
    		component.setShowEdges(true);
    		component.setBackgroundColor("#CCCCCC");
    		component.setVisible(false);
    		
           final IButton b = new IButton("click me");
           b.addClickHandler(new ClickHandler() {
    			@Override
    			public void onClick(ClickEvent event) {
    				component.setLeft(b.getLeft());
    				component.setTop(b.getBottom() + 2);
    				component.show();
    				component.bringToFront();
    			}
           });
           
           b.draw();
        }

    Comment


      #3
      @svjard

      I was trying a similar approach, but your technique is even better . Thanks a lot . :)

      Comment

      Working...
      X