Page History
...
FORECOLOR property, GRADIENTSTYLE property, CHOOSECOLOR Utility() service
Example
Code Block |
---|
* Example 1: sets the color for CtrlEntID Color = Get_Property(CtrlEntID, "BACKCOLOR") Parent = CtrlEntID [1,"."] Color = Utility("CHOOSECOLOR", Parent, Color) if len(Color) then Set_Property(CtrlEntID, "BACKCOLOR", Color) end |
/* Example 2: convert between an @vm-delimited RGB value (used by QuickHelp and Msg, for example) and a Color value (the FORECOLOR and BACKCOLOR property values) */
...
Code Block |
---|
* convert from RGB to Color Color = RGB<1,1> + RGB<1,2> * 256 + RGB<1,3> * 65536 * convert from Color to RGB RGB = "" Temp = Color ;* don't modify the Color value for i = 1 to 3 RGB<1,i> = mod(Temp, 256) Temp = int(Temp / 256) next i |