Sign in Join

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

Mailing lists / lazarus / 2010-11

Displaying system menu

9 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Mark Morgan Lloyd

Is there an easy and portable way of telling a form to display its system menu, for example in rsponse to a right-click? I'm trying to do something without border etc. (to suppress all sizeability and the title bar) but still want an easy way of moving it.

Is there an easy and portable way of extending the system menu with e.g. an entry to pop up an "about" box?

Apologies if these are FAQs, I'm still trying to get to grips with the documentation.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Unknown author
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 7 lines
Is there an easy and portable way of telling a form to display its system menu, for example in rsponse to a right-click? I'm trying to do something without border etc. (to suppress all sizeability and the title bar) but still want an easy way of moving it. Is there an easy and portable way of extending the system menu with e.g. an entry to pop up an "about" box?

No.
Under X-Windows, you have no control whatsoever over the system menu. It is entirely under control of the window manager.

Michael.

Reply by email

Mark Morgan Lloyd
to Unknown author
Show quoted text 12 lines
On Thu, 25 Nov 2010, Mark Morgan Lloyd wrote: > Is there an easy and portable way of telling a form to display its > system menu, for example in rsponse to a right-click? I'm trying to do > something without border etc. (to suppress all sizeability and the > title bar) but still want an easy way of moving it. > > Is there an easy and portable way of extending the system menu with > e.g. an entry to pop up an "about" box? No. Under X-Windows, you have no control whatsoever over the system menu. It is entirely under control of the window manager.

Thanks Michael, noted. Is it possible to lock down a form's dimensions even if the title bar is displayed? So far with GTK2 I've had little success.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Paul Ishenin
Paul Ishenin wrote 6 lines
25.11.2010 15:39, Mark Morgan Lloyd wrote: > Is it possible to lock down a form's dimensions > even if the title bar is displayed? So far with GTK2 I've had little > success. Use constraints propery.

Thanks Paul, should have thought of that. I guess that's what comes of being used to a rather old copy of Delphi.

I wonder if I could ask something related: I'm setting forms to poDefaultPosOnly but they're still appearing in the designed location. Am I missing something obvious here as well? :-)

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Paul Ishenin
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
I wonder if I could ask something related: I'm setting forms to poDefaultPosOnly but they're still appearing in the designed location. Am I missing something obvious here as well? :-)

Either a bug or gtk2 does not know how to place at default position.

Usually developers position their form at screen center, so other values can be less tested.

Best regards,
Paul Ishenin.

Reply by email

Graeme Geldenhuys
to Mark Morgan Lloyd: Is there an easy and portable way of telling a form to display its system menu, for…

Op 2010-11-25 10:06, Mark Morgan Lloyd het geskryf:

Is there an easy and portable way of extending the system menu with e.g. an entry to pop up an "about" box?

As Michael mentioned, it it totally out of your control under X11, but you could always add some "grab panel" in your window. When the user clicks that and holds the mouse button down (or even on the background canvas of the form)... you can let the user move the form that way.

If've done this before (with fpGUI), but most systems have a keyboard shortcuts to allow this anyway. eg: under X11 you can normally do Alt+Click and drag a window around while holding the Alt and mouse button down.

Windows has a keyboard shortcut as for as I remember, and then allows you to move the window with the arrow keys.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Mark Morgan Lloyd
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
Op 2010-11-25 10:06, Mark Morgan Lloyd het geskryf: > Is there an easy and portable way of extending the system menu with e.g. > an entry to pop up an "about" box? As Michael mentioned, it it totally out of your control under X11, but you could always add some "grab panel" in your window. When the user clicks that and holds the mouse button down (or even on the background canvas of the form)... you can let the user move the form that way.

A visible grab panel of some sort is a definite option, as long as it can be done portably. Otherwise I'll simply use the popup menu to turn the title bar on or off- I think that should work.

Show quoted text 6 lines
If've done this before (with fpGUI), but most systems have a keyboard shortcuts to allow this anyway. eg: under X11 you can normally do Alt+Click and drag a window around while holding the Alt and mouse button down. Windows has a keyboard shortcut as for as I remember, and then allows you to move the window with the arrow keys.

True, but I'm uneasy about forcing users to have to remember this sort of thing. One of the major benefits of Windows (and comparable GUIs) was that it displayed a menu so that users didn't have to remember special key combinations.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Paul Ishenin: Either a bug or gtk2 does not know how to place at default position. Usually developers…
Paul Ishenin wrote 11 lines
25.11.2010 16:43, Mark Morgan Lloyd wrote: > I wonder if I could ask something related: I'm setting forms to > poDefaultPosOnly but they're still appearing in the designed location. > Am I missing something obvious here as well? :-) > Either a bug or gtk2 does not know how to place at default position. Usually developers position their form at screen center, so other values can be less tested.

I should be compiling this program for gtk, gtk2 and Qt later, I'll report back.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email