Sign in Join

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

Mailing lists / lazarus / 2013-08

Positioning entries on main menu

7 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 a portable way of positioning a (single) entry at the right of a form's main menu, or of displaying a clickable glyph?

What I'm considering is something like a ? symbol to control whether an extra pane is shown to the right of a text editor. This would be used for drag-and-drop operations, transferring files to/from a remote system in the background.

A year or so ago I wrote a Linux app which has some extra-wide menu entries which control data (Alsa MIDI) routing, these have "coloured LEDs" on them but only work properly with gtk2 (i.e. not Qt).

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

Howard Page-Clark
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
What I'm considering is something like a ? symbol to control whether an extra pane is shown to the right of a text editor.

You might get some ideas from the SelComponentPageButton which has been added in recent Lazarus commits (1.1).
See ..\ide\main.pp, lines 2045-2055, and 5104-5121 (it's evidently copied from CodeTyphon).

Reply by email

Juha Manninen
to Howard Page-Clark
Howard Page-Clark wrote
You might get some ideas from the SelComponentPageButton which has been added in recent Lazarus commits (1.1). See ..\ide\main.pp, lines 2045-2055, and 5104-5121 (it's evidently copied from CodeTyphon).

Yes, it is also mentioned in the commit message:
http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&root=lazarus&revision=42313

About the original question:
A toolbar is the standard and portable way for your button. I don't know how to add it beside a main menu, but is it really needed? For example the button for component page selection in Lazarus IDE is beside a toolbar, not beside a main menu.

Juha

Reply by email

Mark Morgan Lloyd
to Juha Manninen
Juha Manninen wrote 8 lines
On Sat, Aug 31, 2013 at 1:17 PM, Howard Page-Clark wrote: > You might get some ideas from the SelComponentPageButton which has been > added in recent Lazarus commits (1.1). > See ..\ide\main.pp, lines 2045-2055, and 5104-5121 > (it's evidently copied from CodeTyphon). Yes, it is also mentioned in the commit message: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&root=lazarus&revision=42313

Thanks Howard, I'll investigate during the next maintenance session.

Show quoted text 5 lines
About the original question: A toolbar is the standard and portable way for your button. I don't know how to add it beside a main menu, but is it really needed? For example the button for component page selection in Lazarus IDE is beside a toolbar, not beside a main menu.

The program doesn't have a toolbar, and since the audience is IBM (and other) mainframe types it's a fair bet that they like toolbars even less than I do (I like having a menu dammit, I'm not into all this self-service buffet stuff :-)

I've experimentally allowed the main form to accept dropped files, which is OK except that controls mask them (i.e. I can detect a dropped file over the menu or status bar, but not over e.g. a TMemo). Is there some hidden component property to make components transparent to drop? Lazarus/LCL 1.0, Linux gtk2.

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

Juha Manninen
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
The program doesn't have a toolbar, and since the audience is IBM (and other) mainframe types it's a fair bet that they like toolbars even less than I do (I like having a menu dammit, I'm not into all this self-service buffet stuff :-)

You can implement menus also differently, without using main menu. Dropdown menus from speedbuttons look almost like a main menu, but allow freely design your layout.

Show quoted text 5 lines
I've experimentally allowed the main form to accept dropped files, which is OK except that controls mask them (i.e. I can detect a dropped file over the menu or status bar, but not over e.g. a TMemo). Is there some hidden component property to make components transparent to drop? Lazarus/LCL 1.0, Linux gtk2.

I don't know. Maybe you must allow dropping for each control and forward it to the form.

Regards,
Juha

Reply by email

Mark Morgan Lloyd
to Juha Manninen
Juha Manninen wrote 10 lines
On Sat, Aug 31, 2013 at 4:08 PM, Mark Morgan Lloyd wrote: > The program doesn't have a toolbar, and since the audience is IBM (and > other) mainframe types it's a fair bet that they like toolbars even less > than I do (I like having a menu dammit, I'm not into all this self-service > buffet stuff :-) You can implement menus also differently, without using main menu. Dropdown menus from speedbuttons look almost like a main menu, but allow freely design your layout.

True, I've done that on Delphi so that I could do things like having the menu in only one pane of a multi-pane window (seemed like a good idea at the time).

Show quoted text 8 lines
> I've experimentally allowed the main form to accept dropped files, which is > OK except that controls mask them (i.e. I can detect a dropped file over the > menu or status bar, but not over e.g. a TMemo). Is there some hidden > component property to make components transparent to drop? Lazarus/LCL 1.0, > Linux gtk2. I don't know. Maybe you must allow dropping for each control and forward it to the form.

:-/ Anybody?

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