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)Â
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Change Font in TEdit Control
-
- Mensajes: 41
- Registrado: Vie Jul 01, 2005 11:59 pm
- ignacio
- Site Admin
- Mensajes: 9440
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Change Font in TEdit Control
Mike,
The property lParentFont indicates that the control should use its parent
oFont object. Put this property to .F. before changing any of it.
Regards,
"Mike Draper" <draperm@cogeco.ca> escribió en el mensaje
news:42e4226a$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>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
>
>
>
>
The property lParentFont indicates that the control should use its parent
oFont object. Put this property to .F. before changing any of it.
Regards,
"Mike Draper" <draperm@cogeco.ca> escribió en el mensaje
news:42e4226a$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>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
>
>
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
-
- Mensajes: 41
- Registrado: Vie Jul 01, 2005 11:59 pm
Change Font in TEdit Control
Ignacio
That does not seem to make a difference. Try it in the TEST that I sent to
you.
"Ignacio Ortiz de Zúñiga" <InvalidAccount@ozs.com> wrote in message
news:42e49f07$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Mike,
>
> The property lParentFont indicates that the control should use its parent
> oFont object. Put this property to .F. before changing any of it.
>
> Regards,
>
> "Mike Draper" <draperm@cogeco.ca> escribió en el mensaje
> news:42e4226a$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>>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
>>
>>
>>
>>
>
>
That does not seem to make a difference. Try it in the TEST that I sent to
you.
"Ignacio Ortiz de Zúñiga" <InvalidAccount@ozs.com> wrote in message
news:42e49f07$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Mike,
>
> The property lParentFont indicates that the control should use its parent
> oFont object. Put this property to .F. before changing any of it.
>
> Regards,
>
> "Mike Draper" <draperm@cogeco.ca> escribió en el mensaje
> news:42e4226a$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>>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
>>
>>
>>
>>
>
>
- ignacio
- Site Admin
- Mensajes: 9440
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Change Font in TEdit Control
Mike,
You should also assign the property oFont ON the tEdit objet. If you do not
assign that propery even if you have change lParentFont to false the control
will still use its parent Font.
Regards,
"Mike Draper" <draperm@cogeco.ca> escribió en el mensaje
news:42e4e1b6$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Ignacio
>
> That does not seem to make a difference. Try it in the TEST that I sent
> to you.
>
> "Ignacio Ortiz de Zúñiga" <InvalidAccount@ozs.com> wrote in message
> news:42e49f07$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>> Mike,
>>
>> The property lParentFont indicates that the control should use its parent
>> oFont object. Put this property to .F. before changing any of it.
>>
>> Regards,
>>
>> "Mike Draper" <draperm@cogeco.ca> escribió en el mensaje
>> news:42e4226a$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>>>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
>>>
>>>
>>>
>>>
>>
>>
>
>
You should also assign the property oFont ON the tEdit objet. If you do not
assign that propery even if you have change lParentFont to false the control
will still use its parent Font.
Regards,
"Mike Draper" <draperm@cogeco.ca> escribió en el mensaje
news:42e4e1b6$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Ignacio
>
> That does not seem to make a difference. Try it in the TEST that I sent
> to you.
>
> "Ignacio Ortiz de Zúñiga" <InvalidAccount@ozs.com> wrote in message
> news:42e49f07$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>> Mike,
>>
>> The property lParentFont indicates that the control should use its parent
>> oFont object. Put this property to .F. before changing any of it.
>>
>> Regards,
>>
>> "Mike Draper" <draperm@cogeco.ca> escribió en el mensaje
>> news:42e4226a$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>>>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
>>>
>>>
>>>
>>>
>>
>>
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com