Problem: How To Change a control color using SFControlMagic
Solution: It is possible to change the color of a single control on a form using the PalmDatapro SFControlMagic extension (http://www.palmdatapro.com/itm00090.htm).
Updated for Version 8: With Satellite Forms 8 there is a new Colorizer extension that enables you to add color to forms and controls.
The PalmOS color UI system is based on working with groups of common form elements (such as controls) together at the same time, rather than on individual color support for each control. Since the PalmOS color system is designed this way, that is the way the the SFControlMagic extension works. If you set the UI colors and then repaint the screen, all of the form elements are changed.
However, it is possible to change the color of a single control in this manner:
'temporarily change the color of one control
'the color will automatically be reset back to the "normal" color
'when the control is tapped (though you may be able to handle
'that with the OnClick script of a button or OnPenDown/OnPenUp
'events for other control types by applying the color change again)
'let's change the btnPDPTheme button background color to the index value
'in the edCI control (use PickcolorIndex to select a color value)
'in the SFControlMagic sample application
dim oldColor
oldColor = GetColorIndex(1)
SetColorIndex(1, edCI)
btnPDPTheme.visible = true 'redraw it
SetColorIndex(1, oldColor)
Keywords: color, control, SFControlMagic, PalmDataPro
KB ID: 10031
Updated: 2010-06-22
Satellite Forms KnowledgeBase Online