I have a TRootEmbeddedCanvas in a GUI application. I give the user the possibility to pop up the canvas editor via a menu entry:
case M_EDIT_CANV:
fEcanvas->GetCanvas()->EditorBar();
break;
where fEcanvas is my embedded canvas. This works fine, except when the user clicks the editor away, it is gone forever! The above command will not resurrect the editor, but just do nothing.
What is the correct way to pop up the editor in such a case?
Please try withTVirtualPadEditor::ShowEditor();In addition to that call, the editor is available via the context menu of any drawn object in a canvas if you select SetLineAttributes, SerFillAttributes, SetTextAttributes, or SetMarkerAttributes menu entry. Please let me know in case the problem persists.
You are welcome. I have implemented a few static methods in the abstract editor interface thinking to provide a way for using it via user’s applications (menu, tool bar button, etc.). You can use in addition to ShowEditor(), the HideEditor() to hide it, or Terminate() to cleanup the memory used by the editor.