CreateMenu

Discuss any general programming issues here
Post Reply
sashapont
Posts: 79
Joined: Thu Aug 03, 2017 2:49 pm

CreateMenu

Post by 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"}})

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

Re: CreateMenu

Post by 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

Post Reply