Documentation for Win32lib v0.60.5
Table of Contents
An advanced Group control.
This is similar to the standard Group control that comes with Windows
but allows greater control over its appearance.
In order to use this control, you must add
include groupadv.ew after the Win32lib.ew include.
You create the control using the standard methods in Win32lib.
constant GroupX = create(GroupAdv, "Display Options", theWindow, 100, 34, 200, 200, 0)
The purpose of the control is to group together a set of related controls. You
do this by making the GroupAdv control the parent to those controls.
constant Rad1 = create(Radio, "300 x 200", GroupX, 10, 10, 100, 25, 0)
constant Rad2 = create(Radio, "600 x 400", GroupX, 10, 40, 100, 25, 0)
constant Rad3 = create(Radio, "800 x 600", GroupX, 10, 70, 100, 25, 0)
You can set the various appearance properties by calling setUserProperty. The
support properties are ...
BorderColor Sets the color of the group box outline. Must be a 24-bit color value.
Initially it is set to getSysColor(COLOR_BTNSHADOW).
BorderWidth Sets the style and width of the border. A positive value is a simple
width value for the border of the specified color. A value of zero means that no
border is drawn. A negative value means that the border color is ignored and the
border is given a 3-D look instead, using the absolute value of the width value.
Initially it is set to 1.
CaptionFGColor Sets the color of the caption text. Initially it is set to getSysColor(COLOR_BTNTEXT).
CaptionBGColor Sets the color of the caption text background. A negative value means that
the caption background is transparent. Initially it is set to getSysColor(COLOR_BTNFACE).
CaptionBorderColor Sets the color of the border around the caption text. A negative value
means that no border is drawn around the caption text. Initially it is set to getSysColor(COLOR_BTNSHADOW).
CaptionPlacement Determines whether the caption text is placed on the top or bottom of the
group box. A value of 0 places it on the top, and any other value places it on the bottom.
Initially is is set to 0 (top placement).
CaptionAlignment Determines left-center-right alignment of the caption text. A value of 0
means left alignment, a value of 1 is center alignment, and a value of 2 is right alignment.
Initially it is set to 0 (left alignment).
CaptionOffset Sets that number of pixels the text is offset from the alignment edge. If the
alignment is left or center, this is the offset from the left, otherwise this is the offset
from the right. Initially it is set to 10.
CaptionCornerSize Sets the amount of rounding for the caption text border. A value of 0 means
that it doesn't have rounded corners. Initially it is set to 5.
CornerSize Sets the amount of rounding for the group box border. A value of 0 means
that it doesn't have rounded corners. Initially it is set to 10.
CaptionIcon If not zero, this is the handle to a bitmap that is displayed to the left of
the caption text. Initially it is set to 0.
Example:
setUserProperty(lId, "BorderColor" , Red)
setUserProperty(lId, "BorderWidth" , 2)
setUserProperty(lId, "CaptionFGColor" ,Gray)
setUserProperty(lId, "CaptionBGColor" ,BrightWhite)
setUserProperty(lId, "CaptionBorderColor" , Blue)
setUserProperty(lId, "CaptionPlacement" ,1)
setUserProperty(lId, "CaptionAlignment" ,2)
setUserProperty(lId, "CaptionOffset" ,0)
setUserProperty(lId, "CaptionCornerSize" , 0)
setUserProperty(lId, "CornerSize" ,0)
setUserProperty(lId, "CaptionIcon", loadBitmapFromFile("image1.bmp"))