We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

ColorPickerButton not setting black color correctly

Thread ID:

Created:

Updated:

Platform:

Replies:

96001 Aug 14,2010 06:56 AM Aug 17,2010 08:19 AM ASP.NET Web Forms (Classic) 1
loading
Tags: Tools
Administrator [Syncfusion]
Asked On August 14, 2010 06:56 AM

I have an application where the users can set their own screen colors by using the ColorPickerButton. This includes custom colors outside of the usual "known color" range. The selected color is then stored as an argb number in an XML file which can be read when the screen reloads.

However, the SelectedColor property of the ColorPickerButton appears to convert black to white when displaying the color palette. The following sample code was used to generate the screen shots attached:

Private Sub Form1_Load( _
ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles _
Me.Load

ColorPickerButton1.SelectedColor = Color.FromArgb(255, 255, 255, 255)
' ColorPickerButton1.SelectedColor = Color.FromArgb(255, 0, 0, 0)

End Sub

As you can see both lines of code result in the white colored square being given the focus. Although only a minor problem, black is likely to get heavily used as the color for screen text. The SelectedColor property also appears to work OK with a "KnownColor", but that option is not open to me as users have the choice of potentially 16M colors which are stored as argb's.

I have also noticed that on occasion, other known colors appear to suffer the same problem and although the problem appears random, I suspect that the difficulty with the black/white colors may be the cause.

Any workaround you can provide would be appreciated, otherwise I will create a direct-trac incident if required.

Regards,

Steve Graham



ColorPickerButtonScreenShot_f6d9a589.zip

Lingaraj S [Syncfusion]
Replied On August 17, 2010 08:19 AM

Hi Steve,

Thank you for your interest in Syncfusion products. Also regret for the inconvenience. By default, ColorUIControl does not allow to select the UnKnownColors. So please try using standard KnowColors with ColorUIControl.

this.colorPickerButton1.SelectedColor = Color.Black;


Please let me know if you have any other concerns.

Regards,
Lingaraj S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;