[gtkada] Underlined menu shortcuts

Larry Elmore ljelmore at home.com
Sat May 26 01:14:13 CEST 2001


Preben Randhol wrote:
> 
> Larry Elmore <ljelmore at home.com> wrote on 25/05/2001 (10:07) :
> > What in the world is the GtkAda equivalent to C's "GTK_LABEL (GTK_BIN
> > (kon_tiki1)->child)"???
> 
> Have you tried?
> 
> with Gtk.Bin; use Gtk.Bin;
> 
>   Child := Get_Child (kon_tiki1);

   Parse_Uline(Gtk_Label (Get_Child(Window1.New_Window1)), "_New
Window");

compiles properly, but fails to run:

   raised STORAGE_ERROR : stack overflow (or erroneous memory access)

It looks like the only thing that works is the straightforward but
clunkier approach of adding a bunch of Gtk_Labels to menu items created
without labels. Instead of adding one line of code for each menu item,
it's four lines, plus a fifth one modified. Oh well. At least it
works... (why I didn't try this approach earlier, I haven't the faintest
clue) :-(

Until I get to adding drag'n'drop support, I don't think the rest will
be too bad. I hope! :)

Larry



More information about the gtkada mailing list