Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

Enable \ Disable menus

$
0
0
Hi.
Its been a good long while since I used menus on one of my little projects but my latest one looks good using the menu bar.

I would like though one particular menu to be disabled at the beginning and enabled later at some point.

I have written the following code, Button - On Click.

Code:
tblMenu = {};
tblMenu[1] ={};
tblMenu[1].Text = "menu 1";
tblMenu[1].ID = 200;
tblMenu[1].Enabled = true;
tblMenu[2] ={};
tblMenu[2].Text = "menu 2";
tblMenu[2].ID = 200;
tblMenu[2].Enabled = true;
tblMenu[2].SubMenu = {};
tblMenu[2].SubMenu[1] = {};
tblMenu[2].SubMenu[1].Text = "menu 2 sub menu 1";
tblMenu[2].SubMenu[1].ID = 201;
tblMenu[2].SubMenu[1].Enabled = true;
tblMenu[2].SubMenu[2] = {};
tblMenu[2].SubMenu[2].Text = "menu 2 sub menu 2";
tblMenu[2].SubMenu[2].ID = 202;
tblMenu[2].SubMenu[2].Enabled = true;
Application.SetMenu(tblMenu);​
It seems to work well apart from the "separator"

I like the look of Menu 2 - Sub menu 1 and menu 2 - Sub menu 2 been separated slightly.

is it possible to enable a separator with Application.SetMenu ?

Any pointers would be great.

Viewing all articles
Browse latest Browse all 2105

Trending Articles