Jump to content


Photo

NxColorPicker Another Bug?


  • Please log in to reply
5 replies to this topic

#1 Vizitator

Vizitator
  • Members
  • 7 posts

Posted 05 March 2008 - 01:08 AM

Dear Boki,

Playing a little bit more with NxColorPicker I found another bug or strange behavior of this control. Please follow this simple scenario:
1) Place on a form a (standard delphi component) Colorbox and add another 2 NxColorPicker components;
2) Set WebColorFormat=False for the first NxColorPicker and WebColorFormat=True for the second one;
3) At the OnChange event of the Colorbox write:
NxColorPicker1.SelectedColor:=ColorBox1.Selected;
NxColorPicker2.SelectedColor:=ColorBox1.Selected;

Well running the program at the first glance everything seemed Ok but it is NOT! Only if you choose any standard color from the ColorBox the result is ok, but if you choose the last colors, which corresponds to the windows colors then strange things appears! For example, choosing clActiveCaption in ColorBox then I obtain: $FF000002 and #0054E3. I have seen that the problematic colors are those which corresponds to negative integer numbers.
Maybe is normal and I am wrong, I am not an experienced programmer, delphi is one of my hobbies so please let me know wheter I am wrong or right. I have attached the program, I wrote in delphi 7.

Best regards,
Vizitator

Attached Files



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 05 March 2008 - 01:40 AM

Hello Vizitator,

No problem smile.gif

This is normal behaviour as far I can see smile.gif

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Vizitator

Vizitator
  • Members
  • 7 posts

Posted 05 March 2008 - 02:18 AM

Hi,

I think the problem might be solved by adding the line:

if NxColorPicker.SelectedColor < 0 then NxColorPicker.Text:=ColorToRGB(NxColorPicker.SelectedColor);

somewhere (sorry I dont have the code otherwise I would have told you exactly where to put it!) in the NxColorPicker component. Then both controls will "agree", i.e both will show the same code except '$00' and '#' chars.

That's my opinion!

Have a nice evening (or night laugh.gif )
Vizitator

#4 relipse

relipse
  • Members
  • 44 posts
  • Gender:Male
  • Location:PA, USA

Posted 24 March 2008 - 06:35 AM

For some reason all of my ->SelectedColor are returning black instead of the actual selected color
This is with the new beta version.

As a work-around, I had to do StringToColor(myNxColorPicker->Text);
which is kinda lame
(i'm using c++builder 6)

Thanks,
relipse

#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 24 March 2008 - 08:46 PM

Hello Relipse,

Can you please send me settings that you use for this NxColorPicker.

I have test it once again and it seems to work fine.

Thank you.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#6 bertrod

bertrod
  • Members
  • 101 posts
  • Gender:Male
  • Location:Switzerland

Posted 03 June 2008 - 02:15 PM

QUOTE (Vizitator @ Mar 5 2008, 02:08 AM) <{POST_SNAPBACK}>
For example, choosing clActiveCaption in ColorBox then I obtain: $FF000002 and #0054E3.


Hello Vizitator,

What's wrong with those colors ? I have the same and it seems to be correct. At least #0054E3 is the correct color for clActiveCaption with WinXP blue theme.

I don't understand your problem unsure.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users