Solved

CheckBoxes as children of Tabbed Notebooks?

Posted on 1997-03-25
2
302 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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now