CreateMenu

Discuss any general programming issues here

CreateMenu

Postby sashapont » Thu Jan 04, 2018 9:40 pm

Are there any working CreateMenu sample?

I try use it like this and have errors

Code: Select all
aa= CreateMenu("File", {
        {"New", ID = "new"}, 
        {"Save", ID = "save"},
        {"Print", ID = "print"},
        {""},
        {"Quit", ID = "quit", Hotkey = "Q"}})
sashapont
 
Posts: 42
Joined: Thu Aug 03, 2017 2:49 pm

Re: CreateMenu

Postby Tipsi » Fri Jan 05, 2018 12:39 am

Hi sashapont

You forgot the "id" and you're missing a "{ }":

Code: Select all
CreateMenu(1, {
              {"File", {
                       {"New", ID = "new"},
                       {"Save", ID = "save"},
                       {"Print", ID = "print"},
                       {""},
                       {"Quit", ID = "quit", Hotkey = "Q"}
                       }
              }
              })

or

Code: Select all
aa = CreateMenu(Nil, {
                     {"File", {
                              {"New", ID = "new"},
                              {"Save", ID = "save"},
                              {"Print", ID = "print"},
                              {""},
                              {"Quit", ID = "quit", Hotkey = "Q"}
                              }
                     }
                     })


Griessli
Tipsi
Tipsi
 
Posts: 8
Joined: Sun Feb 14, 2010 7:06 pm


Return to General programming

Who is online

Users browsing this forum: No registered users and 1 guest