Zeus
April 1st, 2011, 18:38
Hey All
I am working on updating my 4E Tables extension at the moment and have been looking to introduce variable table column widths based upon the current size of the window. This so that the table columns scale proportionally when windows are re-sized thus ensuring the table columns make use of all available window real estate.
The Table windows are dynamic in size and thus allow users control over resizing the window. I have all the main controls re-positioning and scaling in anchored width just fine, however I am having trouble with windowlists, in particular windowlists set to output from left to right as opposed from top to bottom, in other words windowslists with column based output using the <fillwidth> option.
Let me explain a little more.
- Each table implements a windowlist for the table's rows.
- Each row contains another windowlist for the row's column data.
The windowlist in each row (for the row's column data) is defined statically in XML and set for column based output with the <fillwidth> tag set.
Within LUA script I am detecting when the main window is resized and then triggering the re-positioning and scaling (width) of controls based upon the current windowsize.
My challenge: How to dynamically adjust the <width> of the columns of the windowlist.
1. There doesn't appear to be a method for changing this in LUA script. e.g. mywindowlistcontrol.setColumnWidth(colwidth).
2. I have tried updating the <width> definition by using the following statement in a LUA script:
mywindowlistcontrol.columns[1].width[1] = newcolumnwidth;
The latter works in so much that the <width> value is set, but the windowlist doesn't update to reflect the change.
Is there a way to force FGII to re-draw the windowlist thus using the new <width> value for the columns?
I am looking to the community for any suggestions or pointers as someone may have already figured this out before I raise a request for the devs to add a setColumnWidth(colwidth) method to the standard LUA API.
Anyone?
I am working on updating my 4E Tables extension at the moment and have been looking to introduce variable table column widths based upon the current size of the window. This so that the table columns scale proportionally when windows are re-sized thus ensuring the table columns make use of all available window real estate.
The Table windows are dynamic in size and thus allow users control over resizing the window. I have all the main controls re-positioning and scaling in anchored width just fine, however I am having trouble with windowlists, in particular windowlists set to output from left to right as opposed from top to bottom, in other words windowslists with column based output using the <fillwidth> option.
Let me explain a little more.
- Each table implements a windowlist for the table's rows.
- Each row contains another windowlist for the row's column data.
The windowlist in each row (for the row's column data) is defined statically in XML and set for column based output with the <fillwidth> tag set.
Within LUA script I am detecting when the main window is resized and then triggering the re-positioning and scaling (width) of controls based upon the current windowsize.
My challenge: How to dynamically adjust the <width> of the columns of the windowlist.
1. There doesn't appear to be a method for changing this in LUA script. e.g. mywindowlistcontrol.setColumnWidth(colwidth).
2. I have tried updating the <width> definition by using the following statement in a LUA script:
mywindowlistcontrol.columns[1].width[1] = newcolumnwidth;
The latter works in so much that the <width> value is set, but the windowlist doesn't update to reflect the change.
Is there a way to force FGII to re-draw the windowlist thus using the new <width> value for the columns?
I am looking to the community for any suggestions or pointers as someone may have already figured this out before I raise a request for the devs to add a setColumnWidth(colwidth) method to the standard LUA API.
Anyone?