Polygrid questions...
Posted: Wed Aug 23, 2023 12:44 pm
I see I have the properties of a polygrid for:
pgColumns -- an array of all column properties
and
pgColumnWidths -- a comma delimited list of widths
There does not seem to be a distinct property just for alignments, such as pgColumnAlignments
What I need to do is change the width and/or alignment of a specific column (that can change which column based on data). I can se no way of doing this other than repopulating the pgColumns array
If I try
set the pgColumnWidths of widget "rwTableview" to "300,75,75,75,75,75,75,75,75"
for example, that seems to have no effect.
If I try to just change one element of the column array, such as
put "300" into tArray[1]["width"]; set the pgColumns of widget "rwTableview" to tArray, it replaces all the other column information (names, etc.) with defaults (as I would expect)
Am I missing some syntax that will allow changing the name, label, width, alignment, or whatever property desired of a single column without touching any of the other column data already set?
Also, polygrid supports the "fixedFirstCol" (true|false) property for a while now. With this set to true, the first column can contain row labels that your want always visible while the grid is scrolled horizontally. Has anyone layered a control on top of the polygrid to act as a resizer for this fixed column? Somehting to (I imagine) change the column width of the first column as the control is move left or right. Does anyone know if your need to turn fixedFirstCol off (false) first and then back on after changing the column width? If someone has build a first column resizer, would you be willing to share it?
pgColumns -- an array of all column properties
and
pgColumnWidths -- a comma delimited list of widths
There does not seem to be a distinct property just for alignments, such as pgColumnAlignments
What I need to do is change the width and/or alignment of a specific column (that can change which column based on data). I can se no way of doing this other than repopulating the pgColumns array
If I try
set the pgColumnWidths of widget "rwTableview" to "300,75,75,75,75,75,75,75,75"
for example, that seems to have no effect.
If I try to just change one element of the column array, such as
put "300" into tArray[1]["width"]; set the pgColumns of widget "rwTableview" to tArray, it replaces all the other column information (names, etc.) with defaults (as I would expect)
Am I missing some syntax that will allow changing the name, label, width, alignment, or whatever property desired of a single column without touching any of the other column data already set?
Also, polygrid supports the "fixedFirstCol" (true|false) property for a while now. With this set to true, the first column can contain row labels that your want always visible while the grid is scrolled horizontally. Has anyone layered a control on top of the polygrid to act as a resizer for this fixed column? Somehting to (I imagine) change the column width of the first column as the control is move left or right. Does anyone know if your need to turn fixedFirstCol off (false) first and then back on after changing the column width? If someone has build a first column resizer, would you be willing to share it?