Jump to content

GUICtrlCreateMenu display inside GUI Form


DigDeep
 Share

Recommended Posts

Hi,

I am seeing that while building the File menues via GUICtrlCreateMenu using KODA shows all menues and sub menues inside GUI form but when launched after compiling, the file menu shows outside the form.

can someone suggest here? I can show an example if needed.

Link to comment
Share on other sites

  • Moderators

@DigDeep you've been around long enough to know that an example is always beneficial. Help us help you.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

@JLogan3o13, here is a small example with the picture. As you can see the file menu is by default going outside the form. is there a way, I can get it inside the Form?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 500, 300, -1, -1)
$mFile = GUICtrlCreateMenu("File")
$mOpen = GUICtrlCreateMenuItem("Open", $mFile)
$mSave = GUICtrlCreateMenuItem("Save", $mFile)
$mPrint = GUICtrlCreateMenuItem("Print", $mFile)
$mExit = GUICtrlCreateMenuItem("Exit", $mFile)
$mHelp = GUICtrlCreateMenu("Help")
$mContact = GUICtrlCreateMenuItem("Contact", $mHelp)
$mAbout = GUICtrlCreateMenuItem("About", $mHelp)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

I have also attached "GUICtrlCreateMenu example - As per needed.jpg" which is the way I needed it to be.

GUICtrlCreateMenu example.jpg

GUICtrlCreateMenu example - As per needed.jpg

Link to comment
Share on other sites

  • Moderators

@DigDeep what version of AutoIt, and Windows are you using? I tested on Windows 7 and Windows 10 and your code works okay for me.

Ok.png

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

@DigDeep you have also been around long enough to know you need to give it 24 hours before bumping your topics. I get that this is the most important thing to you right now, but you need to show some patience. I (and others) will look at it as time permits.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...