|
Post by theulimateunltd on Sept 25, 2022 15:03:04 GMT -5
If I make a menu item with Edit it doesn't work. Other menunames will work. For example the Filemenu.
MENU #WIN, "File", "New", SUB100FileNew, "Open", SUB110FileOpen, "Save", SUB120FileSave, _
"Save as", SUB130FileSaveAs, "File Print", SUB140FilePrint, "Print Setup", SUB150FilePrintSetup, _
"Exit", FileQuit
MENU #WIN, "Edit", "Undo", SUB160EditUnDo, "Cut", SUB170EditCut, "Comment toggle", SUB180EditComments, _
"Copy", SUB190EditCopy, "Paste", SUB200EditPaste
Please tell me howto proceed.
|
|
|
Post by xxgeek on Sept 25, 2022 18:27:33 GMT -5
You didn't open the window, so you are only seeing the mainwin. Use nomainwin to NOT show the mainwin, (unless you WANT to see it too) Open a window ..........#WIN Then trapclose the #WIN so it doesn't hang when trying to close the program.
Example
nomainwin
MENU #WIN, "File", "New", SUB100FileNew, "Open", SUB110FileOpen, "Save", SUB120FileSave, _ "Save as", SUB130FileSaveAs, "File Print", SUB140FilePrint, "Print Setup", SUB150FilePrintSetup, _ "Exit", FileQuit
MENU #WIN, "Edit", "Undo", SUB160EditUnDo, "Cut", SUB170EditCut, "Comment toggle", SUB180EditComments, _ "Copy", SUB190EditCopy, "Paste", SUB200EditPaste open "AnyName" for window as #WIN #WIN "trapclose [quit.WIN]" wait
[quit.WIN] close #WIN end
|
|
|
Post by theulimateunltd on Sept 26, 2022 1:15:56 GMT -5
Thank you xxgeek for the quick reply. If I put the texteditor in the original edit menu can't be used.
nomainwin
MENU #WIN, "File", "New", SUB100FileNew MENU #WIN, "Edit", "Undo", SUB110EditUndo MENU #WIN, "Edit.", "Undo", SUB110EditUndo TEXTEDITOR #WIN.EDT, 0, 0, DisplayWidth, DisplayHeight open "AnyName" for GRAPHICS as #WIN #WIN "trapclose [quit.WIN]"
wait
SUB SUB100FileNew NOTICE "I'm in FileNew" END SUB
SUB SUB110EditUndo NOTICE "I'm in EditUndo" END SUB
[quit.WIN] close #WIN end
|
|
|
Post by Rod on Sept 26, 2022 2:13:21 GMT -5
A graphics window is for drawing, a graphicbox is for a drawing control on other window types. So a texteditor in a graphics window is not usual. In any event the texteditor control creates its own edit menu and perhaps needs removed. See if this thread helps. But firstly think why you use a graphic control to manage text. libertybasiccom.proboards.com/thread/1535/remove-menu-bar-text-window
|
|
|
Post by xxgeek on Sept 26, 2022 10:15:42 GMT -5
Using the word "Edit" in the menu is an issue since texteditors automatically place an "Edit" in the menu.Use a "window" window with a graphicsbox instead of a "graphics" window. And instead of "Edit" use " Edit" - notice the space Nobody will notice the space. And the original "Edit" still works.
Hope this helps. It's all I can com up with as a work around. Example
nomainwin
MENU #WIN, "File", "New", SUB100FileNew MENU #WIN, " Edit", "Undo", SUB110EditUndo MENU #WIN, " Edit", "Undo", SUB110EditUndo graphicbox #WIN.EDT, 0, 0, 0, 0 TEXTEDITOR #WIN.EDT, 0, 0, DisplayWidth, DisplayHeight open "AnyName" for window as #WIN #WIN "trapclose [quit.WIN]"
wait
SUB SUB100FileNew NOTICE "I'm in FileNew" END SUB
SUB SUB110EditUndo NOTICE "I'm in EditUndo" END SUB
[quit.WIN] close #WIN end
|
|