Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-04

BringToFront with forms

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Hans-Peter Diettrich

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?

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?

DoDi

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich
Show quoted text 5 lines
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.

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.

Mattias

Reply by email

Hans-Peter Diettrich
to Mattias Gaertner
Show quoted text 12 lines
On Mon, 25 Apr 2011 10:10:55 +0200 Hans-Peter Diettrich 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.

Show quoted text 8 lines
> 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.

DoDi

Reply by email