XML Tutorials DragResize in Window
Version 1.6

This is the archives. For the latest Bambookit GUI 2.0, XML GUI Demos & Tutorials visit: www.bambookit.com/_demo.html


Try to rollover your mouse in the title of the window provided in the applet example above. The mouse arrow will turn into the two double-headed arrows indicating that you can drag this control. Click on the title and try to drag the window.

DragResize is a control in Bambookit framework allowing to drag the window. Dragging usually is attached to the title of the window. Dragging allows to place a window in the desired location within dimensions set to the applet. Bamboo Suite window boundaries are set in a way to prevent a window from being dragged beyond the dimensions of the applet.

Bamboo environment allows you to create multiple windows. If there are more then one window is opened, clicking on the window title with a Drag will place this window to be on the top of the other windows.

The syntax for window 'dragging' is as following:

<DragResize setLabel="Bamboo Window" setBorder="none" setShape="3,3,350,20" setBackground="2211cc"
setForeground="white" setAlign="left" setFontSize="13" setFontStyle="bold" setInsets="4,4,2,2">

DragResize control used along with setResize method will allow to add resize to the bottomright, bottomleft, topright, and topleft corners of the window as well as it can be added to the right, left, top, bottom sides of the window.



Refer to
Reference for complete list of Properties.

HTML Source:
<html>
<body>
<applet archive="bamboo_1_5.jar" code="Loader.class" width=500 height=300>
<param name="loadgui" value="tutorials_panel_widget.xml">
</applet>
</body>
</html>

tutorials_panel_widget.XML Source:

<Widget setShape="0,0,500,300" setName="main">
<Widget setSize="350,200" setBackground="white" setBorder="roundraised" setName="simple">
<DragResize setLabel="Bamboo Window" setBorder="none" setShape="3,3,350,20" setBackground="2211cc"
setForeground="white" setAlign="left" setFontSize="13" setFontStyle="bold" setInsets="4,4,2,2"
setAnchor="true,false,true,false">
<Button setShape="324,1,20,18" setFocusTraversable="false" addActionTarget="main,invoke,removeWidget='simple'"
setBorder="none" addImage="images/close.gif,13,13" setImageRollover="images/closerollover.gif"
setImageDown="images/closedown.gif" setOpaque="false" setAnchor="false,false,true,false"/>
</DragResize>
<DragResize setBorder="none" setShape="340,190,6,6" setBorder="squareraisedthin" setBackground="lightGray"
setResize="bottomright" setAnchor="false,false,true,true"/>
</Widget>
</Widget>

[Home][Tutorial] [Demo]

Containers
Windows Panels Tabs Resize Layout Manager Splitter View Dragresize Scrollbars