Solved

my problem...MDIchildCount!

Posted on 1998-02-17
1
368 Views
Last Modified: 2011-10-03
procedure TFrameForm1.UpdateMenuItems(Sender: TObject);
begin

SpbtnSave.Enabled := MDIChildCount > 0;
SpbtnPrint.Enabled := MDIChildCount > 0;

SpbtnPaste.Enabled := MDIChildCount > 0;
SpbtnCut.Enabled := MDIChildCount > 0;
SpbtnCopy.Enabled := MDIChildCount > 0;

if MDIChildCount = 0 then
  LockWindowUpdate(Handle);
  StatusBar1.Panels[0].Text := 'Row: 0' ;
  StatusBar1.Panels[1].Text := 'Col: 0' ;
  LockWindowUpdate(0);

end;

procedure TFrameForm1.FormCreate(Sender: TObject);
begin
Application.OnHint := MyHint;
Screen.OnActiveFormChange := UpdateMenuItems;
end;

procedure TEditForm1.Close1Click(Sender: TObject);
begin
Close;

end;

procedure TEditForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
 Action := caFree;

end;


i cannot detect MDIcHILD Count properly..can anyone help?
my toolbar  buttons are not disenabled properly..
if MDIChildCount = 1 then my toolbars buttons are
enabled..which should be disenable...
0
Comment
Question by:cooldude77
[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 5

Accepted Solution

by:
ronit051397 earned 30 total points
ID: 1359494
SpbtnSave.Enabled := MDIChildCount = 0;
SpbtnPrint.Enabled := MDIChildCount = 0;
SpbtnPaste.Enabled := MDIChildCount = 0;
SpbtnCut.Enabled := MDIChildCount = 0;
SpbtnCopy.Enabled := MDIChildCount = 0;
0

Featured Post

Independent Software Vendors: 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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month11 days, 17 hours left to enroll

623 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