Mixing fixed column sizes and percentages in NatTable property editor? [message #1763409] |
Mon, 15 May 2017 13:20 |
|
In Papyrus-RT I am working on the presentation of triggers of a state machine transition in the Properties View using the NatTable-based property editor from Papyrus, appropriately named the NattablePropertyEditor.
In the table model describing this table, I define four columns with percentage sizing styles (IntValueStyle named 'axisWidth') from left to right: 10, 30, 30, 30. These add up to 100. The table has the 'columnsWidthAsPercentage' boolean style set.
This works as expected, but doesn't quite suit my needs. The left-most column in my table shows icons for the elements presented in the rows. I don't want it to be sized proportionally. A fixed width would be more appropriate, to give just enough column width to show the icon.
Is there a way to mix relative and absolute column sizing in the Papyrus NattablePropertyEditor? I know that the Nebula NatTable widget does support percentage sizing on/off for individual columns. However, when I try with this table configuration in Papyrus to override the width of my icon column by turning off percentage sizing for it, then the rest of the column layout doesn't seem to understand that this has happened and the result is an unsightly gap to the right of the last column, as shown in the attached image.
This is on the latest Papyrus Oxygen nightly builds before M7.
|
|
|
Re: Mixing fixed column sizes and percentages in NatTable property editor? [message #1763419 is a reply to message #1763409] |
Mon, 15 May 2017 14:24 |
|
Hi Chirstian,
Nowadays, there is no way to mix between relative and absolute column sizing into Papyrus Table.
The columns are managed by percentage when the 'columnsWidthAsPercentage' NamedStyle is applied in the Table.
I understand your needs, but, actually, there is no way to manage it differently.
Only two ways are available for the resize feature:
- By percentage, this might be always respected (when resize, ALL the columns are resized)
- By width pixels, columns are not resized
But, as well, This will be a nice enhancement for the future.
Regards,
Nicolas.
|
|
|
Re: Mixing fixed column sizes and percentages in NatTable property editor? [message #1763420 is a reply to message #1763419] |
Mon, 15 May 2017 14:33 |
|
Thanks, Nicolas.
I've tried again without the percentage style so that I can specify the best initial width for the first column, and the default calculated widths for the other columns don't quite fill out the width of the table. There is still a gap, though not nearly as much as in my first attempt, and the user can resize the columns however she wants to make them best fit.
So, I think this is probably the best solution for me in the Oxygen release.
Cheers,
Christian
|
|
|
Powered by
FUDForum. Page generated in 0.03230 seconds