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 Nov 26, 2014 10:55 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: scrollbar problem
PostPosted: Fri Mar 30, 2007 11:43 am 
Offline
GTK+ Guru

Joined: Thu Nov 16, 2006 5:08 am
Posts: 259
Location: INDIA
hi all
i am using clist
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (ScrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);

i used this for scrollbar.
i am adding some data in to clist
but scrollbar is sometimes showing,
and some times not.
the scrollbar should be automatic.

is there any example for this.

how can i do this

please help me

thank you


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 30, 2007 1:39 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
GTK_POLICY_AUTOMATIC means that the scrollbar is only shown when it is needed. If you want it to always show, use GTK_POLICY_ALWAYS.

Also, are you using GTK+ 1.2? GtkCList is depreciated in GTK+ 2.0+ in favor of GtkTreeView.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject: thank you for quick replay
PostPosted: Sat Mar 31, 2007 3:38 am 
Offline
GTK+ Guru

Joined: Thu Nov 16, 2006 5:08 am
Posts: 259
Location: INDIA
openldev wrote:
GTK_POLICY_AUTOMATIC means that the scrollbar is only shown when it is needed. If you want it to always show, use GTK_POLICY_ALWAYS.

Also, are you using GTK+ 1.2? GtkCList is depreciated in GTK+ 2.0+ in favor of GtkTreeView.


yeah.
some times it is not showing.
i dont need always.

help me

thank you in advance


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 31, 2007 2:45 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
If you are using AUTOMATIC, the scrollbar will hide itself when it is not needed and show itself when it is. However, if you are certain that it is not doing this at the correct time, you should try adding it with gtk_scrolled_window_add_with_viewport(). It might just be a problem with the GtkCList widget. Although, unless you are using GTK+ 1.x, I would very much encourage you to use GtkTreeView. GtkCList is depreciated and if you ask anyone for help anywhere, that will be their response.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


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

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 5 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group