Print Page | Close Window

Enhancements to Color Pickers

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2481
Printed Date: 10 November 2025 at 1:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Enhancements to Color Pickers
Posted By: Dmitry
Subject: Enhancements to Color Pickers
Date Posted: 29 June 2005 at 8:05pm
Hi,

I would like to suggest a few enhancements to the color picker set of controls: CXTPControlPopupColor, CXTPControlColorSelector & CXTPControlButtonColor.

1. Ability to set user-defined colors & tooltips. Currently, the 40 colors & tooltips are hard-coded.
    void CXTPControlColorSelector :: SetColors (CColorInfoList const & colorInfoList);

2. Ability to change the width / height of the CXTPControlColorSelector in terms of colors. Currently the dimensions are hardcoded to 8 by 5.
    void CXTPControlColorSelector :: SetColorsSize (CSize colorsSize);

3. Ability to change color of any part of the icon in CXTPControlPopupColor. Currently this is hardcoded to the bottom 1/5th.
    void CXTPControlPopupColor :: SetColorPositionInIcon (float startX, float startY, float endX, float endY);
This would work proportionally, so to specify bottom fifth, would be (0.0, 0.8, 1.0, 1.0), to specify top-right corner would be (0.5, 0.0, 1.0, 0.5) etc.

4. The same ability in CXTColorSelectorCtrl / CXTColorPicker set of controls that can be used on a dialog.

These enhancements would allow to do something like this, which is necessary for our project (this is a mock-up):


Is there anything like this in the toolkit already?

Regards,
Dima



Replies:
Posted By: Dmitry
Date Posted: 30 June 2005 at 8:03pm
Well, following Oleg's advice in http://forum.codejock.com/forum_posts.asp?TID=776&KW=CXTPControlPopupColor - here , i've hacked this up myself. (The first 3 points so far.)

Dmitry


Posted By: kanitamildasan
Date Posted: 07 March 2006 at 12:16am

Hi,

Anyone having similar code changes in CXTPControlColorSelector Can you share it with me if no problem ?

thanks in advance



-------------
Xtreme ToolkitPro 12.1.1
Win XP (32bit) - SP2
Visual C++ 6.0 SP 6



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