I have a curious problem. I have a tree diagram and when a node is right clicked a combo box is displayed with a list of options. After an option is chosen the box is not displayed any longer. However, when the print preview button is pressed and then the print preview window is closed, all the combo boxes that were once displayed are visible again. Any clues as to why this is happening?
How did you make the comboboxes show? Why aren’t you using a ContextMenu (a GoContextMenu) instead?
I created a new GoControl and set the Controltype to my comboboxcontrol class. I will check into using the GoContextMenu, that may make a difference. Thanks,
If you added the instances of GoControl to your GoDocument, and if those GoControl objects (which are GoObjects) are visible, then those ComboBoxes should be visible too. Perhaps you caused the ComboBox to disappear, but as soon as the GoControl is painted again, it will re-create the ComboBox.
You probably wanted to remove the GoControl instance when you were done with the ComboBox. This is what GoView does automatically for the “Editor”, which is an instance of GoControl that is added to a GoView. It provides the framework for in-place editing of GoObjects–for example when a GoText object is edited, depending on the value of GoText.EditorStyle, different kinds of Controls can be added to the view where the “Editor” (the GoControl) is.