ListBox: is this a bug ?

The image below is a screenshot of a ListBox in a window.

I do not do anything to get that white Column. (I do everything to get a bicolor Row background on ALL COLUMNS)

I am able to do that on purpose / reliably.

Is this a bug ?

Set one of the column’s width to * so it will use the remaining space.

Yes, and if I load a text file with tons of columns (but less than 64), I will never have access to the HorizontalScrollBar !

At first, It is a good idea, but in this stressed text, I forgot to add that the ListBox is set to have an HorizontalScrollBar. My fault.

Sorry Thomas.

As stated many times before… the Horz scroll bar on a Listbox will ONLY show up

IF… and only if, the sum of the widths of the columns (without using “") exceeds the width of the list box itself…
If you include a "
” in the column widths it will shrink that column to fit the listbox width, and you will not get the scrollbar.

You must test the overall width of all the columns against the width of the listbox. If it is less than the width of the listbox, set the width of the last row to “*”.

Tim, the horizontal scrollbar is not the problem even if in some cases, I do not need it.

I WANT TO HAVE THE HORIZONTAL SCROLLBAR and I get it.

The white column is still there.

Set a column width to * have a “logical side effect”: you will not get an Horizontal ScrollBar.

So, As Far AS I Understand, no one consider that white column as a bug.

You would only set the column to “*” when a horizontal scrollbar is not needed. Ie., when the combined width of the columns is less than the width of the listbox. Otherwise, you would leave them all fixed width and get a scrollbar.

Tim: thanks a lot for the answers.

Maybe we have the same issue?
Don’t know why this happens but I also get a white “row”…
https://www.youtube.com/watch?v=1MkohqhV7GA

That’s a column :slight_smile:

I have the same issue, and it’s present in the release of Answers. I managed to hide it, but in doing so you can actually resize the last visible column (labeled Answer) to being 0. To work around that I have it check for minimum widths when you resize columns.

This issue has been present since at least 2014r1

Make that 2013r3.3.
Yes I meant column :wink:

Have you ever considered to use percentage (%) instead of pixels.
The columns till 100% are on the screen.
Above 100% will be accessible by scrolling.

In my example I’ve made 4 columns and set them to 40%, 25%, 35% and 60%.
Making the screen wider will not give a white “row”.

I’ve made a example project.
Example project

@Albin Kiland
If you post a video here, why do you forbid the view then?

Oops, I did it too.
It should be white “column”.

In answer to the OP, it is not a bug, the white you are seeing is not a column as you have not defined it as a column, it is nothing, white space (excuse the pun). You are doing your colouring in the cellBackgroundPaint event and the area you are referring to does not contain cells so why would it paint???

Tim’s suggestion/answer above is what you need to do to stretch the last column to the width of the listbox if the sum of the column widths < listbox width.

If you quote the original post, it’s just a youtube link, I suspect esoTalk tried to embed it.

[quote=128426:@Axel Schneider]@Albin Kiland
If you post a video here, why do you forbid the view then?[/quote]
Link to YouTube

It would be painted.

My fault: if I used a 5 lines text file, you should see that empty Rows (I’d better write about the non filled with Rows part of the ListBox, at its bottom) have the bi-colour background.

Albin:

that’s it ! You demonstrate the special white feature !

[quote=128010:@Emile Schwarz]The image below is a screenshot of a ListBox in a window.

I do not do anything to get that white Column. (I do everything to get a bicolor Row background on ALL COLUMNS)

Is this a bug ?[/quote]

Where are you painting the background ? In CellBackgroundPaint or somewhere else ?