Re: Type of widget
- From: Tim Müller <zen18864 zen co uk>
- To: gtk-app-devel-list gnome org, Russell Shaw <rjshaw netspace net au>
- Subject: Re: Type of widget
- Date: Wed, 31 Mar 2004 03:33:12 +0100
On Wednesday 31 March 2004 02:57, Russell Shaw wrote:
If i define a GtkWidget as: item=gtk_label_new("thing") or
item=gtk_button_new(), how can i find later whether "item"
is a label or a button?
if (GTK_IS_BUTTON(item))
{
g_print("item is a button.\n");
}
etc.
or
g_print("item is of type '%s'\n", g_type_name(G_OBJECT_TYPE(item)));
Cheers
-Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]