Reputation: 7243
Is it possible to disable dragging in a com.google.gwt.user.client.ui.DialogBox
instance? I like my container to have a title bar but it should be in a fixed position and the user shouldn't be capable of moving it.
If it is not possible, what's the GWT widget that fits for the job?
Upvotes: 2
Views: 1849
Reputation: 59627
Extend DialogBox, override beginDragging, and use preventDefault to interrupt the drag handling.
Like so:
public class MyDialogBox extends DialogBox
{
protected void beginDragging(MouseDownEvent e)
{
e.preventDefault();
}
}
See the documentation for DomEvent.preventDefault
Upvotes: 4