Hi,

Creating child forms dynamically has been always
problem in delphi.. Try using run time packages
instead..

--- iup_s <[EMAIL PROTECTED]> wrote:

> Hi!
> 
> I have created an application in which the users are
> able to create
> child forms dynamically (in a horizontal layout)
> with a single
> ScrollBox as Parent.
> 
> The problem occurs when closing these forms in the
> Windows XP environment.
> 
> I create several child forms so as to exceed the
> visible area of the
> ScrollBox (e.g., in my case 4). Thereafter I close
> the last child form
> and scroll left to the beginning of the ScrollBox.
> At this point the
> second child form (Child2) is partially disabled.
> i.e., the border
> icons are disabled and resizing Child2 is also not
> possible.
> 
> However when the mouse pointer is moved from the
> right edge of
> Child2's title bar towards its left, the mouse
> pointer changes from
> default to resize pointer at a certain point and a
> fraction later the
> border icons are enabled.
>  
> I'm at my wits end on how to solve this problem as
> it involves no
> complicated code. Please help.
> 
> (Delphi 5 / Windows XP)
> 
> Thanks!
> 
> Isuru.
> 
> The relevant code blocks are as follows:
> -------------
> unit Unit1;
> 
> procedure
> TfrmScrollBoxTest.buttonAddChildFormClick(Sender:
> TObject);
> var position, location : Integer;
>       child : TForm;
> begin
> // objList : TComponentList; - published property
>    location := 10;
>    index :=
>
objList.Add(TForm2.CreateParented(ScrollBox1.Handle));
>    if index > 0 then
>       location := TForm(objList.Items[index
> -1]).Left +
>                   TForm(objList.Items[index
> -1]).Width + 10;
> 
>    child := TForm(objList.Items[index]);
>    child.Parent := ScrollBox1;
>    child.Top := 10;
>    child.Left := location;
>    child.Show;
>    ScrollBox1.ScrollInView(child);
> end;
> 
> procedure TfrmScrollBoxTest.FormCreate(Sender:
> TObject);
> begin
>    objList := TComponentList.Create(True);
> end;
> 
> procedure TfrmScrollBoxTest.FormDestroy(Sender:
> TObject);
> begin
>    objList.Free;
> end;
> -------------
> unit Unit2;
> 
> procedure TForm2.FormClose(Sender: TObject; var
> Action: TCloseAction);
> begin
>    if Self.Parent.Parent is TfrmScrollBoxTest then
>      
>
TfrmScrollBoxTest(Self.Parent.Parent).objList.Remove(Self);
> end;
> 
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/i7folB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to