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.

oFont bug ?

Xailer English public forum
Responder
Avatar de Usuario
emeasoft
Mensajes: 1088
Registrado: Mié Abr 01, 2009 4:12 pm
Ubicación: emeasoft
Contactar:

oFont bug ?

Mensaje por emeasoft »

Hi Xailers,

Changing any oFont property of other objects using a TButtonClick event, changes it in TButton too.

Example:
Capturar.JPG
Capturar.JPG (33.29 KiB) Visto 26406 veces
Doing like in the image changes TButton font to bold.

Regards,

André Corrêa
Avatar de Usuario
Hurricane
Mensajes: 262
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: oFont bug ?

Mensaje por Hurricane »

No bug.
See Tips: Font - Runtime Properties, the explanation and how to do.
emeasoft escribió: Changing any oFont property of other objects using a TButtonClick event, changes it in TButton too.
...
Doing like in the image changes TButton font to bold.

Regards,

André Corrêa
Developments | Trainings | Projects
Site | E-mail | Messenger | YouTube
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9243
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: oFont bug ?

Mensaje por ignacio »

emeasoft escribió:Hi Xailers,

Changing any oFont property of other objects using a TButtonClick event, changes it in TButton too.

Example:

Capturar.JPG

Doing like in the image changes TButton font to bold.

Regards,

André Corrêa
Hi,

By default all the form controls share the same font object. Just do the following:

::oBtn1:oFont := TFont():Create( "Arial", 12, .T. )

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Responder