Header fails to draw in a multicolumn listbox

I have a listbox with 240 columns. Headers stop showing after col 217 as you can see at the top:
link text

Anyone else seen this?

Shooting in the dark here, but try reducing the length of the strings used for the header column text.

I see normal column titles for 240 columns when using the string “Col nnn” in 19r1.1


PS. If this works, can you provide the cumulative length of the strings you use for the headings? Be interesting to see if there’s a hard limit there.[/i]

Admittedly, the headers are fairly long, about 40 chars each.

I tried with 40 char titles and I was not able to horizontally scroll past column 218 either. However the headers did appear to display (at least the ones I could see past col 218).

It would appear to be a problem with the listbox’s horizontal scroller. Suggest making a small example project and include it with a FB report.

Alternatively, you could add a separate horzontal scrollbar and see if that works.

How wide are the columns (in pixels)?

Dunno about Peter’s, but my limited test used 100 for column width.

you need to make sure that the total width of your columns does not exceed 32767 pixels. This is simply a limitation of the listbox control (see <https://xojo.com/issue/41826>).

Guess how many times does it takes to execute this:

[code]Sub Open() Handles Open
Var Loop_Idx As Integer

For Loop_Idx = 1 To 250
LB.ColumnCount = LB.ColumnCount + 1
Me.Column(Loop_Idx).WidthActual = 50 // *

If UserCancelled Then Exit

End Sub[/code]

Without that line, it takes 1 second ? (or less), but only 250 is displayed: all other columns are too small (5 pixels ?) to display anything.

Brand new project, El Capitan, has HorizontalScroll + has Header, everything else: standard (unchanged).

I was just curious.

Ticks: 9143
Seconds: 152.3833

No horizontal ScrollBar (even when one is asked), only 250 in the header.

Hello Emile,
I hope I understand your problem. You can show the 250 columns with the horizontal scrollbar this way:

[code]Var Loop_Idx As Integer

LB.Hasheading = true
LB.ColumnCount = 250

for Loop_Idx = 0 to (LB.ColumnCount - 1)
LB.Column(Loop_Idx).WidthEXpression = “50”

This is not only faster, but the horizontal scrollbar is present ! But that makes my intervention useless.

The idea was to add one character more to the headers at each run to define the max # of characters (possible). Read the first entry.

On the other hand, a .textClipping drop into ListBox1.Open Event Code Editor was rejected !
(I saved my code from the IDE before cancelling the test project and left 19r3).

32767 pixels ring a bell here, and I checked:

You cannot build a Picture with a value larger than 32767…

Var myPict As New Picture(32767, 32767) // This compile Var myPict As New Picture(32768, 32768) // That does not

150 pixels each, with headers @ about 40 chars each. Norm mentioned to me by email that there may be a hard total char limit for all headers combined (in my case about 40 * 240 total chars).

As for the 32K picture limit, Emile’s point may be relevant: 150 pixels/col * 217 cols = 32500, suspiciously close to the 32K picture limit. But then why do the cells render correctly?

And Christian is correct, this very issue has been reported and is known to xojo: <https://xojo.com/issue/41826>

Maybe because they use a trick to display them ?
à la “Display text in Demand”…

PS: the limit for Pictures is really 32767 (good) / 32768 is bad.

add one pixel by column asmargin and you are out ob-f bounds…

Remember that I do not have the Xojo sources, so I can only provide guesses.