Bug #7756
openWLayout with JavaScript implementaion does not receive size change event if the trigger was WTextArea.
0%
Description
By dragging the bottom right corner of the WTextArea a layout with JavaScript implementaion doesn't respond to it. Even if his parent widget changes size.
Here is my test code to the screenshot.
`auto layout1 = std::make_uniqueWt::WVBoxLayout();
layout1->addWidget(std::make_uniqueWt::WTextArea("Flex"));
layout1->addWidget(std::make_uniqueWt::WTextArea());
layout1->addWidget(std::make_uniqueWt::WTextArea());
auto layout2 = std::make_uniqueWt::WVBoxLayout();
layout2->setPreferredImplementation(Wt::LayoutImplementation::JavaScript);
layout2->addWidget(std::make_uniqueWt::WTextArea("JavaScript"));
layout2->addWidget(std::make_uniqueWt::WTextArea());
layout2->addWidget(std::make_uniqueWt::WTextArea());
auto mainLayout = std::make_uniqueWt::WHBoxLayout();
mainLayout->addLayout(std::move(layout1));
mainLayout->addLayout(std::move(layout2));
Wt::WDialog dialog("Layouts");
dialog.contents()->setLayout(std::move(mainLayout));
dialog.exec();`
Files
Updated by Roel Standaert about 3 years ago
Yes, I don't think those are really designed to interact. The height is equally distributed between the three widgets inside of the layout.
I think the way to do resizable WTextArea
s inside of a layout is to use the CSS resize: none
, and use WBoxLayout::setResizable
.
Updated by Andreas Frolov about 3 years ago
If WTextArea is not designed to interact, shouldn't this option be deactivated by default?