I have a TDBEdit that is not enabled and thus not showing the Hint.
What would be the best way to have it display the Hint while staying disabled?
views:
161answers:
2
+1
A:
The only thing I can think of is overlaying the TDBEdit with a fully transparent control that has ShowHint set to True and a Hint property set.
Ritsaert Hornstra
2010-02-10 20:42:43
That's more or less the workaroound I'm currently using with a graphic control just underneath the disabled TDBEdit...
François
2010-02-10 21:07:43
I agree, it is simply a dirty hack, but disabled controls never will popup hints. Just another idea to not disable the control but play with the colors and set the readonly property?
Ritsaert Hornstra
2010-02-10 21:14:08
A:
Drop your disabled TWinControl (TDBEdit is a TWinControl) onto an enabled TWinControl container (a TPanel for example) and set the TPanel hint to the desired value.
AlexV
2010-02-10 20:56:54
I prefer the more lightweight approach of a TGraphicControl (no window handle, no change in Parenthood)
François
2010-02-10 21:12:08
Yeah but I find my way less "dirty" than an invisible control over the grid :)
AlexV
2010-02-10 21:22:20
You actually probably aren't using a window handle just to have a grid on it. I did some tests to see what the limit was on handles but I ran out of memory first. Handles was a concern back in Windows 95 and 98.
Jim McKeeth
2010-02-11 08:38:54