| View previous topic :: View next topic |
| Author |
Message |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Sat Jan 25, 2003 8:07 pm Post subject: Show and Hide main menus with ssmenu ? |
|
|
Hi,
is there a way to show back a main menu (ex. File) after
hiding with ssmenu.dll ?
Thanks,
Bye, Fabian |
|
| Back to top |
|
 |
Tsunami1988 Contributor


Joined: 15 Aug 2002 Posts: 70 Location: The Netherlands
|
Posted: Sat Jan 25, 2003 8:14 pm Post subject: |
|
|
Just use
| Code: | | menu insertmenu,menu handle,new menu position,menu item number,menu text |
it worked for me, I tried it on the Demo. |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Sun Jan 26, 2003 11:01 am Post subject: Show and Hide main menus with ssmenu ? |
|
|
Hi,
thanks for your answer.
I am using this code too to insert menus as submenus.
But i want to display a main menu (File, Edit, Help, ...).
Is there a way ?
I am using this code:
%%menuBar = @menu(menubarid)
%%dateiMenu = @menu(getsubmenu,%%menubar,0)
%%administrationMENU = @menu(hidemenu,%%menubar,2)
%%einstellungenMENU = @menu(hidemenu,%%menubar,1)
menu insertmenu,%%administrationMENU,%%menuBar,1,Administration
menu insertmenu,%%dateiMenu,%%einstellungenMenu,3,&Einstellungen
But I cannot show back the AdministrationMENU.
Bye, Fabian |
|
| Back to top |
|
 |
Tsunami1988 Contributor


Joined: 15 Aug 2002 Posts: 70 Location: The Netherlands
|
Posted: Sun Jan 26, 2003 11:23 am Post subject: Re: Show and Hide main menus with ssmenu ? |
|
|
| X-Tools wrote: | Hi,
thanks for your answer.
I am using this code too to insert menus as submenus.
But i want to display a main menu (File, Edit, Help, ...).
Is there a way ?
I am using this code:
%%menuBar = @menu(menubarid)
%%dateiMenu = @menu(getsubmenu,%%menubar,0)
%%administrationMENU = @menu(hidemenu,%%menubar,2)
%%einstellungenMENU = @menu(hidemenu,%%menubar,1)
menu insertmenu,%%administrationMENU,%%menuBar,1,Administration
menu insertmenu,%%dateiMenu,%%einstellungenMenu,3,&Einstellungen
But I cannot show back the AdministrationMENU.
Bye, Fabian |
It doesn't even hide for me (not even when I put "REM" for the "INSERTMENU"-lines) I'll look into it.
edit: I know, I forgot "menu class,window class name")
edit: ok, I got it:
Instead of
| Code: | menu insertmenu,%%administrationMENU,%%menuBar,1,Administration
menu insertmenu,%%dateiMenu,%%einstellungenMenu,3,&Einstellungen |
use
| Code: | rem inserts administrationmenu in menubar
menu insertmenu,%%menubar,%%administrationmenu,1,&Administration
rem use this to insert einstellungenmenu in dateimenu
menu insertmenu,%%dateiMenu,%%einstellungenMenu,1,&Einstellungen
rem or this to insert dateimenu in einstellungenmenu
menu insertmenu,%%einstellungenMenu,%%dateiMenu,1,&Datei |
|
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Sun Jan 26, 2003 3:15 pm Post subject: |
|
|
You insert or append a menu to the Menubar the same as you would for
appending or inserting a submenu into another menu.
| Code: |
external ssmenu.dll
dialog create,Menu Test,-1,0,300,200,CLASS MenuTest
dialog add,MENU,&File,&Exit|Alt+X
dialog add,MENU,&Edit,Undo,-,Cut,Copy,Paste
dialog add,Menu,&Dummy,Item 1,Item 2,Item 3,Item 4
dialog add,MENU,&Help,&Contents,-,&About
menu class,MenuTest
%%menubar = @menu(menubarId)
%%dummyMenu = @menu(hideMenu,%%menuBar,2)
dialog add,BUTTON,bShowMenu,10,10,65,25,Show
dialog show
:Evloop
wait event
goto @event()
:bShowMenuBUTTON
rem Will reinsert the "Dummy" menu back to it's original position
menu insertMenu,%%menuBar,%%dummyMenu,2,&Dummy
goto Evloop
:CLOSE
exit
|
Does that help?  _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Jan 27, 2003 7:10 am Post subject: Show and Hide main menus with ssmenu ? |
|
|
Hi,
thanks for your help - works great.
Bye, Fabian |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|