Delphi XE8: TEdit TextHint Disappears When Receiving Focus -


basically, want texthint of tedits disappear when first character entered , not when receive focus, edits on microsoft page: sign in microsoft account. can please walk me through on how achieve this?

thank in advance.

based on uwe raabe's answer, here procedure (for delphi 2007, should work newer versions of delphi well):

type   tcuebannerhideenum = (cbhhideonfocus, cbhhideontext);  procedure tedit_setcuebanner(_ed: tedit; const _s: widestring; _whentohide: tcuebannerhideenum = cbhhideonfocus); const   em_setcuebanner = $1501; var   wparam: integer; begin   case _whentohide of     cbhhideontext: wparam := 1;   else //    cbhhideonfocus: ;     wparam := 0;   end;   sendmessage(_ed.handle, em_setcuebanner, wparam, integer(pwidechar(_s))); end; 

you call this:

constructor tform1.create(_owner: tcomponent); begin   inherited;   tedit_setcuebanner(ed_hideonfocus, 'hide on focus', cbhhideonfocus);   tedit_setcuebanner(ed_hideontext, 'hide on text', cbhhideontext); end; 

it doesn't check windows version though, might want add if statement uwe provided:

if checkwin32version(5, 1) , styleservices.enabled , _ed.handleallocated 

i tested project disabled runtime theming: didn't work.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -