Haxeui API

I would like to have a reference for the haxeui api, which is complete.

I am looking here, but I am wondering if this is the best place.
My reason is this…

Looking at the Button Class, I don’t see, for example, .standardButton.
However, in this example, there is a .standardButton.

I don’t know what I can use in style, for example… whether color, shape, etc.

So I’m looking for a good reference to guide me in coding.

http://haxeui.org/api/haxe/ui/components/button/ scroll to the bottom of the page. You’ll see styleprops. .standardButton is self defined in the xml code

Do you mean ‘Style properties’?
I expanded all the dropdowns, and I don’t see it.
I used “Find on Page”, and no word ‘standard’ was found.
Could you screenshot the portion where you see it, please?

in the sample you linked you can find:

<button text="7" onclick="addDigit(7)" styleNames="standardButton"/>

from HaxeUI docs: styleNames:String - A string representation of the css classes associated with this component

you can’t find standardButton anywhere in manual because it’s a made up name, defined and used only in that sample project.

1 Like

Oh. I understand now.
Thank you for that clear, simple explanation.
Good to know I have the correct references also.

One thing I am not getting right.
So far, I know how to change the menubar’s backgroundColor, but how do I change the menu button’s color?

I thought this would do it.

			.menu {
				width: 128px;
			.button {
				font-size: 16px;
				backgroundColor: #3f3f3f

However, the color remains white.
The api reference indicates backgroundColor as one of its properties.


Or maybe I coded it incorrectly?

It’s been a while for me and I have only been back to haxe and haxeui for a few days now, but, while I am getting familiar with things again, I personally like to go to the source on Github to view the most updated info for the API.

I may be wrong, but I believe, you should look at Button and DropDown.

haxeui-core/haxe/ui/components at master · haxeui/haxeui-core · GitHub

Went back and did some more looking. This may be what you are needing. It’s a thought. I have not tried it yet. Hopefully one of the links helps.

public override function applyStyle(style:Style) {
    haxe.ui.macros.ComponentMacros.cascacdeStylesTo("menuitem-label", [color, fontName, fontSize, cursor, textAlign]);

haxeui-core/MenuItem.hx at master · haxeui/haxeui-core · GitHub

Hi Jax,

So, the css parser is expecting kebab-case, so in your example, you probably mean:

			.menu {
				width: 128px;
			.button {
				font-size: 16px;
				background-color: #3f3f3f;

(ie, background-color rather than backgroundColor - i also added a missing semi-colon )

Keep in mind though that the css above will colour all buttons #3f3f3f because the run .button will match any button. That may be what you are after, but if you just wanted to color buttons that are children of the menubar, then something like .menubar .button would work, eg: http://haxeui.org/builder/?f498842d

Hope that helps,

1 Like

Had my curiosity going and I had to tinker around to see what I could get the buttons and such to do as far as being creative with em. lol


1 Like

Thanks. I usually check those out from the files in the directory tree on my hard drive. I find it’s easier on the eyes. and they are closer at hand.

Wow. This looks so much like StyleManager.
Maybe this is what I was looking for.
That will save me the trouble I got trying to use that library.
I’ll check out the links. Thanks.

Thanks a lot.
Yes. This is what I am looking for. It worked too.

css parser ? Where do I find information on this, because the api doesn’t tell me this… Or does it, and I missed it?

css parser ? Where do I find information on this, because the api doesn’t tell me this… Or does it, and I missed it?

I guess here: styles - HaxeUI API Docs - though there isnt much in the way of front facing api, you arent really supposed to use it directly (its more for haxeui). I was going to direct you a bunch of functions here: Toolkit - HaxeUI API Docs, but just seen that my doc generator isnt generating static functions / properties (among other things)… Whoops, will have to fix that asap, as it looks incorrectly that Toolkit contains nothing… :smiley:


I think I misled you. Sorry about that.
I should have been more specific.
Where would I find information so as to know I needed to use background-color, rather than backgroundColor. You mentioned

css parser is expecting kebab-case