GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Sep 24, 2014 12:24 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: regarding widgets
PostPosted: Tue Sep 18, 2007 12:20 pm 
Offline
GTK+ Geek

Joined: Fri Oct 06, 2006 6:37 am
Posts: 57
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 20, 2007 4:02 am 
Offline
Familiar Face

Joined: Sat Sep 01, 2007 7:16 am
Posts: 10
Hey mate,

I think the GTK_WIDGET_VISIBLE() macro should do the trick.
eg.
Code:
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).


Top
 Profile  
 
 Post subject: GtkWidget signal may help
PostPosted: Fri Oct 12, 2007 6:36 pm 
Offline
Familiar Face

Joined: Fri Jan 12, 2007 2:20 am
Posts: 15
Location: Indiana, USA
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,

_________________
James,
-----------------------------------------
Registered Linux User #270764
FC8 on Intel Quad
FC9 on AMD 4800+ X2
FC9 on Dual AMD-MP 2400+
Author: {gfhcm, gkrellfah2,gapcmon}.sourceforge.net


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group