how to fill ComboBoxes with images and SelectionBox with complex objects
Added by Norman Hampel about 2 years ago
Hi everyone,
first and foremost my apologies for posting what must be silly questions to most of you. I am quite a novice when it comes to programming but I'm doing my best to get into it :)
I have programmed a neat little GUI and would like to bring it to live with some functionality now. I need to fill ComboBoxes with images (color selection / line type selection, etc.) and, more importantly fill a SelectionBox (or possibly a TableView) with objects from a database. I want to be able to add/remove items from the SelectionBox/TableView and selecting an item must display its properties (i.e. color etc.).
I have been able to do most of that based on text entries but not with complex objects and am stuck there. I would greatly appreciate a hint as to what is the best way to go about this.
Thanks ever so much in advance!
Norman
p.s. I added a screenshot of the GUI for illustrative purposes.
Screenshot.png (123.2 KB)
Replies
RE: how to fill ComboBoxes with images and SelectionBox with complex objects - Added by Norman Hampel about 2 years ago
Ok I think I figured out how to manage complex objects with a selection box. Combobox issue still unsolved though, any hint would be much appreciated.
Many thanks in advance!
Norman
RE: how to fill ComboBoxes with images and SelectionBox with complex objects - Added by Wim Dumon about 2 years ago
afaik WComboBox and WSelectionBox only support strings, because they map directly to the HTML <select> element.
RE: how to fill ComboBoxes with images and SelectionBox with complex objects - Added by Norman Hampel about 2 years ago
Ok, I'll have to find an alternative to the ComboBox then. Thanks for the info, mate!
Norman