Column alignment in desktop listbox

lbTransactions is a desktop listbox with 6 columns on a form in Desktop Xojo 2024 v2.1. (MacOS 14.7.1 Sonoma)

in a method attached to the form that populates the listbox I have the following line:
lbTransactions.ColumnAlignmentAt(2) = DesktopListBox.Alignments.Right

and I get the following compile error:
There is more than one method with this name but this does not match any of the available signatures.
lbTransactions.ColumnAlignmentAt(2) = DesktopListBox.Alignments.Right
with lbTransactions.ColumnAlignmentAt(2) highlighted.

so what am I doing wrong?

TiA

Not sure
I put a desktoplistbox on a desktop window
I gave it 3 columns

In the opening code I have this:

listbox1.addrow "Hello"
listbox1.CellTextAt(0,1) =  "World"
listbox1.ColumnAlignmentAt(1) = DesktopListBox.Alignments.Right

and it works perfectly.
Is the listbox a DesktopListbox?

The Super just says “Listbox”

Changed the Super from Listbox to DesktopListbox and the above error went away but I get a bunch of new ones that say desktoplistbox has no member named…

Probably API1 properties. (API2… grrr)
What are the members?

Or change the super back to Listbox, and use API1 stuff..

Like
ColumnAlignment(1) = listbox.Alignments.Right

1 Like

From the Documentation topic = Using the Xojo Language / Methods :

The method signature (its name, parameters and return type) also appears at the top of the Code Editor for reference.

That means a method may have more than one implementation, that are differentiated by parameters and return type - the name is the same. The error meant “the called method was found, but none of the signature found matches the way you code call it”.

@Jeff_Tullin may be right talking about API1 vs API2.