HI,
i just started working on my up coming project UI kit , and prepared a pretty basic structure for the project, but i am having difficulties applying styles, every thing was working when it was only main.xml [only one component] as i moved to separate the components and there files some of the components stopped getting styling from CSS files, and some are getting without any problem. i am not sure whether it is my structure which is wrong or this is a legit problem.
to better explain i am attaching the sample-project files you can see here
thank you
![image](https://community.haxeui.org/uploads/default/original/1X/74a48cdde1e50f005f4b4f8988cc6331ceb48237.png)
This is what I’m seeing. Can you run through what I should be seeing vs this output?
1 Like
yes this is the exact same result i am getting:
the problem is, it is ignoring all the styling of main_screen.
and also i am not sure this is the right way to structure ? i want to separate the components to reuse them , the very next step is to create a custom button component with custom styling etc. but i am stuck with this , the only thing i am seeing is the buttons styling .
thanks
hi, thank you for taking time, these are the exact lines i commented out and these lines were affecting the styles after enabling them i got the styles working, but now i am stuck with weird aligning problems.
//After enabling these the main screen started getting styles :)
percentWidth = 100;
percentHeight = 100;
//if i use instance generated from xml, it will be added way before main screen instance.
//_screenHolder = screenHolder;
//fix
_screenHolder = new VBox();
this.addComponent(_screenHolder);
_screenHolder.percentWidth = 100;
_screenHolder.percentHeight = 100;
i am trying to wrap my head around xml designing as i am used to design UI in flash and then use swf libs. so i am thinking every box
as a MovieClip
. so far i don’t think these terminologies apply here ![:slight_smile: :slight_smile:](https://community.haxeui.org/images/emoji/apple/slight_smile.png?v=9)
you can check the code here
and the current result is :
thanks