Discussion:
[Wt-interest] Layout best practices
Omar GIVERNAUD
2014-10-31 16:31:52 UTC
Permalink
Hi all,

I don't know much about css/html that's why I love wt. However I often got
trouble with widget getting compressed or superposed.

For example:
* WLineEdit that become so thin thant we can't see the text inside.
* Chart that get compressed/stretch in one direction and loose ratio
* Adding a new widget in a WVBoxLayout makes the previous widget get
superposed

Is there a simple way to avoid those cases?
Would it be possible to have more complex example than the in the widget
gallery?

Regards

trax
Koen Deforche
2014-11-07 10:42:51 UTC
Permalink
Hey Omer,

A layout manager will not change the 'overflow' settings of a widget that
you insert. The superimposition is because the default CSS overflow setting
is 'visible'. In practice you may want to change this to 'hidden' or 'auto'
(to show scrollbars if necessary).

I can't readily answer the other problems since I'm not sure what you're
doing that causes this?

Regards,
koen
Post by Omar GIVERNAUD
Hi all,
I don't know much about css/html that's why I love wt. However I often got
trouble with widget getting compressed or superposed.
* WLineEdit that become so thin thant we can't see the text inside.
* Chart that get compressed/stretch in one direction and loose ratio
* Adding a new widget in a WVBoxLayout makes the previous widget get
superposed
Is there a simple way to avoid those cases?
Would it be possible to have more complex example than the in the widget
gallery?
Regards
trax
------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
https://lists.sourceforge.net/lists/listinfo/witty-interest
Marco Kinski
2014-11-12 09:44:55 UTC
Permalink
Hi Trax,
Post by Omar GIVERNAUD
* Adding a new widget in a WVBoxLayout makes the previous widget get
superposed
try to add a spacer (Wt::WBoxLayout::addStretch) with a higher ratio item
inside the layout to prevent the other contents from stretching to excess
space.
--
Regards,
Marco
Omar GIVERNAUD
2014-12-24 00:05:34 UTC
Permalink
Hi

here an example of container collapsing
screenshot: Loading Image...
code: http://pastebin.com/8N0Z1gDn

It does the same with version 3.1, 3.3.1 and 3.3.3

How can I solve it?

regards
trax
Post by Marco Kinski
Hi Trax,
Post by Omar GIVERNAUD
* Adding a new widget in a WVBoxLayout makes the previous widget get
superposed
try to add a spacer (Wt::WBoxLayout::addStretch) with a higher ratio item
inside the layout to prevent the other contents from stretching to excess
space.
--
Regards,
Marco
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
https://lists.sourceforge.net/lists/listinfo/witty-interest
Koen Deforche
2014-12-31 13:18:13 UTC
Permalink
Hey Omar,

It depends on what you want? Not everything can be shown on the screen so
you need to decide.

Either you add at line 74:
container->setOverflow(Wt::WContainerWidget::OverflowHidden);

Or you may want a scrollbar to appear at the level of the container, then
change lines 65-:

auto mainContainer = new Wt::WContainerWidget();
mainContainer->setOverflow(Wt::WContainerWidget::OverflowAuto);

auto layoutContainer = new Wt::WContainerWidget(mainContainer);
layoutContainer->setLayout(layout);

Regards,
koen
Post by Omar GIVERNAUD
Hi
here an example of container collapsing
screenshot: https://s3-eu-west-1.amazonaws.com/imgimg/plop.png
code: http://pastebin.com/8N0Z1gDn
It does the same with version 3.1, 3.3.1 and 3.3.3
How can I solve it?
regards
trax
Post by Marco Kinski
Hi Trax,
Post by Omar GIVERNAUD
* Adding a new widget in a WVBoxLayout makes the previous widget get
superposed
try to add a spacer (Wt::WBoxLayout::addStretch) with a higher ratio item
inside the layout to prevent the other contents from stretching to excess
space.
--
Regards,
Marco
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
https://lists.sourceforge.net/lists/listinfo/witty-interest
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is
your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
witty-interest mailing list
https://lists.sourceforge.net/lists/listinfo/witty-interest
Continue reading on narkive:
Loading...