[Lazarus] BringToFront with forms
DrDiettrich1 at aol.com
Mon Apr 25 22:47:35 CEST 2011
Mattias Gaertner schrieb:
> On Mon, 25 Apr 2011 10:10:55 +0200
> Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:
>> TCustomForm.Show automatically calls BringToFront, what may be okay in
>> most cases, but...
>> 1) The IDE passes around an explicit BringToFront:boolean with many
>> methods - why?
> Show, or show and focus.
> For example when compiling the "messages" window should be shown, but it
> does not need focus, nor does it need to be on top layer.
The purpose is clear, but not the implementation.
>> 2) What about parented or docked forms? Is this already handled, or do
>> we need another method ShowClient to (also) make an docked client
>> visible, when e.g. docked into a notebook? Do we need to call
>> ScrollIntoView explicitly, when residing in a scrollable container?
> When BringToFront is true the form should be focused. So the
> IDEDockMaster should move the form to the front (recursively if docked).
> I'm not sure about scrolling. I guess it would be nice.
There exists a method TWinControl.ShowControl, but it seems not to do
what its name suggests. In the default TWinControl implementation it's a
NOP, only TCustomNoteBook cares about the visibility of the given control.
More information about the Lazarus