Project

General

Profile

Bug #7756

WLayout with JavaScript implementaion does not receive size change event if the trigger was WTextArea.

Added by Andreas Frolov 16 days ago. Updated 4 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/08/2020
Due date:
% Done:

0%

Estimated time:

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

textarea.png (8.38 KB) textarea.png Andreas Frolov, 10/08/2020 04:39 PM
#1

Updated by Roel Standaert 8 days 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 WTextAreas inside of a layout is to use the CSS resize: none, and use WBoxLayout::setResizable.

#2

Updated by Andreas Frolov 4 days ago

If WTextArea is not designed to interact, shouldn't this option be deactivated by default?

Also available in: Atom PDF