Sign in Join

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

Mailing lists / fpc-pascal / 2004-03

GTK accelerator handling

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Marc Santhoff

Hi!

While using GTK to attach acelerator keys to buttons I came acros this situation:

- There are accels overlapping (one notebook tab F1..F4, other F1..F7)

- I tried to use gtk_window_remove_accel_group(...) but it is not found by fpc (gtk has it, I've got the name from its docs).

My questions:

Is is possible in a simple way to get the mssing procedure working?

How can i use these equally named and focus geared accelerator keys on the buttons?

TIA,
Marc

Reply by email

Jeff Pohlmeyer
I tried to use gtk_window_remove_accel_group(...) but it is not found by fpc (gtk has it, I've got the name from its docs). Is is possible in a simple way to get the missing procedure working?

Just add this declaration somewhere in your program:

procedure gtk_window_remove_accel_group(window: PGtkWindow;  accel_group: PGtkAccelGroup);
  external name 'gtk_window_remove_accel_group';

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html

Reply by email

Marc Santhoff
to Jeff Pohlmeyer
Show quoted text 9 lines
> I tried to use gtk_window_remove_accel_group(...) but it is not > found by fpc (gtk has it, I've got the name from its docs). > Is is possible in a simple way to get the missing procedure working? Just add this declaration somewhere in your program: procedure gtk_window_remove_accel_group(window: PGtkWindow; accel_group: PGtkAccelGroup); external name 'gtk_window_remove_accel_group';

Yes, i've done that already and ist works, although the first try gave me some errors.

Btw, is there any further documentation available on these procedures? Even the gtk site has filled in all topics ... I have some problems with accelerator groups, some doubled keystrokes are invisible but active.

Thank you,
Marc

Reply by email

Mattias Gaertner
to Jeff Pohlmeyer: Just add this declaration somewhere in your program: procedure…
Show quoted text 10 lines
> I tried to use gtk_window_remove_accel_group(...) but it is not > found by fpc (gtk has it, I've got the name from its docs). > Is is possible in a simple way to get the missing procedure working? Just add this declaration somewhere in your program: procedure gtk_window_remove_accel_group(window: PGtkWindow; accel_group: PGtkAccelGroup); external name 'gtk_window_remove_accel_group';

cdecl; is missing.

Mattias

Reply by email