Question

I have a TreeView whose columns are all expandable with fixed-mode sizing. I would like to restore the widths of the columns when the user restarts the app. It seems that calling set_fixed_size is the way to do this, but:

  • If I set only the widths of the columns that the user resized, then the actual column widths end up different from what they were before.
  • If instead I set all column widths explicitly, then all columns behave as though they had been resized by the user, which is not ideal.

Is there a way to restore the column widths that gets around these problems?

Was it helpful?

Solution

It turns out that expand interferes with fixed_width. In my case, the solution was to set fixed_width and expand=false on columns that the user resized, and expand=true on the others.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top