Re: [gtk-list] gtk_button_arg




Sascha Ziemann <szi@aibon.ping.de> writes:

> This is the Arg-function of the button widget (99.2):
...

> Is it correct, that the label argument of the button takes a string? I
> would expect it to take a label widget. And I would expect the label
> argument of gtk_label_arg function to take a string.

I think that is right. Just as it is possible to to create
a button with gtk_button_new_with_label ("something"),
it should be easy to create a button and label combination
with the argument stuff.

If you want to get the more complex behavior, you would do
(Completely untested - just copied from simple.c)

  button = gtk_widget_new (gtk_button_get_type (),
			   "GtkWidget::visible", TRUE,
			   NULL);
  label = gtk_widget_new (gtk_label_get_type (),
			   "GtkButton::label", "something",
			   "GtkWidget::parent", button,
			   "GtkWidget::visible", TRUE,
			   NULL);

Regards,
                                        Owen



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