Example for deriving from ListboxItem?
Posted: Wed Jan 22, 2014 17:13
Dear readers,
I've already figured out how to create a fully customized ItemEntry with all kind of combined childwindows for use in ItemListbox, the wiki example for the checkbox was quite helpful.
It was confusing with both these Listbox types and their different itemtypes at first, but I'm past that confustion now
Now I'm trying to figure out how to create a custom ListboxItem (like ListboxTextItem) for use in Listbox and MultiColumnList.
It seems to me this variant is quite more low-level implented, e.g. there is no easy way to just "reuse" or attach existing child widgets (checkboxes, editboxes, ..) to it, right?
I've gone through the code of ListboxItem and ListboxTextItem and I've created my own class deriving from ListboxItem.
I had to at least implement the abstract methods draw(...) and getPixelSize().
Now my code compiles but I'm a bit stuck how to implement the mentioned methods correctly to show up a checkbox, an image, an editbox and so on and to make them even interactable to the user.
Is there any example how to create a more custom ListboxItem for ListBox/MultiColumnList?
It makes me sad to see this wonderful MultiColumnList widget being stuck with just the simple ListboxTextItem
Thanks.
PS: I know I can use the embedded tagging to show up an image in a MultiColumnList cell, but I'd like to have more than just images.
Here's a list with forum threads more or less linked to this topic:
viewtopic.php?f=2&t=6233&p=29529&hilit=ListboxItem#p29529
viewtopic.php?f=2&t=4762&p=22527&hilit=ListboxItem#p22527
viewtopic.php?f=2&t=4574&p=21412&hilit=ListboxItem#p21412
viewtopic.php?f=2&t=4208&p=19364&hilit=ListboxItem#p19364
viewtopic.php?f=2&t=3885&p=17757&hilit=ListboxItem#p17757
viewtopic.php?f=2&t=3656&p=16468&hilit=ListboxItem#p16468
viewtopic.php?f=2&t=1146&p=6320&hilit=ListboxItem#p6320
viewtopic.php?f=2&t=770&p=4495&hilit=ListboxItem#p4495
viewtopic.php?f=2&t=567&p=3609&hilit=ListboxItem#p3609
I've already figured out how to create a fully customized ItemEntry with all kind of combined childwindows for use in ItemListbox, the wiki example for the checkbox was quite helpful.
It was confusing with both these Listbox types and their different itemtypes at first, but I'm past that confustion now
Now I'm trying to figure out how to create a custom ListboxItem (like ListboxTextItem) for use in Listbox and MultiColumnList.
It seems to me this variant is quite more low-level implented, e.g. there is no easy way to just "reuse" or attach existing child widgets (checkboxes, editboxes, ..) to it, right?
I've gone through the code of ListboxItem and ListboxTextItem and I've created my own class deriving from ListboxItem.
I had to at least implement the abstract methods draw(...) and getPixelSize().
Now my code compiles but I'm a bit stuck how to implement the mentioned methods correctly to show up a checkbox, an image, an editbox and so on and to make them even interactable to the user.
Is there any example how to create a more custom ListboxItem for ListBox/MultiColumnList?
It makes me sad to see this wonderful MultiColumnList widget being stuck with just the simple ListboxTextItem
Thanks.
PS: I know I can use the embedded tagging to show up an image in a MultiColumnList cell, but I'd like to have more than just images.
Here's a list with forum threads more or less linked to this topic:
viewtopic.php?f=2&t=6233&p=29529&hilit=ListboxItem#p29529
viewtopic.php?f=2&t=4762&p=22527&hilit=ListboxItem#p22527
viewtopic.php?f=2&t=4574&p=21412&hilit=ListboxItem#p21412
viewtopic.php?f=2&t=4208&p=19364&hilit=ListboxItem#p19364
viewtopic.php?f=2&t=3885&p=17757&hilit=ListboxItem#p17757
viewtopic.php?f=2&t=3656&p=16468&hilit=ListboxItem#p16468
viewtopic.php?f=2&t=1146&p=6320&hilit=ListboxItem#p6320
viewtopic.php?f=2&t=770&p=4495&hilit=ListboxItem#p4495
viewtopic.php?f=2&t=567&p=3609&hilit=ListboxItem#p3609