Announcement

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

    Drag-repositioning Window without header

    First, I have created a window in a similar way as in the showcase, which looks ok and is draggable on the header:
    http://www.smartclient.com/smartgwt/showcase/#layout_windows_autosize

    As I need text to be selected, I also set setCanSelectText(true).

    This also works fine.
    However, when you set setShowHeader(false) on the window, SmartGWT changes the behaviour of dragging on the window's content.
    Instead of selecting text, now it initiates the repositioning of the Window.

    Since I have created my own header for my window, is there any way I can avoid this behaviour and make sure that the window is only moved when dragging the custom header?

    Thanks!

    #2
    Since you have your header to server as the draggable area and you don't want the Window as a whole to drag, don't set the Window as draggable, set your custom header as draggable and use the Canvas.dragTarget property to delegate the drag to the Window.

    Comment

    Working...
    X