Friday, 12 August 2011

SmartGwt: Absolute position your widget with setSnapTo

 

If you like to absolute position your widget in smartgwt use setSnapTo

Usage:

widget.setSnapTo(“TL”);
widget.setSnapOffsetLeft(400);
widget.setSnapOffsetTop(200);


If you like to reset this behaviour, use setSnapTo(null) that will reset to its original state. This is particularly useful if you like to popoup one of your widgets and position them absolutely and reset back again

No comments:

Post a Comment