Gtk_Fixed




Can anyone explain how Gtk_Fixed of gtk-- is supposed to work? I tried
something along the lines of

   Gtk_Main   mymain(&argc,&argv);
   Gtk_Window mywindow();
   Gtk_Fixed  myfixed();
   Gtk_Button mybutton("Hi there!");
   
   mywindow.add(&myfixed);
   myfixed.add(&mybutton);
   myfixed.put(mybutton,100,50);
   
   mybutton.show();
   myfixed.show();
   mywindow.show();

   mymain.run();

but, depending on where I put the 'show' calls, this always seems to
yield a working example but runtime errors (complaining about null
children/parents) or nothing at all.


On a related topic: I was looking for a combination of a Gtk_Fixed
widget and a Gtk_DrawingBuffer widget, such that I can draw arbitrary
things at arbitrary locations _and_ put gtk widgets at arbitrary
locations too. How should I do that in gtk--?

Kasper



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]