I have set the editor style on one of my gotext objects to ComboBox.
I’d like to set additional attributes on that ComboBox. Specifically, I’d like to set:
I looked at the Editor property on the Gotext to obtain the GoControl associated with the combobox (once I set the EditorStyle), but the Editor property is set to null.
I overrode CreateEditor and call MyBase.CreateEditor(view) but I don’t see any attributes on the returned GoControl that point to the ComboBox instance. I can see the combobox type information but not the instance. Thoughts?
Public Overrides Function CreateEditor(ByVal view As Northwoods.Go.GoView) As Northwoods.Go.GoControl
Dim thisGoControl As GoControl
thisGoControl = MyBase.CreateEditor(view)
Dim thisControl As Control = thisGoControl.FindControl(view)
After the call to FindControl thisControl is null (nothing in VB).
I also tried this:
Dim thisComboBox as ComboBox = ctype(thisGoControl.FindControl(view), ComboBox)
thisComboBox was null as well.
The documentation for FindControl says that it will return null if GetControl hasn’t been called. Could this be the case?