Servoy 6 warning "setFont() is undefined"?

Hi,

why do I get the warning:

“The method setFont() is undefined for the type RuntimeButton”

for

elements.btn_1.setFont('Verdana,0,12');

and how can I fix this?

Servoy 6 final on Mac

.setFont() is deprecated. Instead use the .font property: In Servoy 6 you can both get and set the font, so now it is a property.

For a full overview of what is deprecated, see the upgrade notes: http://wiki.servoy.com/display/DOCS/Upg … Servoy+6.0

Paul

Hi Paul,

I have read the wiki, but if I take the sample code I get this choice!? And btw, also the same warning if I set “elements.btn_1.font(‘Tahoma,1,11’)”.

Syntax is: elements.btn_1.font = ‘Tahoma,1,11’ ; fixed the docs for next release (6.0.1).