Solved

CheckBoxes as children of Tabbed Notebooks?

Posted on 1997-03-25
2
406 Views
Last Modified: 2010-04-04
This is in Delphi 1.0

I have a tabbed notebook with multiple check boxes on each page.  Is there a way to access these check box controls as children of the notebook (like you can do with controls in a group box)?  I want to be able to set the Checked property of all of the checkboxes to true or false without having to access each one by it's name.  I can't find any reference to doing it with tabbed notebooks.

Jody
0
Comment
Question by:jodyl
2 Comments
 
LVL 3

Accepted Solution

by:
sperling earned 70 total points
ID: 1334949
procedure SetCheckboxes (ANotebook : TTabbedNotebook; APage : INTEGER; Checked : BOOLEAN);
var
  ndx     : INTEGER;
begin
  with TTabPage(ANotebook.Pages.Objects[APage]) do begin
    for ndx :=  0 to ControlCOunt-1 do begin
      if Controls[ndx] is TCheckBox then TCheckBox(Controls[ndx]).Checked := Checked;
    end;
  end;
end;


Use this proc... The APage parameter is 0-base page index.

Regards,

Erik.
0
 

Author Comment

by:jodyl
ID: 1334951
It ain't documented as far as I know.

I once needed to find out how to create a control run-time, and place it on a given notebook page, therefore I just looked through the VCL source.


Regards,

Erik.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

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…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 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