Hello,
I am trying to adjust size of columns in a listbox trying to mix % and fixed widths
I would like to use the second mode when the user resize the columns, other columns are moved and not resized doc
I have the following code, what I want is that the right most column always keep the same size but if the user enlarge the windows, the column 4 stick to the rightmost part
me.ColumnCount = 5
me.AllowResizableColumns = True
me.ColumnAttributesAt(0).WidthExpression = "20%"
me.ColumnAttributesAt(1).WidthExpression = "20%"
me.ColumnAttributesAt(2).WidthExpression = "20%"
me.ColumnAttributesAt(3).WidthExpression = "20%"
me.ColumnAttributesAt(4).WidthExpression = "100"
me.ColumnAttributesAt(4).MaxWidthExpression = "100"
me.ColumnAttributesAt(4).MinWidthExpression = "100"
There is a gap on the right when I make the window bigger.
But if I set a column width to “*” or empty, I switch to mode 1 and other columns are shrinked when I make a column bigger.
How can I achieve what I am trying to do?
Do I have to calculate percentage in the resized event based on the width of the listbox?
Thank you
8 posts - 4 participants