XML Tutorial Resize
DragResize control is used to resize a Panel/Window/Widget. Dragresize allows to define
the size and location of the area in the Widget that will be resizable. This area can be set invisible or defined as image or a shape
of any color, or border type. It is fully customizable to accomplish the desired look and feel.
Let's see how the right side of the Panel in the applet above gets resized. As you approach your mouse pointer to the lightGray line
on the right of the Panel, it turns into the arrow, which is indication that you can start resizing. Resize is possible through the
use of DragResize Bambookit control.
<DragResize setShape="190,10,4,130" setBorder="squareraisedthin" setBackground="lightGray" setResize="right"
setShape method sets coordinates (x=190,y=10) of the DragResize control and the shape (width=4,height=130).
setBorder method sets the border type (squareraisedthin) of the DragResize.
setBackground method sets background color (lightGray) of the DragResize.
setResize method defines that we are resizing the right side.
setAnchor method sets the left side of the panel as being 'false' to stop this side from any movement. The left/right/bottom sides
are set 'true' to allow them to resize.
The main Widget in which DragResize contains needs its minimum size to be define. The minimums size of the Widget for its
minimized state is defined through the setMinimumSize method.
Refer to Reference for complete list of Properties.
- <applet archive="bamboo_1_5.jar" code="Loader.class" width=500 height=170>
- <param name="loadgui" value="tutorials_resize.xml">