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:
> >k, I must be on glue...
> >
> >so how do I actually MOVE a window within the main form?
> >
> >I can get the sizes correct, but I want to arrange the way I want...
> >
> >the left & top properties dont' seem to actually do anything?
> >
> >What am I missing here?
> >
> >Cheers
> >
> >
> > >
> > >
> > >
> > >
> > > If you know the different between TForm.Height/Width and
> > > TForm.ClientHeight/Width, it's not weird actually. Form's Height
> is
> > > ClientHeight + form's bottom frame thickness + form's title bar
> > > height. And form's Width is ClientWidth + form's left frame
> thickness
> > > + form's right frame thickness.
> > >
> > > By assuming the left, right, and bottom form's frame thickness
> are
> > > equal, you'll find out the height of form's title bar. Then, you
> > > should modify the iwidth and iheight variables calculation to
> get the
> > > form's position correct. In your case, you should know that
> form's
> > > frame thickness is 1 and title bar height is 22. :)
> > >
> > > -Bee-
> > >
> > >
> > > ----- Original Message -----
> > > From: Brian
> > > To: [email protected]
> > > Sent: Friday, 14 February 2003 01:55
> > > Subject: Re: [KylixGroup] More mdi fun
> > >
> > > 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.
> > >
> > >
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.445 / Virus Database: 250 - Release Date:
> 21-01-2003
> > >
> > >
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > 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/
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
>
> ADVERTISEMENT
>
>
>
>
>
>
>
>
>
> -------------------------------------------------------
> 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/