| PowerBuilder 6 finally got a Groupbox control in the datawindow painter
but if you are using a version of PowerBuilder before 6 you will have to manually build
your own datawindow look alike. There are two main ways of creating group boxes, the
first one will give you a chunky group box and is created by placing two static text's one
with a 3D raised border and a second with a 3D lowered border. Make one static text 2
pixels smaller than the other and place it just inside the other. Set the background
colour of the fields to be transparent so your grouped items will show through.
The static text is one solution but for a group box that looks exactly like the real thing
you will need to place two rectangles on the datawindow both with a transparent
background. One with a dark Grey line and the other with a white line. Make both
rectangles the same size then offset one from the other by one pixel down and one across.
Then add a text object and set the background colour to be button face (not transparent)
and place this text at the top left hand side of the lines and change the caption to suit
your needs.
Some applications have started to use the windows background colour for the light line
and the application workspace for the dark line, that way the group box matches the users
chosen colour scheme. |