Windows 10 Pro 22H2 19045.5371
LibreOffice Version: 24.8.4.2 (X86_64)
I’ve got a subform containing trees structured as adjacency lists. Each tree is linked to one of the records in the main form. The subform records are contained in a table control where the last column is a listbox rather than the usual textbox. The listbox column contains the ID of the record’s parent node. I want the listbox to show only the IDs for the records in the current tree, so the user can only link a child node to a parent node in the current tree.
I know this can be done with a values table, but this may become multi-user and I think a values table is really single-user. I’ve bookmarked ratslinger’s code for inserting values into a table-listbox. However, according to the documentation, a standard listbox has a ListSource property that I can insert an SQL Select into. (The documentation says “ListSource”. The listbox itself says “List content”.) This would be my favored solution, but I don’t know how to get to the ListSource property through the API. The documentation tells me how to do this with a stand-alone listbox, but not a table-listbox, and my experiments have only generated errors.
Does anyone know how to use the API to access the ListSource property in a listbox inside a table control?