Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

my problem...MDIchildCount!

Posted on 1998-02-17
1
Medium Priority
?
369 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 60 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
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

715 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