Page History
...
Example 1: sets the color for CtrlEntID
Code Block |
---|
Color = Get_Property(CtrlEntID, "FORECOLOR") Parent = CtrlEntID [1,"."] Color = Utility("CHOOSECOLOR", Parent, Color) if len(Color) then Set_Property(CtrlEntID, "FORECOLOR", Color) end |
...
Example 2
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 |