[Webinar] Learn how to a build a cloud-first strategyRegister Now

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

hints for disabled components

I have a control that can be disabled. For instance, let it be a button that says "install blah". Now, if a user already has "blah" installed, then this button would be disabled. So far, so good. Now I want the hint for that button to show a text explaining why the button is disabled.

How is this done?
0
lowlevel
Asked:
lowlevel
  • 4
  • 2
1 Solution
 
ZifNabCommented:
Euhm. Proposal, I know a way to force to display the hint, but then you still make a way to check if the cursor is above the button. Do you want a new button, which can display two hints?
0
 
lowlevelAuthor Commented:
yups :)
0
 
ZifNabCommented:
Yo,

I was writing a new component, but then I was realizing that it wasn't such a good idea. What if soembody wanted this also with a TEdit, etc... Than you can start writing a whole bunch of new components.

So I went searching on some tips and what did I found? A component which already does all this and it's freeware....

You can assign the components to the component which have to display a hint when the cursor is over them. Then you can see if the component is disabled, if it is then you just display the hint by this new component.

This is in my opinion the best solution, because I wanted to write such a component too, instead of writing a button with two hints.

You can find the component at :

http://delphiexchange.com/pub/free/mousehin.zip.

It's freeware and you can get the source if you mail to the author.

Regards, Zif.

Good luck, and if you need help, just ask!


0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ZifNabCommented:
And LowLevel is it working?
0
 
lowlevelAuthor Commented:
this works for delphi 1, but I don't think it works for delphi 3. The reason this took so long is that I contacted the author for the source to modify it to delphi 3. But he never replied :(
0
 
ZifNabCommented:
Hi lowlevel, I understand he didn't replied to me either. I hoped you had better look while I was waiting. I try to find another solution.
0
 
Hagen040798Commented:
Hi lowlevel !

One easy way for one Button is you drop a TBevel or TShape on the same position and size back the Button and set the Hint property. When the Button is disabled the Hint from the Bevel is displayed. (Sorry for my english)
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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