Button Image - XML Tutorial
Version 1.6

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

Button's Property: setImage, setImageRollover and add Image Containers.


Button is part of the GUI elements in Bamboo Suite for building interactive Internet applications. In the applet above we can see how setImage property is used, including ImageRollover. One of the Button's properties is ability to add many images in the button creating image container. setImageContainer="int,int" sets the size of how big the image container is. Then inside of the image container you can add multiple images with the use of addImage property. that I can multiple images you can add another addImage. Refer to Reference for complete list of Buttons Properties.


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

button_border.XML Source:

<Widget setSize="390,150" setBackground="cdc9ee">
<Widget setShape="10,10,170,25" setLabel="Image" setFontstyle="bold" setOpaque="false"/>
<Button setShape="10,40,170,25" setLabel="windows" setImage="images/barrow.gif,15,20" setBackgroundHighlight="ffffff" setForegroundHighlight="000066" setForeground="666699" setImageRollover="images/barrowrollover.gif"/>
<Button setShape="10,70,170,25" setLabel="mac" setImage="images/barrow.gif,15,20" setBackgroundHighlight="ffffff" setForegroundHighlight="000066" setForeground="666699" setImageRollover="images/barrowrollover.gif"/>
<Button setShape="10,100,170,25" setLabel="linux" setImage="images/barrow.gif,15,20" setBackgroundHighlight="ffffff" setForegroundHighlight="000066" setForeground="666699" setImageRollover="images/barrowrollover.gif"/>
<Widget setShape="185,10,170,25" setLabel="Imagecontainer" setFontstyle="bold" setOpaque="false"/>
<Button setShape="185,40,170,25" setLabel="windows images" addImage="images/windows.gif,15,15" addImage="images/windows.gif,15,15" setImageContainer="40,20"/>
<Button setShape="185,70,170,25" setLabel="mac images" addImage="images/mac.gif,15,15" addImage="images/mac.gif,15,15" setImageContainer="40,20"/>
<Button setShape="185,100,170,25" setLabel="linux images" addImage="images/linux.gif,15,15" addImage="images/linux.gif,15,15" setImageContainer="40,20"/>
</Widget>

[Home][Tutorial] [Demo]

Button
Shape Borders Fonts & Colors Highlights Images Actions Other