Hey Folkz!
did u ever noticed a pretty good Color Picker Dialog in .NET?
the one in Property window?
is it or something equivalent available?
Printable View
Hey Folkz!
did u ever noticed a pretty good Color Picker Dialog in .NET?
the one in Property window?
is it or something equivalent available?
It's just the standard colorpicker, but I used the ColorDialog class.
Code:private void menuItemColorPicker_Click(System.Object sender, System.EventArgs e)
{
System.Drawing.Font currentFont = richTextBoxData.SelectionFont;
ColorDialog MyDialog = new ColorDialog();
// Keeps the user from selecting a custom color.
MyDialog.AllowFullOpen = true ;
// Allows the user to get help. (The default is false.)
MyDialog.ShowHelp = true ;
// Sets the initial color select to the current text color,
// so that if the user cancels out, the original color is restored.
MyDialog.Color = this.textBoxvbCodeConverted.ForeColor ;
// Open color selection dialog box
MyDialog.ShowDialog();
// Change text color in RTF text box
this.richTextBoxData.SelectionColor =
Color.FromArgb((int)MyDialog.Color.R,
(int)MyDialog.Color.G,
(int)MyDialog.Color.B);
}
nuh nuh! Termite....
that opens a new Dialog window...
what I am saying is different...
take a look at the pic...
it's a cool dialog indeed and the equivalent is using Color.<color-name>
just wondering, what's the base class does Color belongs to?
Its a struct...
belongs to system.drawing namespace...
I found another way out!
you add a combo and on click open a Tabview and fill those tabs with colors...
and when user selects a color... set the combo back color to that color...
not the best solution tho'
Andy_Tacker, I don't know if its "exactly" what your looking for, but this might be close.
http://www.codeproject.com/cs/miscct...olorpicker.asp
Yeah Termite!
Danke...
Color comes in 3 dimensions, red, green, and blue. Hence, color is best visualized in 3d. It allows for a common sense visualization throughout the spectrum.
Attachment 31319
http://www.technologicalutopia.com/colorpicker.htm
OK, this thread is 10 years old! :rolleyes: