Hi,
i posted about this issue last week: http://forums.smartclient.com/showthread.php?t=15595
The problem
------------
I am looking for a layout component that natively supports row and column spanning. Basically a SmartGWT equivalent of an HTML table when used for layout purposes. This component should:
- allow number of rows and columns to specified (explicitly or not)
- manage both row heights and column widths in order to keep tabular appearance intact.
Row height = largest height of component in this row.
Column width = largest width of component in this column
- allow any arbitrary Canvas to be included at an x (column), y (row) positioned cell
- allow any cell to span rows and columns, with row and column integrity kept intact
Suggestions and research thus far
---------------------------------
3 suggestions were made: (thank you for these)
1. Make use of DynamicForm and CanvasItems. CanvasItem allows specification of row and column spanning by way of FormItem and can display an arbitrary Canvas, not necessarily editing anything.
Problems with this approach:
The CanvasItem effectively takes up 2 columns in the DynamicForm layout, 1 for the label, 1 for the CanvasItems' associated Canvas. Hiding of all the label portions of these CanvasItems was difficult. I could never completely hide the label portion of the CanvasItem, even explicitly setting its width. This also resulted in a non pixel perfect layout of the CanvasItems Canvas objects. I also experienced issues with unwanted scrollbars (on resizing the window smaller scroll bars would appear, then resizing the window smaller still caused them to disappear), even though my widths / heights had been set appropriately.
2. Experiment with ListGrid and recordComponents.
Problem with this approach:
The ListGrid component only appears to allow spanning in column/row header context and cannot be used as a top level layout manager. It manages layout/grouping of rows/columns of data bound by a DataSource, not abitrary Canvas's that can span both rows and columns.
3. Experiment with nested HLayout and VLayout containers to achieve row and col spanning.
Problem with this approach:
This is the closest i have come to a potential solution. If we remember that my desired functionality is a tabular layout manager that manages both rows and columns. For combinations of HLayout and VLayout components, in order to replicate any form of widget width consistency in each column and widget height consistency in each row, tight bespoke control of all component widths and heights is required. If any components are required simply to size according to their content (i.e. no explicit width or height set), this approach falls down and the facade of a table with managed columns and rows disintegrates.
The Questions
-------------
Is there a SmartGWT 2.4 component that provides this desired layout behaviour?
If not, has there been any work done in the community to create such a layout component?
Any help would be greatly appreciated. The alternative is to write my own GridLayout manager which i would be glad to contribute back to the community. Any help or input will be valued.
Thanks
Manny31
i posted about this issue last week: http://forums.smartclient.com/showthread.php?t=15595
The problem
------------
I am looking for a layout component that natively supports row and column spanning. Basically a SmartGWT equivalent of an HTML table when used for layout purposes. This component should:
- allow number of rows and columns to specified (explicitly or not)
- manage both row heights and column widths in order to keep tabular appearance intact.
Row height = largest height of component in this row.
Column width = largest width of component in this column
- allow any arbitrary Canvas to be included at an x (column), y (row) positioned cell
- allow any cell to span rows and columns, with row and column integrity kept intact
Suggestions and research thus far
---------------------------------
3 suggestions were made: (thank you for these)
1. Make use of DynamicForm and CanvasItems. CanvasItem allows specification of row and column spanning by way of FormItem and can display an arbitrary Canvas, not necessarily editing anything.
Problems with this approach:
The CanvasItem effectively takes up 2 columns in the DynamicForm layout, 1 for the label, 1 for the CanvasItems' associated Canvas. Hiding of all the label portions of these CanvasItems was difficult. I could never completely hide the label portion of the CanvasItem, even explicitly setting its width. This also resulted in a non pixel perfect layout of the CanvasItems Canvas objects. I also experienced issues with unwanted scrollbars (on resizing the window smaller scroll bars would appear, then resizing the window smaller still caused them to disappear), even though my widths / heights had been set appropriately.
2. Experiment with ListGrid and recordComponents.
Problem with this approach:
The ListGrid component only appears to allow spanning in column/row header context and cannot be used as a top level layout manager. It manages layout/grouping of rows/columns of data bound by a DataSource, not abitrary Canvas's that can span both rows and columns.
3. Experiment with nested HLayout and VLayout containers to achieve row and col spanning.
Problem with this approach:
This is the closest i have come to a potential solution. If we remember that my desired functionality is a tabular layout manager that manages both rows and columns. For combinations of HLayout and VLayout components, in order to replicate any form of widget width consistency in each column and widget height consistency in each row, tight bespoke control of all component widths and heights is required. If any components are required simply to size according to their content (i.e. no explicit width or height set), this approach falls down and the facade of a table with managed columns and rows disintegrates.
The Questions
-------------
Is there a SmartGWT 2.4 component that provides this desired layout behaviour?
If not, has there been any work done in the community to create such a layout component?
Any help would be greatly appreciated. The alternative is to write my own GridLayout manager which i would be glad to contribute back to the community. Any help or input will be valued.
Thanks
Manny31
Comment