Bambookit Home    Bambookit GUI Tutorial

Back   

II. GUI Basics

Chapter 9. Widgets Styles




Images


Method signature

addImage="images/useraccount1.gif,30,25"/>= "[] left, [int] top, [int] right, [int] bottom"
default settings, setInsets="2,2,2,2"


Examples

In this example we will be using a button widget

.. setInsets="4,0,0,0" setAlign="left" ..
it reads as;
Indent the left side by 4 pixels
The top, right and bottom are not indented




but what about right aligned text?
.. setInsets="0,0,4,0" setAlign="right" ..
The left, top are not indented
Indent the right by 4 pixels
The bottom is not indented.




and top aligned text?
.. setInsets="0,4,0,0" setAlign="top" ..
The left is not indented
Indent the top by 4 pixels
The right, bottom are not indented.





Notes

If images seem to be off-center maybe you forgot to reset
the insets to setInsets="0,0,0,0".

The default settings was used to prevent text getting flushed
to the border edges, which would fuse the border to the text.

Back