TabShape Attribute
Data Type: integer
4GL Access: RW
The TabShape attribute specifies the shape of the tab.
Valid values are:
COR_SQUARE
Specifies tabs with squared corners
COR_ANGLED
Specifies tabs with slightly angled corners
COR_SLOPED
Specifies tabs with steeply angled corners
COR_ROUNDED
Specifies tabs with rounded corners
COR_BITMAPPED
Default: COR_ROUNDED
Descriptions of system constant values and their numeric equivalents are listed in
Corner Settings.
How to Implement Bitmapped Tabs
In addition to setting tabshape to COR_BITMAPPED, certain other settings must be in place to implement bitmapped tabs. You can set these in the Property Inspector or through 4GL assignment; TabField attributes are accessed in the Property Inspector through the TabFolder TabPageArray attribute. The relevant settings are:
• The TabFolder OutlineStyle should not be OS_STANDARD
• The TabField attributes NormalBitmap and SelectedBitmap must reference the images to be displayed for each TabField
• The TabBar attribute HasBitmap and the TabField attribute DisplayBitmap must be set to TRUE
• The TabBar BitmapPosition attribute should be set to POS_CENTER
• The TabBar Xmargin and Ymargin attributes usually need to be set to 0 for best effect
By default the bitmaps will be displayed as transparent, with the topleft pixel defining the transparency color. However, if the color of the topleft pixel is unique for the bitmap, the bitmap is displayed as opaque.
For example, if the bitmap has a black border, that border will disappear; but if you change the topleft pixel's color from black [RGB(0,0,0)] to the nearest unique color—RGB(1,0,0), for example—the bitmap will be displayed as opaque, and the topleft pixel will still appear black.
By default, the size of each tab will be the size of the bitmap or text, whichever is larger, plus any margin; the margin area will be the color of the TabBar. However, resizeable bitmaps (ones with non-zero cornersize) will resize to the tab, while preserving their outlines.
For example, if the NormalBitmap is 10x10 pixels, with a cornersize of 3 pixels, and the tabsize with text is 80x21 pixels, the displayed bitmap will resize to 80x21, but the corners and the borders, to a depth of 3 pixels, will appear exactly as in the original bitmap.
This means that only one normalbitmap and one selectedbitmap need be defined to provide a particular tab style, regardless of how many tabfolders and different-sized tabs there are.
By default the text will be centered over the bitmap. Usually, the left and right edges of tabs are vertical, and the displayed tab corresponds to the underlying rectangular tabfield. However, some tab shapes have sloping edges, which means that some areas of the underlying tabfield appear to belong to the adjacent tab and should behave as if they do. To support this behavior, a "mask" bitmap is required.