Changing a Scroll Bar's Characters and Attributes

The following logical attributes are associated by default with scroll bars:

LCORNER Attribute for the corner character
LPAGERGN Attribute for the page region
LTHUMB Attribute for the thumb character
LARROW Attribute for the arrow characters

To change the definitions of these attributes, you must change the logical attribute array. If you use a window-specific logical attribute array, make sure these logical attributes are defined in the table. If you are using Designer windows, you can modify the logical attribute table in the Designer library, or you can modify the array in your code.

The characters used for all scroll bars are global values. The characters used are dependent on the operating system (see the "System Environment Default Settings" table in the Function Reference for a listing). You can change the characters used for the different parts of the scroll bar.

Designer: Scroll bar characters cannot be changed with the Designer. You can change these features in your code as described below. After you have made the changes, any window read from the Designer library will use the new character and attribute information.

Code: To change the characters used to draw the scroll bar, call the set environment scroll bar characters function, se_sbch():

void se_sbch(corner_ch, uparrow_ch, dnarrow_ch, lftarrow_ch, rtarrow_ch,

            pagergn_ch, thumb_ch)
 
UCHAR corner_ch;
/* Character to use for corner
*/
UCHAR uparrow_ch;
/* Character to use for up arrow
*/
UCHAR dnarrow_ch;
/* Character to use for down arrow
*/
UCHAR lftarrow_ch;
/* Character to use for left arrow
*/
UCHAR rtarrow_ch;
/* Character to use for right arrow
*/
UCHAR pagergn_ch;
/* Character to use for the page region
*/
UCHAR thumb_ch;
/* Character to use for the thumb 
*/


Home Contents Previous Next