Re: [gtk-list] gtk-- : What's wrong with this code...?



Jonathan Belson <jon@dookie.demon.co.uk> writes:

>         GSList *gsl = new GSList

No need to call 'new' on this one. It's not a class anyway.

> Any clues?

You do a b1->show(), do you ?

Anyway, this works fine here :

class RBTest : public Gtk_Window {
public:
  Gtk_HBox *b1;
  
  Gtk_RadioButton *render_type1;
  
  RBTest(void);
  
};

RBTest::RBTest(void) {
  
  GSList *gsl; // = new GSList;
  
  show();

  b1 = new Gtk_HBox(false, 0);

  add(b1);

  b1->show();

  render_type1 = new Gtk_RadioButton(NULL, "One");
  b1->pack_start(render_type1, TRUE, TRUE, 0);
  render_type1->show();

  render_type1 = new Gtk_RadioButton(render_type1->group(), "Two");
  b1->pack_start(render_type1, TRUE, TRUE, 0);
  render_type1->show();

  render_type1 = new Gtk_RadioButton(render_type1->group(), "Three");
  b1->pack_start(render_type1, TRUE, TRUE, 0);
  render_type1->show();

}


-- 
					Guillaume.
					http://www.worldnet.fr/~glaurent



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