Sign in Join

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

Mailing lists / lazarus / 2012-05

Frames and menus

7 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Mark Morgan Lloyd

Running 1.1 r37373 GTK2 2.6.0. What I'm trying to do is put a main menu in a frame, which then only displays over part of the width of the containing form so that I can use the remainder for comboboxes.

What I'm finding is that when I tell the IDE to drop a frame onto the form, it displays a "Select Frame" dialog with no content. But if I first put a panel on the form "Select Frame" shows me the name of the frame I've prepared. Except when the reverse happens, i.e. I can't drop onto a panel but can drop onto the underlying form... it might depend on whether the sum of the number of components on the main form + that on the frame is odd or even.

In cases where I can get the drop to work, I don't see the main menu (can this be made to work?) but a popup on the frame works.

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

Mattias Gaertner
to Mark Morgan Lloyd
[...] What I'm finding is that when I tell the IDE to drop a frame onto the form, it displays a "Select Frame" dialog with no content.

How did you create the frame?

Please try:
open the frame and close it.
Then focus the form and click "Select frame".

Do you see the frame in the list?

But if I first put a panel on the form "Select Frame" shows me the name of the frame I've prepared.

Are you sure? The list of shown frames depends on the active form, not on the content.

[...]

Mattias

Reply by email

zeljko
to Mark Morgan Lloyd: Running 1.1 r37373 GTK2 2.6.0. What I'm trying to do is put a main menu in a frame, which…
Mark Morgan Lloyd wrote
Running 1.1 r37373 GTK2 2.6.0. What I'm trying to do is put a main menu

Gtk2 2.6.0 ?!? ;) I hope it's typo.

Show quoted text 13 lines
in a frame, which then only displays over part of the width of the containing form so that I can use the remainder for comboboxes. What I'm finding is that when I tell the IDE to drop a frame onto the form, it displays a "Select Frame" dialog with no content. But if I first put a panel on the form "Select Frame" shows me the name of the frame I've prepared. Except when the reverse happens, i.e. I can't drop onto a panel but can drop onto the underlying form... it might depend on whether the sum of the number of components on the main form + that on the frame is odd or even. In cases where I can get the drop to work, I don't see the main menu (can this be made to work?) but a popup on the frame works.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120521/73a01afa/attachment.html>

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner: On Mon, 21 May 2012 11:11:50 +0000 How did you create the frame? Please try: open the…
Mattias Gaertner wrote 8 lines
On Mon, 21 May 2012 11:11:50 +0000 Mark Morgan Lloyd wrote: > [...] > What I'm finding is that when I tell the IDE to drop a frame onto the > form, it displays a "Select Frame" dialog with no content. How did you create the frame?

File -> New... -> Module-Frame

Show quoted text 5 lines
Please try: open the frame and close it. Then focus the form and click "Select frame". Do you see the frame in the list?

Yes, and I think I continue seeing it if the frame is subsequently reopened.

Show quoted text 6 lines
> But if I > first put a panel on the form "Select Frame" shows me the name of the > frame I've prepared. Are you sure? The list of shown frames depends on the active form, not on the content.

I'm sure. However the issue appears to be that the frame has to have been closed (rather than just saved) before it's reliably usable. If it's not been closed then there's some sort of context/content-sensitive problem.

Any thoughts about the menu aspect- am I trying to do something impossible?

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

Mattias Gaertner
to Mark Morgan Lloyd: File -> New... -> Module-Frame Yes, and I think I continue seeing it if the frame is…
Show quoted text 11 lines
Mattias Gaertner wrote: > On Mon, 21 May 2012 11:11:50 +0000 > Mark Morgan Lloyd wrote: > >> [...] >> What I'm finding is that when I tell the IDE to drop a frame onto the >> form, it displays a "Select Frame" dialog with no content. > > How did you create the frame? File -> New... -> Module-Frame

Fixed in svn. Please test.

Show quoted text 7 lines
> Please try: > open the frame and close it. > Then focus the form and click "Select frame". > > Do you see the frame in the list? Yes, and I think I continue seeing it if the frame is subsequently reopened.

ok

[...] Any thoughts about the menu aspect- am I trying to do something impossible?

I never tried nesting a main menu. Many platforms treat main menus special, so probably it is not portable.
Using a toolbar or a panel with some popup menus should work on all platforms.

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote 7 lines
>>> [...] >>> What I'm finding is that when I tell the IDE to drop a frame onto the >>> form, it displays a "Select Frame" dialog with no content. >> How did you create the frame? > File -> New... -> Module-Frame Fixed in svn. Please test.

I think that's improved it: once the frame has "realised" it's to appear in the list, it stays available.

Show quoted text 6 lines
> [...] > Any thoughts about the menu aspect- am I trying to do something impossible? I never tried nesting a main menu. Many platforms treat main menus special, so probably it is not portable. Using a toolbar or a panel with some popup menus should work on all

I suspected that might be the case, I'll probably fudge something with panels/buttons.

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