MDI ScrollIntoView
From: remove undies to reply (trevor_at_input.undies.co.nz)
Date: 12/22/03
- Next message: Yumuto: "doing something when another component gets focus"
- Previous message: ozbear: "Re: key press"
- Next in thread: Kurt Barthelmess: "Re: MDI ScrollIntoView"
- Reply: Kurt Barthelmess: "Re: MDI ScrollIntoView"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 22 Dec 2003 23:57:41 +1300
Hello,
How do I go about making an MDI child form automatically scroll into
view?
If I have a number of MDI children, and one is sitting off to the
right, and there is a scrollbar in the MDI parent form, I would like the
MDI child to change the scroll position on its parent when it is
selected so that it is entirely visible (if possible).
I have written some code to do this. It works, and is not terribly
complicated, but involves calls to ScrollWindow and SetScrollPos and the
calculations that are needed for both calls. This is in a private method
called ScrollIntoView which I call in the OnActivate event handler with
TForm(Owner).ClientHandle as a parameter. It seems like a hack so I'm
still wondering how to do it with ordinary Delphi form properties or how
to exploit normal Delphi MDI behaviour.
BTW, I'm using D7, the MDI parent form has some other controls on it,
and the MDI child has a fixed size.
Scout
- Next message: Yumuto: "doing something when another component gets focus"
- Previous message: ozbear: "Re: key press"
- Next in thread: Kurt Barthelmess: "Re: MDI ScrollIntoView"
- Reply: Kurt Barthelmess: "Re: MDI ScrollIntoView"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|