Print Page | Close Window

CXTPControlEdit background color

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=19033
Printed Date: 24 November 2024 at 10:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPControlEdit background color
Posted By: GARC
Subject: CXTPControlEdit background color
Date Posted: 07 October 2011 at 9:29am
I have an application with a simple Ribbon Bar in which I´ve placed two CXTControl of type CXTPControlEdit.
This Ribbon Bar has two operation modes: DISPLAY and EDITION. The DISPLAY mode is used to show the current contents of these controls (text), but they are set in ReadOnly state so cannot be modified. The EDITION mode is obviously prepared to set these controls out of ReadOnly state allowing the user to make changes to them.
My problem is that when set to ReadOnly state, the graphical aspect of them does not change, only changes the behaviour from editable to non-editable. My customer wants these controls to change their aspect when in DISPLAY mode, for example to show a grayed background, in order to notice that they are not editable.
I´ve tried to derive a class from CXTPControlEdit with a boolean member variable to set the editable mode and I´ve overriden the virtual function Draw to change that color without success.
I even don´t know if I should use any CXTPPaintManager to do that because in fact, I don´t know which is the function of that CXTPPaintManager inside Codejock´s structure.
CXTPControl has a function called GetPaintManager, but inside CXTPPaintManager, although there is a function to get the back color of the edit (GetControlEditBackColor), there is none to Set this color.
Some help will be appreciated.
Thanks.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net