Setting ListBox..ColumnAt(0).MaxWidthActual

This code works only when I try to resize Column(0) with the Mouse…


Me.ColumnAt(0).MaxWidthActual = 40

What do you expect actually ?

Column(0) width set to 40 pixels.

Try

Me.ColumnAt(0).WidthActual = 40

instead. This sets the Width and not the MaxWidth…

Your statement doesn’t compile here, you need:

  Me.ColumnAttributesAt(0).MaxWidthActual = 40

which will set the maximum allowed width for that column.

Thank you Thomas,

Your answer makes sense Max stands for MAXIMUM ! not current !!!

I overlooked WidthActual !!!

@TimStreater

your statement doesn’t compile here
Different Xojo version because it compiles here.

Thank you.