IMAGE_GROUP_BOX

Description

Passive element (it does not respond to mouse or keyboard) that displays a image composed of 9 parts:

top_left

top

top_right

left

center

right

bottom_left

bottom

bottom_right

This enables this special image to be resized without stretching. That's the reason why it's named 'group box': it can be a cell that groups several widgets and offer a frame around those widgets, without having to bother about the size of these widgets.

Top, left, center, right and bottom images are tiled according to the size of the image set with the 'width' and 'height' attributes or computed from the children cells.

For more information about image files, see the about images section.

Common Attributes

See common widgets attributes.

Specific Attributes
Name Value Type Default Value Description Comment V.

image

image file path

empty

'virtual' path to the image to display.

This path is not used to load any image, but is used to generate automatically other image attributes in order to avoid to write 9 similar path. See examples below.

1.0

image_mask

image file path

'image' value with '_mask' postfix

'virtual' path to the alpha mask for the image.

This value is optional since by default it uses the same path as the 'image' attribute, to which it concatenates '_mask'.

Anyway this path is not used to load any image, but is used to generate automatically other image attributes in order to avoid to write 9 similar path. See examples below.

1.0

image_top_left

valid image file path

'image' value with 'top_left' postfix

Path to the image to display on the top left corner.

This value is optional since by default it is generated from 'image' attribute.

1.0

image_top_left_mask

valid image file path

'image_top_left' value with '_mask' postfix

Path to the alpha mask for the top left image.

This value is optional since by default it is generated from 'image_top_left'.

1.0

image_top

valid image file path

'image' value with '_top' postfix

Path to the image to display on the top.

This value is optional since by default it is generated from 'image' attribute.

1.0

image_top_mask

valid image file path

'image_top' value with '_mask' postfix

Path to the alpha mask for the top image.

This value is optional since by default it is generated from 'image_top'.

1.0

image_top_right

valid image file path

'image' value with 'top_right' postfix

Path to the image to display on the top right corner.

This value is optional since by default it is generated from 'image' attribute.

1.0

image_top_right_mask

valid image file path

'image_top_right' value with '_mask' postfix

Path to the alpha mask for the top right image.

This value is optional since by default it is generated from 'image_top_right'.

1.0

image_left

valid image file path

Image value with '_left' postfix

Path to the image to display on the left.

This value is optional since by default it is generated from 'image' attribute.

1.0

image_left_mask

valid image file path

image_left value with '_mask' postfix

Path to the alpha mask for the left image.

This value is optional since by default it is generated from image_left.

1.0

image_center

valid image file path

Image value with '_center' postfix

Path to the image to display in the center.

This value is optional since by default it is generated from 'image' attribute.

1.0

image_center_mask

valid image file path

image_center value with '_mask' postfix

Path to the alpha mask for the center image.

This value is optional since by default it is generated from image_center.

1.0

image_right

valid image file path

'image' value with 'right' postfix

Path to the image to display on the right.

This value is optional since by default it is generated from 'image' attribute.

1.0

image_right_mask

valid image file path

'image_right' value with '_mask' postfix

Path to the alpha mask for the right.

This value is optional since by default it is generated from 'image_right'.

1.0

image_bottom_left

valid image file path

'image' value with 'bottom_left' postfix

Path to the image to display on the bottom left corner.

This value is optional since by default it is generated from 'image' attribute.

1.0

image_bottom_left_mask

valid image file path

'image_bottom_left' value with '_mask' postfix

Path to the alpha mask for the bottom left image.

This value is optional since by default it is generated from 'image_bottom_left'.

1.0

image_bottom

valid image file path

'image' value with '_bottom' postfix

Path to the image to display on the bottom.

This value is optional since by default it is generated from 'image' attribute.

1.0

image_bottom_mask

valid image file path

'image_bottom' value with '_mask' postfix

Path to the alpha mask for the bottom image.

This value is optional since by default it is generated from 'image_bottom'.

1.0

image_bottom_right

valid image file path

'image' value with 'bottom_left' postfix

Path to the image to display on the bottom left corner.

This value is optional since by default it is generated from 'image' attribute.

1.0

image_bottom_right_mask

valid image file path

'image_bottom_right' value with '_mask' postfix

Path to the alpha mask for the bottom left image.

This value is optional since by default it is generated from 'image_bottom_right'.

1.0

Examples

You may want to have a look at the examples for the IMAGE widget, which is simpler than the IMAGE_GROUP_BOX.

<?xml version="1.0" encoding="utf-8" ?>
<SKIN language_version="1.0" background_image="bg.bmp" repeat="”true”">
   <IMAGE_GROUP_BOX image="box.bmp" width="130" height="40"></IMAGE_GROUP_BOX>
</SKIN>

The folder contains the following files (there is no 'center' image in this example):

Notice the image pairs: (file.bmp / file_mask.bmp). The mask bitmap is the bitmap that contains the alpha channel for transparency. For more information please read the about images section.


IMAGE_GROUP_BOX images (transparency omitted)


<?xml version="1.0" encoding="utf-8" ?>
<SKIN language_version="1.0" background_image="bg.bmp" repeat="true" h_margin="10" v_margin="10">
   <IMAGE_GROUP_BOX image="box.bmp" height="80" width="300"></IMAGE_GROUP_BOX>
</SKIN>
<?xml version="1.0" encoding="utf-8" ?>
<SKIN language_version="1.0" background_image="bg.bmp" repeat="true" h_margin="10" v_margin="10">
   <IMAGE_GROUP_BOX image="box.bmp" margin="8" spacing="2" layout_type="row">
      <IMAGE image="img.bmp" />
      <IMAGE image="img.bmp" />
      <IMAGE image="img.bmp" />
      <IMAGE image="img.bmp" />
   </IMAGE_GROUP_BOX>
</SKIN>

Note that some of the files for the group box (prefixed with 'group') do not have a corresponding mask file. This is because these images are totally opaque (the top, center and left, which do not have any shadow), so they do not need a transparency mask.


IMAGE_GROUP_BOX images

<?xml version="1.0" encoding="utf-8" ?>
<SKIN language_version="1.0" background_image="bg.bmp" repeat="true" h_margin="10" v_margin="10">
   <IMAGE_GROUP_BOX image="group.bmp" h_margin="12" v_margin="4" spacing="0" layout_type="row">
      <IMAGE image="img.bmp" />
      <IMAGE image="img.bmp" />
      <CELL width="10" />
   </IMAGE_GROUP_BOX>
</SKIN>
<?xml version="1.0" encoding="utf-8" ?>
<SKIN language_version="1.0" background_image="bg.bmp" repeat="true" h_margin="10" v_margin="10">
   <IMAGE_GROUP_BOX image="group.bmp" h_margin="12" v_margin="4" spacing="0" layout_type="column">
      <ROW>
         <IMAGE image="img.bmp" />
         <IMAGE image="img.bmp" />
         <IMAGE image="img.bmp" />
         <IMAGE image="img.bmp" />
         <CELL width="10" />
      </ROW>
      <ROW>
         <IMAGE image="img.bmp" />
         <IMAGE image="img.bmp" />
         <IMAGE image="img.bmp" />
         <IMAGE image="img.bmp" />
         <CELL width="10" />
      </ROW>
   </IMAGE_GROUP_BOX>
</SKIN>