Xojo ListBox Header

Hello Everyone,

I am using a listbox for one of the projects.
I understand that if we use a Header,

ListBox.HasHeader = True

and label the headers appropriately,

the border at the bottom of the header disappears.

Is there any way to set border at the bottom of the header.

Also if we use the function ListBox.CellBorderBottom, shall it be ListBox.CellBorderBottom that needs to be used
or the ListBox.CellBorderTop that needs to be used, i.e. is the header row considered row 0 or is the lower row considered as row 0.

Thanks,

Gaurav

This has already been reported as a bug.

<https://xojo.com/issue/59370>

@Dale Arends

Hello Dale,

Thanks for the update. I believe this case would take some time to resolve given its Rank in the System.

Can you or anyone think of some temporary way out. I don’t mind even if its a 3rd party solution such as some plugin.

Rg

You could give GraffitiListbox a shot. It uses a custom built header that matches the system style on Windows, macOS, and Linux. It also has a number of additional features.

Hello Anthony,
@Anthony Cyphers

Thanks for the suggestion.
I am trying to use the GraffitiListBox.

Can you help me out with the below two codes that I have, as to how to implement them for GraffitiListBox

ListBox.RemoveAllRows
ListBox.HeaderAt(0) i.e. ListBox.HeaderAt(Column Number)

Please open a support ticket, and I’d be happy to help you out there.

Take a look too to PiDog DataView

You can download the demo and test yourself the impressive list of features and configuration options.

Absolutely awesome, and excellent support from Jim.

+1

I “solved” it by creating a rectangle Control Set with the following code in the control set’s Open event.

Me.Height = 1 Me.FillColor = Color.RGB (192, 192, 192) Me.TopLeftColor = Color.RGB (192, 192, 192) Me.BottomRightColor = Color.RGB (192, 192, 192)
Each listbox needs its own instance from the control set. I then have an instance from the set embedded in each listbox with the following code in the ListBox’s Open event

listRect(0).top = Me.top + Me.HeaderHeight listRect(0).Left = Me.Left + 1 listRect(0).Width = Me.Width - 2

Then, just for visual consistancy, in the listbox’s MouseMove event I have

listRect(0).Invalidate

Probably not the best approach but until the bug is fixed it serves the purpose without a 3rd party solution.