Subclass Listbox in Objo

First try at converting a XOJO program of OBJO and I am trying to subclass a listbox. The documentation doesn’t include listbox as subclass-able. I’m wondering if I’ve missed something.

Hi,

Create a Class and change type “Super:” to ListBox

I placed a listbox on the window and have created a separate listbox class (cListbox). I can’t find a way to set the super on the window from Listbox to cListbox. I tried dropping the subclass listbox on the window but get a runtime exception 'Cannot instantiate abstract class cListbox. There’s a lot to like in Ojbo but I’m struggling to navigate after years of XOJO.

It looks like I had the abstract class checkmark set. Another baby step.

Hi,

try example here: https://limewire.com/d/9Nzm2#yCjUQ1fF7R

Thanks, my mistake was thinking I could add a listbox to the window and change the super. Once I dragged the listbox class to the window (and click off abstract) things started working. I’m enjoying Objo but must admit I’m having trouble getting used to the editor.

Thanks for trying out Objo Jim.

Yes you can subclass any other class including built-in controls.