Q: Displaying grey text in empty wxTextCtrl?

Petr Prikryl PrikrylP at skil.cz
Tue Nov 6 06:28:31 PST 2007


Hi, 

Is it possible to display a fixed grey text
in the wxTextCtrl when the control data is empty?
Is it somehow supported by wxWidgets?

You may know that kind of behaviour for example 
from Mozilla Firefox 2, the right entry for entering
text searched on the internet (it says "Google"
in grey if the Google is chosen as default server
for searching). Or Windows Vista login dialog
where grey "Password" is displayed inside the control
and you did not enter any character.

I like that feature as it may be implemented
as enhancement of the original behaviour and 
it does not break anything. It could probably
be mimicked by the older wxTextCtrl, but it would
be nicer if it was supported differently than
via playing with text attributes... The control
should return empty string even though the grey text

Thanks for any info/discussion,
    pepr


-- 
Petr Prikryl; prikryl at skil dot cz






More information about the wx-users mailing list