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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I fill in the 16 custom colors?System.Windows.Forms.ColorDialog

Thread ID:

Created:

Updated:

Platform:

Replies:

117088 Aug 7,2014 09:36 PM UTC Aug 11,2014 11:58 AM UTC WinForms 3
loading
Tags: ColorUIControl
Tuan Lam
Asked On August 7, 2014 09:36 PM UTC

I want to fill in the 16 custom colors with the System.Windows.Forms.ColorDialog.CustomColors, how would I go about doing that?

I also want to save them back to the System.Windows.Forms.ColorDialog.CustomColors is the use changed the custom colors on on ColorUIControl.  Do you have a sample for doing this?













Saravanan T [Syncfusion]
Replied On August 8, 2014 06:45 AM UTC

Hi Tuan,

 

Thank you for using Syncfusion products,

 

We would like to let you that the custom colors can be set in ColorUIControl by right clicking on the empty cell.  Please have the attached sample and video for your reference.

 

Please follow the below steps to achieve this and let us know if this helps you,

 

1)     Run the sample,

2)     Right click on the empty cell

3)     New dialog box will open.

4)     Pick the color and then click on AddColor

5)     Now selected color will be added in the Custom Colors

 

Please let us know if you have any concerns,

 

Regards,

Saravanan T

 


Attachment: ColorUIControl_CustomColor_Selection_e3830a31.zip

Tuan Lam
Replied On August 8, 2014 04:16 PM UTC

I want to set those programmatically, not selecting from the popup dialog.  I'm using the MFC's color dialog in other apps and I want to transfer those custom color to Syncfusion's ColorUIControl.


Saravanan T [Syncfusion]
Replied On August 11, 2014 11:58 AM UTC

Hi Tuan,

 

Thank you for your update,

 

We would like to let you know that we have modified the sample for your requirement and it can be downloaded from the below attachment.

 

Code Snippet [C#]:

 

this.colorUIControl1.SelectedColorGroup = Syncfusion.Windows.Forms.ColorUISelectedGroup.UserColors;

 

// To set the color

this.colorUIControl1.UserCustomColors[0] = Color.DeepPink;

this.colorUIControl1.UserCustomColors[1] = Color.Blue;

 

 

Please let us know if you need any further assistance,

 

Regards,

Saravanan T
Attachment: ColorUIControl_modified_39f2d282.zip

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.

Warning Icon 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.Close Icon

;