Re: More mdi fun

"Brian" <[email protected]> Mon, 17 Feb 2003 10:53:56 -0800 (PST)
Newsgroups gmane.comp.lang.delphi.kylix
Message-ID <[email protected]>
eek, this didn't C&P in my webmail client all that well...

anyways, height and width come out fine (after subtracting all my bars etc)

The problem is that I can't move the childform...

what I get is
http://kychat.sourceforge.net/after_tile.png

then I click on the child
http://kychat.sourceforge.net/after_tile_and_click.png

it redraws itself properly, but hasn't moved a pixel :)

Cheers

----
// get the mdiparent dimensions
vert := mainform.clientHeight;
horiz := mainform.ClientWidth;

// for all the children do
for i:= MdiChildCount-1 downto 0 do
// if the form isn't a status form (we don't want to tile it) and it's a
statusform object
    if ((Mdichildren[i] as tstatusform).win_type <> 1) and (mdichildren[i]
is Tstatusform ) then
            begin
                (Mdichildren[i] as tstatusform).Height := (vert
-(mainform.taskbar_panel.height) -
mainform.statusbar.height-mainform.toolbar2.Height - 23)
div 2;
                (Mdichildren[i] as tstatusform).Width := horiz;
                (Mdichildren[i] as tstatusform).Top:=1;
                (Mdichildren[i] as tstatusform).left:=1;
             end;

>
>
>
>
> What is the code that you are using?
>
>
> At 10:25 AM 02/15/03 -0800, you wrote:
> &gt;k, I must be on glue...
> &gt;
> &gt;so how do I actually MOVE a window within the main form?
> &gt;
> &gt;I can get the sizes correct, but I want to arrange the way I want...
> &gt;
> &gt;the left &amp; top properties dont' seem to actually do anything?
> &gt;
> &gt;What am I missing here?
> &gt;
> &gt;Cheers
> &gt;
> &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt; If you know the different between TForm.Height/Width and
> &gt; &gt; TForm.ClientHeight/Width, it's not weird actually. Form's Height
> is
> &gt; &gt; ClientHeight + form's bottom frame thickness + form's title bar
> &gt; &gt; height. And form's Width is ClientWidth + form's left frame
> thickness
> &gt; &gt; + form's right frame thickness.
> &gt; &gt;
> &gt; &gt; By assuming the left, right, and bottom form's frame thickness
> are
> &gt; &gt; equal, you'll find out the height of form's title bar. Then, you
> &gt; &gt; should modify the iwidth and iheight variables calculation to
> get the
> &gt; &gt; form's position correct. In your case, you should know that
> form's
> &gt; &gt; frame thickness is 1 and title bar height is 22. :)
> &gt; &gt;
> &gt; &gt; -Bee-
> &gt; &gt;
> &gt; &gt;
> &gt; &gt; ----- Original Message -----
> &gt; &gt; From: Brian
> &gt; &gt; To: [email protected]
> &gt; &gt; Sent: Friday, 14 February 2003 01:55
> &gt; &gt; Subject: Re: [KylixGroup] More mdi fun
> &gt; &gt;
> &gt; &gt; after some digging, it appears that left is always reverting
> back to 2
> &gt; &gt; and
> &gt; &gt; top is reverting to 23. in the child windows that is
> &gt; &gt;
> &gt; &gt; Very weird.
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt; ---
> &gt; &gt; Outgoing mail is certified Virus Free.
> &gt; &gt; Checked by AVG anti-virus system (http://www.grisoft.com).
> &gt; &gt; Version: 6.0.445 / Virus Database: 250 - Release Date:
> 21-01-2003
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt; -------------------------------------------------------
> &gt; &gt; Forum / mailing list for Borland Kylix programmers
> &gt; &gt; Our web page:&amp;nbsp; http://groups.yahoo.com/group/kylixgroup
> &gt; &gt; To join the forum: [email protected]
> &gt; &gt; To unsubscribe:&amp;nbsp; [email protected]
> &gt; &gt; To post your
> messages:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
> &gt; &gt; [email protected]
> &gt; &gt; To contact the moderator:&amp;nbsp; [email protected]
> &gt; &gt; -------------------------------------------------------
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt; Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt;
> &gt;
> &gt;
> &gt;-------------------------------------------------------
> &gt;Forum / mailing list for Borland Kylix programmers
> &gt;Our web page:&nbsp; http://groups.yahoo.com/group/kylixgroup
> &gt;To join the forum: [email protected]
> &gt;To unsubscribe:&nbsp; [email protected]
> &gt;To post your messages:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> [email protected]
> &gt;To contact the moderator:&nbsp; [email protected]
> &gt;-------------------------------------------------------
> &gt;
> &gt;Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
>
>   ADVERTISEMENT
>
>
>
>
>
>
>
>
>
> -------------------------------------------------------
> Forum / mailing list for Borland Kylix programmers
> Our web page:&nbsp; http://groups.yahoo.com/group/kylixgroup
> To join the forum: [email protected]
> To unsubscribe:&nbsp; [email protected]
> To post your messages:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> [email protected]
> To contact the moderator:&nbsp; [email protected]
> -------------------------------------------------------
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>
>


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/FpY02D/vN2EAA/xGHJAA/i7folB/TM
---------------------------------------------------------------------~->

-------------------------------------------------------
Forum / mailing list for Borland Kylix programmers
Our web page:  http://groups.yahoo.com/group/kylixgroup
To join the forum: [email protected]
To unsubscribe:  [email protected]
To post your messages:       [email protected]
To contact the moderator:  [email protected]
------------------------------------------------------- 

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