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

-Karen

17 Likes

BTW I originally wrote the first version of that about 10-11 years ago, and only had to make small modifications to over the years to keep it working.

I know the code is not exactly up to professional standards and may seem bit convoluted in places … but it works! :wink:

-Karen

Awesome news and many thanks Karen!

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

-Karen

I think the URL for GitHub does not work anymore…

Just tried it and it does.

-Katen

I am using it for one of my in-house project for merging cells. Hope some day you can convert it to API 2 compatible.

strange… it is working now…

Right now i have no plans for doing that…

The DesktopListbox has enough differences that I don’t know if it would be practical or too much work…

I originally wrote my Listbox subclass over 11 year ago (it only needed minor tweaks to keep it working over the years), but I recall it was a lot of work to try and get everything as “right” as I could.

In the future if I personally need an API 2 version I would take a look at it… but that would only be after the the API 1 listbox would no longer be useable… which I hope is at least 5 years way, and preferably longer…

-karen

1 Like

I guess my curiosity has been satisfied.

With it being API 1, and the listbox it is based on now being deprecated, it’s understandable that very few are using it even though it’s free.

Back over 11 years ago when i first wrote it, I was pretty proud of it!

-karen