ListBox.TypeCheckbox for NSTableView and API 2

What is the API 2 replacement for the following code

me.ColumnType(3) = ListBox.TypeCheckbox

when using NSTableViewMBS?

me.ColumnType(3) = Listbox.CellTypes.CheckBox

makes an error message “doesn’t match available signatures”.

Working through all the replacements I need to do then I really would like to see API 2 support for NSTableView.


@Christian Schmitz : can you have a look?

Another stupid question: how do I change the DefaultRowHeight? Changing the value does absolutely nothing.

Why do you try to use API 2 things with NSTableViewMBS class?

For height, return the right height in heightOfRow event.

I’m trying to replace ListBox.TypeCheckbox because it’s flagged as deprecated. I also had real problems yesterday remembering how to use API 1.

Got the RowHeight fixed.

Next problem: How do I change the vertical alignment of the cells? The text is a bit too high when I have a RowHeight of 30:


me.ColumnTypeAt(3) = Listbox.CellTypes.Checkbox

is what you need.

@Tim Streater: the code makes an error “doesn’t match available signatures” as I wrote at the top. NSTableview is not identical to a listbox.


ColumnType -> ColumnTypeAt
not do it?

Was having a senior moment as usual. Listbox.CellTypes.Checkbox is a type and ColumnType is a method. That can’t work. I simply added my own enumeration and now I can use

me.ColumnType(3) = Integer(ListBoxTV.myCellTypes.Checkbox)

Which isn’t as pretty as using Celltypes.Checkbox but it’s good enough.

Now I only need to fix the problem with the vertical alignment.