I wouldn't expect that you'd have much control over position if you're setting them all to alTop. Personally, I would instantiate them on panels that are already arranged the way I want them (you can set the panels to unbevelled if you don't want people to see them). That way you aren't leaving it up to the Gods of chance as to where the form will end up with all of them vying for alTop. or set the first one to alTop and each additional form you want at alTop, set to alRight at first. Then change them to alTop in the order that you want them after they've all been instantiated.
Dave Paul Bennett <[EMAIL PROTECTED]> wrote: The target form is a Data Input form, and therefore would not suit a Wizard. The form is the view part of a MVC pattern, each of the Frames is declared in the private area of the form, and are created as required by the Controller. The order of creation is the same as the required order of presentation. If a particular frame is not required for the object currently being edited then it is not created. The problem that I have is that, although the frames are created in the required order they aren't displayed in the same order! Below is a code snippet which should create each of the Frames fModel.CurrentFrame.RedrawGraphic(fView.imgFrameImage, 3); // Qty, Height, Width, colour and Cills - Always displayed fView.HeaderEdit := THeaderEdits.Create(fView.sbEditor); fView.HeaderEdit.InitializeNewFrame(...) .... fView.HeaderEdit.Parent := fView.sbEditor; fView.HeaderEdit.Align := alTop; // Main Mullions Frame fView.MainMullion := TMainMullion.Create(fView.sbEditor); fView.MainMullion.Parent := fView.sbEditor; fView.MainMullion.Align := alTop; // Mullion Edits fView.MullionEdits := TMullionEdits.Create(fView.sbEditor); fView.MullionEdits.Parent := fView.sbEditor; fView.MullionEdits.Align := alTop; // Transom edits fView.TransomEdits := TTransomEdits.Create(fView.sbEditor); fView.TransomEdits.Parent := fView.sbEditor; fView.TransomEdits.Align := alTop; // Outer Frame Profile - Always Displayed fView.OuterFrame := TOuterProfile.Create(fView.sbEditor); fView.OuterFrame.Parent := fView.sbEditor; fView.OuterFrame.Align := alTop; fView.OuterFrame.InitializeNewFrame(...); fView.OuterFrame.Align := alTop; // Door Sash fView.DoorSash := TDoorSash.Create(fView.sbEditor); fView.DoorSash.Parent := fView.sbEditor; fView.DoorSash.Align := alTop; // Glass Selection Editor - Always Displayed fView.GlassEdits := TGlassEdits.Create(fView.sbEditor); fView.GlassEdits.InitializeNewFrame(...); fView.GlassEdits.Parent := fView.sbEditor; fView.GlassEdits.Align := alTop; // Handle edits fView.HandleEdit := THandleEdit.Create(fView.sbEditor); fView.HandleEdit.Parent := fView.sbEditor; fView.HandleEdit.Align := alTop; // Footer Section Editor - Always Displayed fView.FooterEdits := TFooterEdits.Create(fView.sbEditor); fView.FooterEdits.Parent := fView.sbEditor; fView.FooterEdits.Align := alClient; fView.MainPage.Visible := True; fView.MainPage.ActivePageIndex := 2; fView.HeaderEdit.txtQty.SetFocus; When run the display order is 1. HandleEdit (8) 2. GlassEdits (7) 3. DoorSash (6) 4. HeaderEdit (1) 5. MainMullion (2) 6. MullionEdits (3) 7. TransomEdits (4) 8. OuterFrame (5) 9. FooterEdits (9) (numbers in brackets is the position it should have been displayed at). Paul. As I said in my original post, I have used frames because the controls on the form tend to be naturally grouped > ----- Original Message ----- > From: "David Smith" <[EMAIL PROTECTED]> > To: advanced_delphi@yahoogroups.com > Subject: Re: [advanced_delphi] Re: Display orderof dynamically created > frames. > Date: Fri, 29 Feb 2008 07:08:27 -0800 (PST) > > > Okay, sounds like you're form may be better off as a wizard? > LMD has a nice free wizard component that helps manage complexities > like that. > > You haven't really explained whether you are trying to > instantiate all frames at once or not. If yes, I would say to rem > out each one and re-enable one by one, so you can see what drawing > problems are arising to change things from your expectation. > > Dave Experience is something you don't get until just after you need it. -- _______________________________________________ Surf the Web in a faster, safer and easier way: Download Opera 9 at http://www.opera.com Powered by Outblaze --------------------------------- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.