Solved

How to hide Menue Items

Posted on 2011-02-17
4
388 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month5 days, 12 hours left to enroll

626 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