?
Solved

Points for j42

Posted on 2003-03-27
1
Medium Priority
?
134 Views
Last Modified: 2010-04-04
0
Comment
Question by:ginsonic
[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
1 Comment
 
LVL 2

Accepted Solution

by:
j42 earned 200 total points
ID: 8217496
Thank you,

I suppose this looks much better:



procedure SaveState(const menu: TMainMenu);
var
  i: integer;
begin
  for i := 0 to (menu.Items.Count - 1) do
  begin
    menu.Items[i].Tag := Ord(menu.Items[i].Enabled);
  end;
end;

procedure DisableAll(const menu: TMainMenu);
var
  i: integer;
begin
  for i := 0 to (menu.Items.Count - 1) do
  begin
    menu.Items[i].Enabled := False;
  end;
end;

procedure RestoreState(const menu: TMainMenu);
var
  i: integer;
begin
  for i := 0 to (menu.Items.Count - 1) do
  begin
    menu.Items[i].Enabled := boolean(menu.Items[i].Tag);
  end;
end;
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

752 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