Accessing dynamically created frames stored in page control
Posted on 2003-03-12
this may be an easy question, but i can't figure it out.
i'm creating pages(frames) dynamically and storing them in a PageControl.
I need to be able to search the pagecontrol for the individual frame that i want
(searching by the caption) and then run a procedure on that frame that dynamically
creates a text box.
I am able to search and find the correct page, but i can't seem to access it to
run the procedure, any ideas?
Here is the code:
i := 0;
cfound := false;
if (PageControl1.Pages[i].Caption = Category) then
cfound := true;
i := i + 1;
until ((cfound = true)OR(i = PageControl1.PageCount-1));
if (cfound = true) then
begin //found the category, place the new field in it
the code needs to go into the spot indicated.
I know i need to use PageControl.Pages[i] to indicate the page...but
PageControl.Pages[i].Procedure(v); will not work.
any help is appreciated.