Project

General

Profile

Actions

Bug #3651

closed

WTreeTable doesn't resize rows when WPushButtons are used as column widgets:

Added by Patrick Oppenlander about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

For example:

namespace {
    Wt::WTreeTableNode *addNode(Wt::WTreeTableNode *parent, const char *name,
                const char *yuppie, const char *holidays,
                const char *favorite) {
    Wt::WTreeTableNode *node = new Wt::WTreeTableNode(name, 0, parent);
    node->setColumnWidget(1, new Wt::WText(yuppie));
    node->setColumnWidget(2, new Wt::WText(holidays));
    node->setColumnWidget(3, new Wt::WPushButton(favorite));
    return node;
    }
}


Wt::WTreeTable *treeTable = new Wt::WTreeTable();

treeTable->resize(650, 200);
treeTable->tree()->setSelectionMode(Wt::ExtendedSelection);
treeTable->addColumn("Yuppie Factor", 125);
treeTable->addColumn("# Holidays", 125);
treeTable->addColumn("Favorite Item", 125);

Wt::WTreeTableNode *root = new Wt::WTreeTableNode("All Personnel");
treeTable->setTreeRoot(root, "Emweb Organigram");

Wt::WTreeTableNode *group;

group = new Wt::WTreeTableNode("Upper Management", 0, root);
addNode(group, "Chief Anything Officer", "-2.8", "20", "Scepter");
addNode(group, "Vice President of Parties", "13.57", "365", "Flag");
addNode(group, "Vice President of Staplery", "3.42", "27", "Perforator");

group = new Wt::WTreeTableNode("Middle management", 0, root);
addNode(group, "Boss of the house", "9.78", "35", "Happy Animals");
addNode(group, "Xena caretaker", "8.66", "10", "Yellow bag");

group = new Wt::WTreeTableNode("Actual Workforce", 0, root);
addNode(group, "The Dork", "9.78", "22", "Mojito");
addNode(group, "The Stud", "8.66", "46", "Toothbrush");
addNode(group, "The Ugly", "13.0", "25", "Paper bag");

root->expand();


Files

broken.png (26.6 KB) broken.png Patrick Oppenlander, 11/06/2014 12:36 AM
Actions #1

Updated by Koen Deforche about 10 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.3.4
Actions #2

Updated by Koen Deforche about 10 years ago

  • Status changed from InProgress to Resolved
Actions #3

Updated by Koen Deforche almost 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF