Ext TableView Width
Added by Gianluca Sorrentino over 14 years ago
Hello,
the ext tableview component is driving me crazy in the try of resize it to a percentage value. It goes to take about 10.000 px.
I've a wcontainer widget with a grid layout with 2 columns. the 2nd has a stretch of 100% and contains a container widget with css overflow property set to auto where i've placed my tableview.
If i don't resize the tableview, the widget takes a width of 9900px (Causing parent enlarge)!!!
THIS IS THE EXPECTED WIDGET STRUCTURE
__________________________________________ |
| | ______________________ ||
| SEARCH PARAMS | | SEARCH RESULTS TABLE | ||
| | | | ||
| | | | ||
| | | | ||(PAGE BORDER)
| | | | ||
| | |______________________| ||
|_______________|__________________________||
|
THIS IS THE RENDERED WIDGET STRUCTURE
___________________________________________|______________________
| | _________________________|____________________ |
| SEARCH PARAMS | | SEARCH RESU|LTS TABLE | |
| | | | | |
| | | | | |
| | | |(PAGE BORDER) | |
| | | | | |
| | |_________________________|____________________| |
|_______________|___________________________|______________________|
|
What shall i do?!?
Thanks in advance
Replies (4)
RE: Ext TableView Width - Added by Gianluca Sorrentino over 14 years ago
Sorry, i missed to say that if i try to resize the tableview to a percentage factor, the component is rendered with 8px width!!
Thanks
Gianluca Sorrentino
RE: Ext TableView Width - Added by Koen Deforche over 14 years ago
Hey Gianluca,
The Ext widgets only support pixel-based sizing, and a component such as Ext::TableView needs either to be given an explicit size (width and height) or needs to be set in a layout manager.
Why don't you add the Ext::TableView as a child directly to the grid ? This will work with Wt >= 3.1.0
Regards,
koen
RE: Ext TableView Width - Added by Gianluca Sorrentino over 14 years ago
Hi Koen,
thank you for your reply. I've tried to add the Ext::TableView to the grid layout manager directly but the widget size seems to be handled as it is the only widget in the layout manager. (the table view takes the size of the entire layout manager)
Following your suggestion i've encapsulated the tableview in an other widget, with a grid layout with just the tableview inside, obtaining what i was searching for.
I hope this may help someone with the same problem.
Regards,
Gianluca.