Mergeable Cell Listbox is Now Open Source

Katkosoft is making it’s Mergeable Cell Listbox for desktop open source and freely usable by the Xojo community under the MIT license.

It API 1 code.

The code is available at GitHub - KarenAtk/MergableCellListbox: API 1 Xojo Listbox Subclass that allows merging cells acros

The Mergeable Cell Listbox listbox subclasses allow you to merge cell across rows and columns in a Xojo/REALStudio desktop listbox as well as adds a number of other useful features.

Features Specific To Merging Cells:

• Merging and unmerging of cells across both rows and columns

• Column resizing across merged areas

• Editing text in merged cells

• Rows may be inserted or deleted within merged area that cross rows. The merged area is either expanded or contracted as expected

Hierarchical Listbox Support:

• Optionally draws lines connecting folders and their children with user specified color

  • Enhanced UI for Expanding/Collapsing Folders:

    • Option Click on a closed disclosure widget will open all sublevels
    • SpaceBar toggles disclosure widget
    • Option-SpaceBar will open all sublevels
    • Option-UpArrow closes an open folder
    • Option-DownArrow opens a folder
    • Shift-Option-DownArrow will open all sublevels
  • Provides Methods to:

    • Determine if a row is a folder
    • Return the indent level of a row
    • Open all sublevels of a folder
    • Close all open folders
    • Inhibit the drawing of the horizontal connector line to a child row. Useful for visual grouping when related data is presented in multiple child rows at the same indent level. In other words data for one logical node is displayed in multiple consecutive rows. (See Lot Testing Demo)

Other features:

• Specifying a background color as well as alternating row colors via the inspector

  • Enhanced Support for Multi-line text a cell:
    • Text Wrapping:
      Does NOT simply use g.DrawString with the WrapWidth parameter. Only displays lines that are fully visible and if all text is not displayed last line will have an ellipsis even if that line fits in the cell (ends a paragraph)
    • Editing Multi-Line text (can use return key to start new line)
    • May specify line spacing and horizontal alignment
    • May optionally use a vertical scrollbar for in cell editing

• Allows aligning text (single or multi-line) vertically as well as horizontally in a cell



Awesome, thanks for doing that Karen!

This is great and many thanks Karen! :slight_smile:

BTW out of curiosity has anyone here been using the MergableCell Listbox?


Apparently not here. Not surprising given the listbox class itself is now deprecated.


I downloaded it but as I hardly use Xojo anymore …

But you did well and can certainly be proud of your work. :+1:


Did you look at the code?

It was not intellectually hard to do, but getting all the details right (without having the RB Listbox Source Code) was tedious with lots of details to work out to make a consistent, flexible API that covered most use cases…

To do it for a simple specific case is actually pretty easy, and I know from having seen posts about doing it, some others have used the same type of technique for one off cases.

I never counted, but over 10 years I think I had somewhere between 20 and 25 sales.