Jump to content
Sign in to follow this  
Markir

Question about the function Menu

Recommended Posts

Ok, I ask much in this forum, I understand the following code, completely, but I don't see anything about my question in the helpfile:

Now, I have this code "$uebersichtmenu = GUICtrlCreateMenu("&Übersicht")" and this code "$uebersichtitem = GUICtrlCreateMenuitem " Uebersicht",$uebersichtmenu)". If I click on the first step "Übersicht" a dropdown field came with "Uebersicht" and the function msgbox want be displayed.

But I want to have that somebody can click on the first item "Übersicht" and the function msgbox want be displayed.

I hope that anybody know what I mean

#include <GUIConstants.au3>


GUICreate("Test",640,480)

$filemenu = GUICtrlCreateMenu ("&Datei")
$uebersichtmenu = GUICtrlCreateMenu("&Übersicht")
$helpmenu = GUICtrlCreateMenu ("?")
$helpitem = GUICtrlCreateMenuitem ("Hilfe",$helpmenu)
$infoitem = GUICtrlCreateMenuitem ("Info",$helpmenu)
$exititem = GUICtrlCreateMenuitem ("Beenden",$filemenu)
$uebersichtitem = GUICtrlCreateMenuitem ("Uebersicht",$uebersichtmenu)

;$separator1 = GUICtrlCreateMenuitem ("",$filemenu,2)   ; create a separator line



;$statuslabel = GUICtrlCreateLabel ($defaultstatus,0,165,300,16,BitOr($SS_SIMPLE,$SS_SUNKEN))

GUISetState ()
While 1
    $msg = GUIGetMsg()
    If $msg = $helpitem Then Msgbox (32,"Hilfe","Hilfe")
    If $msg = $GUI_EVENT_CLOSE Or $msg = $exititem Then ExitLoop
    If $msg = $infoitem Then Msgbox(64,"Info","Version 1.00")
    If $msg = $uebersichtitem Then MsgBox(0,"Uebersicht","Uebersichtstext")
Wend
GUIDelete()

Exit

Share this post


Link to post
Share on other sites

Hope this helps

$filemenu = GUICtrlCreateMenu ("&Datei")
$helpmenu = GUICtrlCreateMenu ("?")
$helpitem = GUICtrlCreateMenuitem ("Hilfe",$helpmenu)
$infoitem = GUICtrlCreateMenuitem ("Info",$helpmenu)
$exititem = GUICtrlCreateMenuitem ("Beenden",$filemenu)
$uebersichtitem = GUICtrlCreateMenuitem ("Uebersicht", -1)

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

I have one more question about this.... I hope you can help me...

If I click on "$uebersichtitem" then come "GUICtrlCreateGroup("Übersicht", 20, 20, 600, 400)". This is no problem for me.

If I click after that on "$ipadressenitem" then the $uebersichtitem will be displayed, too, but then only the "GUICtrlCreateGroup("IP Adressen", 20, 20, 600, 400)" should displayed

Share this post


Link to post
Share on other sites

Have somebody some information for me, how I can close a GUICtrlCreateGroup, if I click on another menue value?

Share this post


Link to post
Share on other sites

Is it possibly to close a GUICreateGroup, before I open another???

If I click on "$uebersichtitem" then come "GUICtrlCreateGroup("Übersicht", 20, 20, 600, 400)". This is no problem for me.

If I click after that on "$ipadressenitem" then the $uebersichtitem will be displayed, too, but then only the "GUICtrlCreateGroup("IP Adressen", 20, 20, 600, 400)" should displayed

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...