I have a quick question about Listboxes. I have seen examples where a control, such as a textfield, radiobuttons, checkbox, textarea, button, etc. has been placed in a cell in a listbox. If this can be done, how can this done dynamically using code? Can you provide some code examples?
Other controls like radio buttons or push buttons will be quite a bit more work but still possible.[/quote]
Andrew. Thanks. And thanks to all the replies. I did watch the video and it did answer part of my question. Andrew, you mention that other controls such as radio buttons and push buttons are possible, but require a bit more work. Can you elaborate on this? I have a need to put several different types of controls in a listbox.
I’m not Andrew, but I’ll elaborate: besides TextField/Area and Checkbox, you cannot put any other controls into a ListBox cell. However, with careful use of the CellBackgroundPaint, CellTextPaint event handlers, you can draw a representation of the control in the cell. And in conjunction with the CellClick, MouseDown, MouseUp event handlers you can make the control react to user interaction.
The “popup” menu in the ListBox (and its example) from the Webinar is an example of one way you might go about this.