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



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:


Awesome news and many thanks Karen!

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.