Home | OS/2 Software | Rexx | Some SetStyleBit examples

Some SetStyleBit examples

Contributed by: Frank Wochatz

Here some stuff for vispro-rexx programmers:


 


to change the allignment of an item, eg. text in an textitem use this bits:

call VpItem window, itemid, 'SETSTYLEBIT', 8, bit /*center horizontal*/
call VpItem window, itemid, 'SETSTYLEBIT', 9, bit /*right*/
call VpItem window, itemid, 'SETSTYLEBIT', 10, bit /*center vertical*/
call VpItem window, itemid, 'SETSTYLEBIT', 11, bit /*buttom*/

For bit 0 or 1 , in combination you can get 9 positions. (only 2 bits can be used,
one for the horizontal ally and one for the vertically.)
Set all bits to 0 then the text is left top

Sample:
sets the text to buttom right:

call VpItem window, itemid, 'SETSTYLEBIT', 8, 0 /*center horizontal*/
call VpItem window, itemid, 'SETSTYLEBIT', 9, 1 /*right*/
call VpItem window, itemid, 'SETSTYLEBIT', 10, 0 /*center vertical*/
call VpItem window, itemid, 'SETSTYLEBIT', 11, 1 /*buttom*/