Project

General

Profile

Actions

Bug #7756

open

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

Added by Andreas Frolov over 3 years ago. Updated over 3 years 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
Actions #1

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

Actions #2

Updated by Andreas Frolov over 3 years ago

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

Actions

Also available in: Atom PDF