Change Font in TEdit Control
Publicado: Lun Jul 25, 2005 1:21 am
I want to change change the font in an edit control to italics if I
determine that the user should not modify the data.
I have tried various techniques like:
oEdit1:oFont:lItalic := .t.
oEdit1:oFont::nStyle := 1
These tend to change other fonts, but not oEdit1.
I find that TFont():Create works but it seems overkill:
:oFont := NIL
:oFont := TFont():Create( "Arial", 9, 1, 400 )
I have attached a very small sample.
What am I doing wrong?
Mike Draper
Attached files ChangeFont.zip (1 KB)Â
determine that the user should not modify the data.
I have tried various techniques like:
oEdit1:oFont:lItalic := .t.
oEdit1:oFont::nStyle := 1
These tend to change other fonts, but not oEdit1.
I find that TFont():Create works but it seems overkill:
:oFont := NIL
:oFont := TFont():Create( "Arial", 9, 1, 400 )
I have attached a very small sample.
What am I doing wrong?
Mike Draper
Attached files ChangeFont.zip (1 KB)Â