I do not know, but as you can see the last column have nothing in it nor in the Header.
BTW: I forgot to mention that the text placed in that out of bounds column is lost when another row is selected (and this does not happens on other columns).
Also, I’ve set fixed values to each columns and that last Column is resized if I resize the window; the horizontal scrollbar appears only when the window bound is in MY last Column (teh real last column).
At last, it is very easy to re-create the trouble:
add a ListBox to the window,
set the column count to 7 (any other value is fine, I found it with other data (less columns),
fill the column widths with fixed (not variable, no *) amount of pixels
run.
I really feel this is a bug. But it is too incredible to be true.
Just tried it, and this doesn’t happen to me. That’s my code in the listbox’s open event:
// In the
For i As Integer = 0 To Me.ColumnCount - 1
Me.ColumnType(i) = Listbox.TypeEditable
Me.Column(i).WidthExpression = "100"
Next
The area right of the last column is not editable.
Of course I added data to the listbox and enlarged the window (“The area right of the last column is not editable”). I still suspect that you have one column too much.
I found the culprit. Read the whole story with project and app in “ListBox New Feature”.
The problem lies when setting LB.Heading. Valid LB.Heading.
(it may be LB.Heading(-1) = “String with Tab separators” I do not know / not tested / I just think at that)
You can then see a faked column (you CANNOT press its Header) that fills the space between the last valid column (you can press its Header). If you do not fills the Header (like above), you will get a true empty space instead of this “fake Column”.
Download the project and see by yourself. The project example have been created from scratch and use “new code”: no code nor atom from the “main project” have been used in that example. I do not even load the original project to copy code / element or refresh my memory on how I wrote it. I only took code from the docs (Double Click) and wrote the rest of the code (so few code).
The other link holds the application who displayd the Return pass thru, displays what I’ve done for the Edit Cells, Insert Row, set Row text to Red if Cell(Row,0) is empty, etc.
I think we’re misreading each other (or its just me:)
The code I posted is correct as far as 0/1 basedness; it shows a 2 column Listbox have an editcell appear in the nonexistent 3rd column.
In another thread you mentioned this is a ‘free space’ column which needs to be there for CellBackgroundPaint to fire. I can see that, that the internals tack on a column to homogenize handling free-space, still I consider being able to editcell there a bug. A pretty minor bug though, only present when the coder makes a mistake.