Announcement

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

    Possible to overlay buttons on top of a DrawPanel?

    I am trying to figure out if it is possible to overlay buttons on top of a DrawPane.

    I would like my interface to look like this:

    Click image for larger version

Name:	screenshot.png
Views:	16
Size:	64.1 KB
ID:	274431

    The green box is a button which stays there when the draw pane is scrolled.

    I tried adding a Button to the HTML element, but that caused it to render next to the draw pane, not over it.

    Is this possible?

    #2
    Yes, just add the Button as a child (addChild()). DrawPanes can have normal Canvas children alongside their DrawItems.

    If this feels unwieldy, another simple approach is just to add both the DrawPane and the Buttons to a Canvas parent, and just call moveToFront() on the Buttons to ensure they are above the DrawPane.

    Note that, as we previously mentioned, setHTMLElement() and similar techniques are for integrating with legacy applications and low-quality frameworks that offer no better approach. You generally would not use it for any other purpose; certainly not with anything that involves the layout and positioning of SmartGWT components relative to other SmartGWT components.

    Comment


      #3
      I used the addChild() and it is working as I want it to. Thanks for the help!

      Comment

      Working...
      X