Sign in Join

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

Mailing lists / lazarus / 2008-10

Main menu hiding

9 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

0.9.25 compiled for Win-32 running on NT allows you to hide and unhide a form's main menu depending on the visibility of the items on the menu, i.e. if nothing's visible on the menu then it doesn't take any space on the form.

When compiled for gtk running on Debian "Sarge" x86 the menu is hidden as a thin strip which expands to its full height when items on it are made visible but cannot be hidden again.

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 Mark Morgan Lloyd
Mark Morgan Lloyd wrote 8 lines
0.9.25 compiled for Win-32 running on NT allows you to hide and unhide a form's main menu depending on the visibility of the items on the menu, i.e. if nothing's visible on the menu then it doesn't take any space on the form. When compiled for gtk running on Debian "Sarge" x86 the menu is hidden as a thin strip which expands to its full height when items on it are made visible but cannot be hidden again.

I was hoping that compiling Lazarus on Debian "Lenny", which I believe is oriented towards gtk v2, would fix this. However it appears to require the libgdk-pixbuf-dev package which still appears to be based on gtk 1 and appears to install libglib1.2-dev as well as possibly splurging symlinks into /usr/lib.

I tried building for Qt but Debian is still on v3.5 rather than v4, and fpgui also failed.

I've got nothing against gtk 1 as such, but am interested in seeing if this menu problem is tied to a particular widget set since it impacts on some stuff I'm trying to lay out.

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

Graeme Geldenhuys
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
I tried building for Qt but Debian is still on v3.5 rather than v4, and fpgui also failed.

LCL-fpGUI is in pre-alpha stage. Hardly anything has been implemented, except some very basic things simply to see how easy/difficult it would be to interface fpGUI with LCL (which is quite easy by the looks of it).

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Mark Morgan Lloyd
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
On Sun, Oct 19, 2008 at 5:46 PM, Mark Morgan Lloyd wrote: > I tried building for Qt but Debian is still on v3.5 rather than v4, and > fpgui also failed. LCL-fpGUI is in pre-alpha stage. Hardly anything has been implemented, except some very basic things simply to see how easy/difficult it would be to interface fpGUI with LCL (which is quite easy by the looks of it).

I could see the description and wasn't expecting great things, but was rather feverishly looking for an alternative to gtk 1.

When I have time I'll try a different distro on the test machine which hopefully will allow me to get gtk 2 working. However I'd be very reluctant to move from Debian since It's probably the best choice when working on multiple architectures- I've got x86, ARM and SPARC here.

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

Graeme Geldenhuys
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 5 lines
When I have time I'll try a different distro on the test machine which hopefully will allow me to get gtk 2 working. However I'd be very reluctant to move from Debian since It's probably the best choice when working on multiple architectures- I've got x86, ARM and SPARC here.

I'm using Ubuntu 7.10 which also uses Qt 3.5 (as far as I know). I can build Lazarus for Qt, GTK1 and GTK2 without problems. Ubuntu is very similar to Debian (actually a descendant of Debian).

As for you question about the Menu behaviour - I got no idea, I don't actively use LCL, only the Lazarus IDE.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Mark Morgan Lloyd
to Graeme Geldenhuys
Graeme Geldenhuys wrote
I'm using Ubuntu 7.10 which also uses Qt 3.5 (as far as I know). I can build Lazarus for Qt, GTK1 and GTK2 without problems. Ubuntu is very similar to Debian (actually a descendant of Debian).

Yes, I can see there's been discussion of those dependencies over the last few days. Obviously I'm aware of Ubuntu but it does appear to be very much x86-oriented, I might take a look at a recent Slackware since I've got a fair amount of experience on older versions and it also has a competent (albeit unofficial) SPARC port which runs on one of my larger systems.

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

Henry Vermaak
to Mark Morgan Lloyd: I could see the description and wasn't expecting great things, but was rather feverishly…
Mark Morgan Lloyd wrote 8 lines
I could see the description and wasn't expecting great things, but was rather feverishly looking for an alternative to gtk 1. When I have time I'll try a different distro on the test machine which hopefully will allow me to get gtk 2 working. However I'd be very reluctant to move from Debian since It's probably the best choice when working on multiple architectures- I've got x86, ARM and SPARC here.

i'm not sure i follow here. i've been running lazarus gtk2 under debain testing for more than a year.

the menu hiding thing i don't understand either, but you can do it manually on gtk2 with gtk_widget_hide(PGtkWidget(MainMenu.Handle)); and show again with gtk_widget_show. you can see if it's visible with gtk_widget_visible (surprise).

(i've gone back to debian from ubuntu, fwiw)

henry

Reply by email

Mark Morgan Lloyd
to Henry Vermaak
Henry Vermaak wrote
i'm not sure i follow here. i've been running lazarus gtk2 under debain testing for more than a year.

The pixbuf stuff as currently being shipped appears to -> v1 to the extent that it pulled in a whole lot of v1 libraries when installed.

the menu hiding thing i don't understand either, but you can do it manually on gtk2 with gtk_widget_hide(PGtkWidget(MainMenu.Handle)); and show again with gtk_widget_show. you can see if it's visible with gtk_widget_visible (surprise).

OK, so it can be done manually which is a start. Now all I need to do is get Lazarus working- on whatever distro- with v2 so I can see if the widget set does it. At present I can't say whether Win-32 is anomalous for doing it, or gtk v1 is anomalous for not doing it. And much as I want to know I've got limited time.

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 Mark Morgan Lloyd
Mark Morgan Lloyd wrote 10 lines
> the menu hiding thing i don't understand either, but you can do it > manually on gtk2 with gtk_widget_hide(PGtkWidget(MainMenu.Handle)); > and show again with gtk_widget_show. you can see if it's visible with > gtk_widget_visible (surprise). OK, so it can be done manually which is a start. Now all I need to do is get Lazarus working- on whatever distro- with v2 so I can see if the widget set does it. At present I can't say whether Win-32 is anomalous for doing it, or gtk v1 is anomalous for not doing it. And much as I want to know I've got limited time.

I can confirm that a form's main menu can be hidden/unhidden on Win-32 and gtk2 but not on gtk1. Sorry but I've not got time to start testing on Qt- unless somebody really wants me to, in which case I'm going to be asking lots of questions about the Qt source and qt4intf.

If anybody's interested I've got a test project that demonstrates this (two controls and one line of code), just say where to send it.

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