Página 1 de 1

oFont bug ?

Publicado: Mar Dic 24, 2019 3:58 pm
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 26411 veces
Doing like in the image changes TButton font to bold.

Regards,

André Corrêa

Re: oFont bug ?

Publicado: Mar Dic 24, 2019 10:02 pm
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

Re: oFont bug ?

Publicado: Jue Dic 26, 2019 9:12 am
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,

Re: oFont bug ?

Publicado: Jue Dic 26, 2019 12:43 pm
por emeasoft
It works.

Thanks Ignacio!