Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 533
  • Last Modified:

How can I change the caption of a TColorDialog?

I'm calling TColorDialog from 3 different places.  It would be helpful if the caption of the dialog indicated that.

How can I set the caption  of a TColorDialog?  Example code would be much appreciated.
1
DMTrump
Asked:
DMTrump
  • 2
  • 2
1 Solution
 
ThievingSixCommented:
Put this in the Color Dialogs OnShow event:
SetWindowText((Sender as TColorDialog).Handle,'test');

Open in new window

0
 
DMTrumpAuthor Commented:
Ooooo!  So Simple - one of those "Why didn't I think of that? things - but I didn't and you knew Thanks a lot!

The bigger question is why couldn't I find the answer to that anywhere in EE or anywhere!
0
 
ThievingSixCommented:
"Ooooo! So Simple - one of those "Why didn't I think of that? things - but I didn't and you knew Thanks a lot!

The bigger question is why couldn't I find the answer to that anywhere in EE or anywhere!"

Well I didn't know either haha, I started trying to modify the component directly and noticed that windows itself sets the caption. Realized that there was an OnShow. As for EE I don't think anyone has needed to change it.
0
 
DMTrumpAuthor Commented:
I've wanted to before, but it's never before been a big issue - this time it sort of was becasue I myself found that I would loose track of which item I'd clicked to open the dialog (short attention span, I guess)

Thanks again!
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now