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'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top