Can I catch a wxComboBox?
BlitzMax Forums/Brucey's Modules/Can I catch a wxComboBox?
| ||
I maybe have a wxComboBox on the main wxToolBar that I don't know! If the wxComboBox is there I want to catch it so I can use it! I maybe need start ask if this is possible? My unsuccessful attempt to get the wxComboBox: Local _t:wxToolBarToolBase = TToolbar.FindById(32742) Local _tt:wxComboBox = wxComboBox(_t.GetClientData()) If _tt Then echo "OK :: wxComboBox" Else echo "ERROR :: wxComboBox"So far I only get: ERROR :: wxComboBox |
| ||
Hi, what I use is I store the instance of the combobox upon creation and connect events directly to that instance. So in a way that combobox is like any other independent control. -Henri |
| ||
So there is no way to get the wxComboBox If I know the id? (If there is a way I be happy to learn) Anyhow many Thanks, I solve it like this: I Declare the wxComboBox when the application start then the user script only put out the location for the wxComboBox in the Toolbar (the user can still chose NOT to add the wxComboBox) and Then I can reach the wxComboBox from the application if it's there! The only drawback is that I create a false script function made only for this purpose |
| ||
Did you try FindControl:Local _tt:wxComboBox= wxComboBox(TToolbar.FindControl(32742) ) If _tt Then echo "OK :: wxComboBox" Else echo "ERROR :: wxComboBox" Untested. -Henri |