fontDialog.Color

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

the following

"fontDialog1.Color = Color.LimeGreen;"

fails. - the selected color displayed when fontDialog1 is shown is black.
It will work if I set the color to red, blue, etc but not LimeGreen. I
noticed that this particular color doesn't reside in the color drop-down
picker of the dialog and I believe this is the reason why the call doesn't
work. How can I initialize the color selection to LimeGreen?

Thanks everyone.
 
Lionel said:
the following

"fontDialog1.Color = Color.LimeGreen;"

fails. - the selected color displayed when fontDialog1 is shown is black.
It will work if I set the color to red, blue, etc but not LimeGreen. I
noticed that this particular color doesn't reside in the color drop-down
picker of the dialog and I believe this is the reason why the call doesn't
work. How can I initialize the color selection to LimeGreen?

I don't think this is possible by using this dialog as it provides only a
limited set of predefined colors and doesn't support specifying custom
colors. You may want to use a separate ColorDialog in order to provide a
more convenient way of choosing the font's color. When doing so you may
want to remove the color choice of the font selection dialog by setting its
'ShowColor' property to 'False'.
 
Back
Top