Listbox expert needed!

I am really struggling with the listbox and not even sure if what I want to do is achievable with the standard listbox even.

I can’t find anywhere in the LR whether you can have different number cells and columns in the same listbox?

I want to do something like below, is this possible?

Thanks in advance.

WwLooks like a report.

is it possible? yes
is it supported directly by the standard listbox control? no
is it easy to replicate? no

Karen has a Mergable Listbox class,

but depending on what your desired result is… perhaps a custom canvas would be in order…

[quote=469326:@Dave S]is it possible? yes
is it supported directly by the standard listbox control? no
is it easy to replicate? no

Karen has a Mergable Listbox class,

but depending on what your desired result is… perhaps a custom canvas would be in order…[/quote]

Thanks Dave,

Ignoring the last column with split rows, is it even possible to have the text in the first column overflow into the second column? I could “make do” if I could just have a row flow over the top of the others like in my mock up.

sure… just have each CellPaint event draw 1/2 of the text

Or the full text each, just manage the starting offsets.

Yes it is possible. Doing that type of thing is exactly what motivated be to subclass step listbox to do that.

My website will be gone soon but right now it is still working:
http://www.katkosoft.com/Mergeable%20Listbox%20Page/MergeableCellListbox.html

The Demo has some old code that won’t compile because of changes in the language but classes themselves still work, though they are not Retina nor Dark mode aware.

-Karen

Another alternative you can consider is piDog’s DataView class. It is pure Xojo code built upon a canvas, not subclassed from a ListBox. So it was able to implement TONS of stuff not easily supported by the standard Listbox class. I originally got it so I could handle column and row spans, and locked columns on the left. But since my original need, I have found it useful in so many other cases.

No vested interest; just a happy user.

Thanks Douglas.

It’s looking like I need this or some other commercial software to do what I want.

Shame as I was hoping to do it in code as the app is a freebie.

[quote=469338:@Douglas Handy]Another alternative you can consider is piDog’s DataView class. It is pure Xojo code built upon a canvas, not subclassed from a ListBox. So it was able to implement TONS of stuff not easily supported by the standard Listbox class. I originally got it so I could handle column and row spans, and locked columns on the left. But since my original need, I have found it useful in so many other cases.

No vested interest; just a happy user.[/quote]

Well, since licensing (I did the source code version) I’ve found reasons to use it in numerous applications. The time it has saved me from having to roll some other solution has been cost effective for me. Just like several other things I license such as the MBS plugins, Einhugur, GrafittiSuite, etc.

Even though I could code many of the things I use, some things are just worth it because they not only have the features I needed immediately at the time, but other features that may be useful later. And version changes needed to stay current with things like 64-bit support, underlaying OS api changes or features like dark mode, etc.

Whether you find it cost effective for a single application may depend on what you think your time is worth.

I do appreciate the value of the product, it’s just that at the moment I can’t justify spending on lots of plugins when I’m only “playing” with Xojo whilst learning. If I ever started coding in earnest then for sure I’d pay out for them all.

[quote=469376:@Douglas Handy]Well, since licensing (I did the source code version) I’ve found reasons to use it in numerous applications. The time it has saved me from having to roll some other solution has been cost effective for me. Just like several other things I license such as the MBS plugins, Einhugur, GrafittiSuite, etc.

Even though I could code many of the things I use, some things are just worth it because they not only have the features I needed immediately at the time, but other features that may be useful later. And version changes needed to stay current with things like 64-bit support, underlaying OS api changes or features like dark mode, etc.

Whether you find it cost effective for a single application may depend on what you think your time is worth.[/quote]

Does it actually need to be a listbox (ie editable cells clickable cells etc) ?
Or is it “read only” ?

[quote=469380:@Norman Palardy]Does it actually need to be a listbox (ie editable cells clickable cells etc) ?
Or is it “read only” ?[/quote]

Ideally yes but not necessarily I guess. What were you thinking?

an htmlviewer with an html table in it
you can do row spans and column spans in html fairly easily

@Rod Pascoe here is quick solution. you must update the code as you need (it was written in less than 15 minutes so you can improve it - at least the way you add values)

Rod.xojo_binary_project

When using Dropbox you need to change the last part of the url from ?do=0 to ?raw=1 to display it

[quote=469449:@Alberto DePoo]

When using Dropbox you need to change the last part of the url from ?do=0 to ?raw=1 to display it[/quote]

How have you done that Alberto?

He was merely fixing @Eduard Schlecht 's image. Eduard is the one who implemented the project for you.

Ah, didn’t spot that! Thanks, was looking on my phone.

@Alberto DePoo Thanks for the tip. I didn’t know that. I also hope that i will remember it :slight_smile: