I make a class, say ContDer derived from Container supposed to contain some subobjects.
In my code I first create a 'screen' based on root which is my scr_act();
auto root = src_act();
screen = std::make_uniquelvgl::core::Container(root);
screen->set_size(root.get_width(), root.get_height());
I then set it up for grid layout
I can print out root dimensions which are correct.
but printing out screen dimension (screen->get_width() ) just returns 0
Inside screen I create an ContDer object which due to my column descriptor becomes half the size of screen (With borders enabled I can see it works correct)
contDer = std::make_unique(*screen);
In my constructor of condDer I want to add yet a container supposed to 'host' a label. I call it nameContainer
Container nameContainer(*this);
nameContainer.set_size(this->get_content_width(), someHeight);
By some reason get_content_width() as well as get_width() and corresponding height functions return 0.
Except from putting it into my class I don't find it different from what you show in the last example in the README.
Any suggestion on that problem?
I make a class, say ContDer derived from Container supposed to contain some subobjects.
In my code I first create a 'screen' based on root which is my scr_act();
auto root = src_act();
screen = std::make_uniquelvgl::core::Container(root);
screen->set_size(root.get_width(), root.get_height());
I then set it up for grid layout
I can print out root dimensions which are correct.
but printing out screen dimension (screen->get_width() ) just returns 0
Inside screen I create an ContDer object which due to my column descriptor becomes half the size of screen (With borders enabled I can see it works correct)
contDer = std::make_unique(*screen);
In my constructor of condDer I want to add yet a container supposed to 'host' a label. I call it nameContainer
Container nameContainer(*this);
nameContainer.set_size(this->get_content_width(), someHeight);
By some reason get_content_width() as well as get_width() and corresponding height functions return 0.
Except from putting it into my class I don't find it different from what you show in the last example in the README.
Any suggestion on that problem?