Styling label (size, color, weight)

How do i style label with hxwidget / MacOS ?
I’m unable to set it bold or change its size or color.
While the html5 ouput is OK

Regards

I wonder if this is a limitation of wxWidgets? haxeui-hxwidgets uses hxWidgets which in turn uses wxWidgets, which in turn uses the OS’s actual native components. I know for buttons on OSX its impossible to change font size because the underlying operating system simply wont let you - and as far as im aware there is NO way around this.

I wonder if, as crazy as it sounds, the same applies to labels? On windows i know its fine:

image

Ill have to test on OSX.

EDIT: to follow up, i just tried on OSX, and i can change the font color, but NOT the font size. :confused:

EDIT2: so i just tried with hxWidgets (not haxeui-hxwidgets) and it worked, then i looked in haxeui-hxwidgets and found this:

if (Platform.isMac == false) { // dont bother trying to set the font on osx, it wont work and will look weird

Erm… … lol? So im going to do a bit of testing and remove that line i think, i dont think its haxeui’s responsibility to do things like that. If you want to make things huge and yellow, its not haxeui’s job to stop you from doing so! Another good find :smiley:

OK, ive removed those lines (well, commented them out). I really cant work out WHY i decided to put them there, but for now it should be fine to change the colour and size of a label.

(you’ll need git haxeui-hxwidgets)

Cheers,
Ian

I confirm it works on label and button, thanks !!!

Unfortunately, I found a style not working :

        font-style: italic; 

I don’t know if it’s available on native…but it does nothing on OSX