I have a TRootEmbeddedCanvas in a GUI application. I give the user the possibility to pop up the canvas editor via a menu entry:
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?
Thanks for any help,
Please try with
TVirtualPadEditor::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.
that works just fine and solves my problem - thank you very much!
(Naively, one would expect the two commands to have the same effect, though.)
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.