The Tab control has settings for controlling the position and appearance of the tabs. Each tab can have its own label, picture, and background color.
All tabs share the same font settings, which you set on the Tab control’s Font property page.
A Tab control has several elements, each with its own pop-up menu and Properties view. To open the Properties view, double-click or select Properties on the pop-up menu.
Where you click determines what element you access.
The General tab in the Tab control’s Properties view has several settings for controlling the position and size of the tabs. For example:
Fixed Width and Ragged Right
When Fixed Width is checked, the tabs are all the same size.
This is different from turning Ragged Right off, which stretches
the tabs to fill the edge of the Tab control, like justified text.
The effect is the same if all the tab labels are short, but if you
have a mix of long and short labels, justified labels can be different
sizes unless Fixed Width is on.
The sample Tab control in Figure 5-2 is set up like an address book. It has tabs that flip between the left and right sides. With the Bold Selected Text setting on and the changing tab positions, it is easy to see which tab is selected.
Figure 5-2: Address book tab control
You can change the appearance of the tab using the Properties views of both the Tab control and the Tab page.
If you are working in the User Object painter on an object you will use as a tab page, you can make the same settings on the TabPage page of the user object’s Properties view that you can make in the tab page’s Properties view.
This example has a picture and text assigned to each tab page. Each tab has a different background color. The Show Picture and Show Text settings are both on:
Figure 5-3: Tabs with pictures and text
All these settings in the painter have equivalent properties that you can set in a script, allowing you to dynamically change the appearance of the Tab control during execution.
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |