[gtkada] Widget destruction problem

manuel.op.de.coul at eon-benelux.com manuel.op.de.coul at eon-benelux.com
Thu Jan 25 17:00:11 CET 2001


What you probably need to do too if you don't want more than
one window if users click your "add" button more than once
is make a check. I use this trick, in your case:

procedure Sim_IF_AddButton1
     (Object : access Gtk.Button.Gtk_Button_Record'Class)
   is
   begin
      if Sim_IF_Window /= null then
         Gtk_New (Sim_IF_Window);
         Show_All (Sim_IF_Window);
      end if;
   end Sim_IF_AddButton1;

----This is the "Cancel" button callback for Window B-------------------

procedure Sim_IF_Cancel_Button
     (Object : access Gtk_Button_Record'Class)
   is
   begin
      Gtk.Widget.Destroy_Cb (Sim_IF_Window);
      Sim_IF_Window := null;
   end Sim_IF_Cancel_Button;

Manuel Op de Coul






More information about the gtkada mailing list