Actions
Bug #3662
closedWTreeTable doesn't render empty (or whitespace) WText column widgets correctly
Start date:
Due date:
% Done:
0%
Estimated time:
Description
If a column widget in a WTreeTable is set to
setColumnWidget(3, new Wt::WText(""));
the generated html omits a height attribute for the column div.
<div id="o5waupr" style="float:left;width:125.0px;"></div>
This means that any columns to the right float too far to the left.
Normally an empty column looks like this:
<div id="o5waupp" style="float:left;width:125.0px;height:1.0px;"> </div>
Updated by Patrick Oppenlander about 10 years ago
This bug has a workaround.
Use this code when you expect empty text:
// HACK: shouldn't need to set height
Wt::WText *text = new Wt::WText(s);
if (s.empty())
text->setStyleClass("height_1");
setColumnWidget(Column, baytext);
With this CSS somewhere:
/*
* HACK: workaround for empty WTreeTable cell glitch
*/
.height_1 {
height: 1px;
}
Updated by Koen Deforche about 10 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
I believe I might have fixed this already but I'll check
Updated by Koen Deforche almost 10 years ago
- Status changed from InProgress to Resolved
- Target version set to 3.3.4
Thanks, you're right, this still needed fixing.
Updated by Koen Deforche almost 10 years ago
- Status changed from Resolved to Closed
Actions