Re: More mdi fun
"Brian" <[email protected]> Thu, 13 Feb 2003 10:55:24 -0800 (PST)
| Newsgroups | gmane.comp.lang.delphi.kylix |
|---|---|
| Message-ID | <[email protected]> |
after some digging, it appears that left is always reverting back to 2 and top is reverting to 23. in the child windows that is Very weird. > > > > > OK, I think what you need to do is something like this > > childform - I'm assuming this is a variable you use to create all your > forms? Since this is only one var it may not be pointing to the right > child > form > > You might want to try something like this - it works with Delphi cause > that's what I have at work (I wish it was Kylix). > > Note: This only works with 4 forms, if you have more than that you have to > change the divisor (2). > (eg. if you have 9 forms change it to 3) > > var > i: Integer; > frm: TForm2; > ileft, itop: Integer; > iheight, iwidth: Integer; > begin > ileft := 0; > itop := 0; > iheight := (ClientHeight - Panel1.Height -5) div 2; > iwidth := (ClientWidth -5) div 2; > for i := 0 to pred(MDIChildCount) do // or MDIChildCount -1 > begin > if MDIChildren[i] is TForm2 then > begin > frm := (MDIChildren[i] as TForm2); > frm.Top := itop; > frm.Width := iwidth; // for spacing > frm.Height := iheight; // for panel > frm.Left := ileft; > ileft := ileft + frm.Width; > if (ileft + frm.Width -5) > > ClientWidth then > begin > ileft := 0; > itop := itop + > frm.Height; > end; > end; > end; > > At 09:11 AM 02/13/03 -0800, you wrote: > >Woops, help if I set it to be readable eh? :) > > > >tbvertical and tbhorizontal aren't in CLX unfortunately > > > >but I can't use them anyways > > > >I only want to tile certain windows, while leaving others minimized. > > > > > > > > > > > > > > > > > > > > > I get a 403 Forbidden on the first two images and a 404 not > found error on > > > the last one > > > > > > Have you tried this > > > > > > &nbsp;&nbsp; TileMode := tbVertical; // or tbHorizontal > > > &nbsp;&nbsp; Tile; > > > > > > you can also do Cascade; and ArrangeIcons; (Don't need to set > the tileMode > > > on those) > > > > > > Since I can't see the pictures I'm not sure what you are doing > but the > > > screen shots of your app look like you do this. > > > > > > Ken > > > > > > > > > At 08:33 AM 02/13/03 -0800, you wrote: > > > > > > > > > &gt;ok ;) > > > &gt; > > > &gt;This should be simple, but it's resisting me > > > &gt; > > > &gt;I have two forms I want to resize and reposition > > > &gt;http://kychat.sourceforge.net/before_tile.png > > > &gt; > > > &gt; > > > &gt; > > > &gt;// this works fine (once you adjust for any button bars > etc > > > &gt;childform.height := mainform.clientheight div 2; > > > &gt;childform.width := mainform.clientheight div 2; > > > &gt; > > > &gt;//but this... > > > &gt;childform.left := 1; > > > &gt;childform.top := 1; > > > &gt; > > > &gt;this _should_ move the form to the top left corner no? > > > &gt; > > > &gt;what happens is that it gives me the right height/width, > but for some > > > &gt;reason the > > > &gt;controls inside the form are now off center. > > > &gt;http://kychat.sourceforge.net/after_tile.png > > > &gt; > > > &gt; > > > &gt;but when I click on it, things reseat. > > > &gt;http://kychat.sourceforge.net/before_tile_and_click.png > > > &gt; > > > &gt; > > > &gt;yet, the form's position hasn't budged. > > > &gt; > > > &gt;Any clues? > > > &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/ > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > 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. > > > > > > > > > > > > > > > > > > > > > > >------------------------------------------------------- > >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/ > > > > > > > ------------------------------------------------------- > 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 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/