On 23/12/2015 12:21 μμ, Ondrej Pokorny wrote:
On 23.12.2015 08:54, taazz wrote:
I know that Delphi behaves the same but then we need some FormStyle that makes the window stay only on top of its application windows and not system-wide.


No it does not, delphi's 2007 menu designer never stays on top outside the application it self and never looses its position regardless of how many times you change between delphi and other applications.

I was talking about FormStyle=fsStayOnTop and not about delphi's 2007 menu designer. fsStayOnTop in Delphi behaves the same as in Lazarus - it tries to keep the form above all forms system-wide.

Its a windows thing yes, it only has 2 groups of windows, normal and on top, each group can handle its own z-order. As you say you should never use it especialy when there is a working alternative that does the job far better.

No, you are wrong. pmAuto selects the active form as PopupParent not application's main form. See

  TPopupMode = (
    pmNone,     // default behavior - popup to mainform/taskbar window
    pmAuto, *// popup to active form and same as pmNone if no active form*
    pmExplicit  // popup to PopupParent and same as pmNone if not exists
  );

or the widgetset code, e.g. for Qt:

procedure TQtMainWindow.UpdateParent;
var
  NewParent: QWidgetH;
begin
  NewParent := nil;
  case FPopupMode of
    pmNone: ;// no popup parent
    pmAuto:
      // active form is parent
      if Screen.ActiveForm <> nil then
        NewParent := TQtWidget(Screen.ActiveForm.Handle).Widget;
//...

Again, you are wrong. pmAuto doesn't have anything to do with the main form.

Ondrej

True sorry it seems my knowledge is outdated on this subject but I believe on being specific when it comes to programming, make sure that the popuform is set to the correct window my self and all that.

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to