I’m primarily trying to set style for a single tabbar component. Additionally, is there a way to do this in a single xml line like:
<tabview width="100%" height="300" style="style stuff would be set here I guess">
<grid text="tab 1" width="100%">
<label text="item 1" />
<label text="item 2" />
</grid>
</tabview>
As an aside, I think it would be really helpful if Component Explorer - HaxeUI had examples in hx in addition to xml so people could find that information more easily.
<tabview width="100%" height="300" style="style stuff would be set here I guess">
<style>
.tabbar .tabbar-button {
background-opacity: 0;
}
.tabbar .tabbar-button-selected {
background-color: white;
border-bottom-color: white;
background-opacity: 100;
}
</style>
<grid text="tab 1" width="100%">
<label text="item 1" />
<label text="item 2" />
</grid>
</tabview>
The problem with that is that would allow code to run on my server, including macros, this is a huge security hole. It can be overcome (with docker for example) but its not a quick thing
Thanks for letting me know about styleSheet.parse(); I’m going to have to play with that.
For my second question, I knew you could add it to the xml directly, but when I tried changing the style for a progress bar, for example, it changed every progress bar to that style, not just the bar that the style was nested under.
This changes bar2 to this style, even though it’s nested under bar1. Could you please let me know what I’m doing wrong? I also tried putting it inside the progress bar thing like this: