This is a migrated thread and some comments may be shown as answers.

How to make color dialog into my own style?

1 Answer 82 Views
ColorDialog
This is a migrated thread and some comments may be shown as answers.
Saint
Top achievements
Rank 1
Saint asked on 18 Feb 2008, 01:14 AM
Hi, is there any way to design my own color dialog by using RadColorDialog ? Cause I want to change the borderstyle into my own border and I want to add some function into it.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Accepted
Kiril
Telerik team
answered on 18 Feb 2008, 09:08 AM
Hi Saint,

Thank you for writing.

The RadColorSelector encapsulates the color selection logic. It is typically hosted by the RadColorDialogForm. However, you can customize the appearance and behavior of the component by initializing an instance manually, setting its appearance properties, and adding it to your own form to show it to the user. This approach is illustrated below, where the customization is the setting of the back color of the color selector to red.

Please refer to the codeblock below:
            Form colorDialogForm = new Form();  
            RadColorSelector cs = new RadColorSelector();  
            cs.BorderStyle = BorderStyle.Fixed3D;  
            cs.BackColor = Color.Red;  
            colorDialogForm.Controls.Add(cs);  
            colorDialogForm.Size = cs.Size;  
            cs.Dock = DockStyle.Fill;  
            DialogResult dr = colorDialogForm.ShowDialog(); 

In the future, the RadColorSelector will be available in the toolbox, and you'll be able to modify it at design-time.

I hope this helps. If you have any additional questions, please let us know.

All the best,
Kiril
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ColorDialog
Asked by
Saint
Top achievements
Rank 1
Answers by
Kiril
Telerik team
Share this question
or