Solved

How to hide Menue Items

Posted on 2011-02-17
4
378 Views
Last Modified: 2012-05-11
We are working on a expert and simple version of our application by hiding TMenu Items.

TmenuIte,.Visible := false is working well for sub items but not for items in the top row, how to hide that item ?
0
Comment
Question by:BdLm
  • 2
  • 2
4 Comments
 
LVL 24

Accepted Solution

by:
jimyX earned 250 total points
ID: 34916056
To hide the top menu item use:
MainMenu1.Items[0].Visible := false; // for the first item
MainMenu1.Items[1].Visible := false; // for the second item
and so on.
Or you can use its direct name (that particular item name):
The name of that item.Visible := false;
0
 
LVL 8

Author Comment

by:BdLm
ID: 34916310
you are right - for a simple test case it worked for us.

in our app the mainmenu is placel on a toolbar, does that change something ?
0
 
LVL 24

Assisted Solution

by:jimyX
jimyX earned 250 total points
ID: 34916437
Is it placed as buttons on the Toolbar?
If yes, then you can just refer to the button:
ToolBar1.Buttons[x].visible := false; // x can be: 0 for the first button and 1 for the second and so on

Open in new window

0
 
LVL 8

Author Closing Comment

by:BdLm
ID: 34916575
last post helped  :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
indy Tmemory stream non latin charcter issue 2 98
Simple Delphi Question 9 83
Print Graphic and Text to Epson TM-T88v 12 182
how can i search if string exist in array ? 3 49
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now