GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

regarding widgets

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
cnu_sree
GTK+ Geek


Joined: 06 Oct 2006
Posts: 57

PostPosted: Tue Sep 18, 2007 12:20 pm    Post subject: regarding widgets Reply with quote

how we can know whether my particular widget is hide or shown
how we can know this is there any function for this .
thank u,inadvance
sree
Back to top
gallen
Familiar Face


Joined: 01 Sep 2007
Posts: 10

PostPosted: Thu Sep 20, 2007 4:02 am    Post subject: Reply with quote

Hey mate,

I think the GTK_WIDGET_VISIBLE() macro should do the trick.
eg.
Code: (Plaintext)
1
2
3
4
5
gboolean visible;
GtkWidget *widget;

visible = GTK_WIDGET_VISIBLE(widget);


To find functions look at the GTK API or the lower level API's (say GDK if you are doing drawings).
For common problems like this one you can be assured there is a function in the API for them.

A link to the API is here: http://www.gtk.org/api/
Then click on the GTK api. Note: You can also download the tarball to have an offline reference.

Start at the point where you think the function should be then work your way up the object hierarchy (say if I wanted to make a button inactive I would start at GtkButton. When I can't find an appropriate function there I work back to GtkWidget and find: gtk_widget_set_sensitive() which does the trick).
Back to top
skoona
Familiar Face


Joined: 12 Jan 2007
Posts: 9
Location: Indiana, USA

PostPosted: Fri Oct 12, 2007 6:36 pm    Post subject: GtkWidget signal may help Reply with quote

The GtkWidget parent class also has two signals that I find useful.

The ::hide signal
The ::show signal

They are driven whenever the window changes state between visible and not-visible. I have two callback routines that manage a instance/global variable.

James,
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP