Data Access Worldwide Knowledge Base

Article ID 2212
Article Title PROBLEM: TextColor set for a checkbox/dbcheckbox is not displayed
Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2212
KBase Category WINDOWS XP
Date Created 01/30/2006
Last Edit Date 01/30/2006


Article Text
QUESTION:
The textcolor property for a checkbox/dbcheckbox control is not respected when XP Visual Styles are applied. Is that right?

ANSWER:
In a few words, yes, that is the expected behavior when you apply a Visual Style i.e. certain characteristics of the controls are simply overriden by the Visual Style.

Now, the whole story: Beginning with Windows 95, Microsoft introduced Themes, where you could change the default color and appearance of certain aspects of the desktop and some standard controls, as well as the standard sounds. Themes would only let you define the default color of certain elements of controls.

In Windows XP this has been extended with Visual Styles. Visual Styles lets you define the look and feel of standard controls at a deeper level. Controls are divided into different parts and Visual Style specifications specify the look and feel of each part.

Visual Styles, introduced with Windows XP, will let you define not only color, but also change how different parts of a control is drawn, completely changing the textures and shapes of different parts of the control.

Another important difference with Visual Styles from the former control coloring schemes in prior revisions of Windows is that default control colors were just that, default colors. But Visual Styles are defined completely by the specified Visual Style, overriding any color settings in the application. For example, without Visual Styles, in your program you can set the color of a control to the system color and it would respect the default color specified by the theme. It's also possible to set the color of a control to any other color, and it will display in the specified color.

However, with Visual Styles, some color settings in your program for a particular control is completely ignored. The controls, or their respective parts, are instead rendered according to the Visual Style settings. This can almost be thought of as a "skin" technique.

Windows XP comes with a default XP Theme and XP Visual Style. This is the Visual Style that we normally think of when we talk about the "XP look". It's important to understand that with Visual DataFlex 11.1 the goal was not to give Visual DataFlex's controls the "XP look" but to enable Visual DataFlex applications to respect and use Windows themes and Visual Styles.



Contributed By:
Sonny Falk
Company: Data Access Worldwide
Web Site: http://www.dataaccess.com

Web Links Related to this Article
DAW Knowledge Base article 2187: INFO: Manifest Files
URL=http://www.dataaccess.com/KBPrint.asp?ArticleID=2187


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.