Pygtk scrollbar

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Sep 2006
Posts: 26
Reputation: JyotiC is an unknown quantity at this point 
Solved Threads: 1
JyotiC JyotiC is offline Offline
Light Poster

Pygtk scrollbar

 
0
  #1
Sep 20th, 2006
Hi,
i am using Pygtk to make GUI . I have a frame in which i have added a VBox..
I want to add scrollbar in that VBox.. but couldn't figure out how to add it.
  1.  
  2. vscrollbar = gtk.VSscrollbar(adjustment=None)
  3. AttributeError: 'module' object has no attribute 'VSscrollbar'
it's giving me this error

what should i do?

thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 2
Reputation: paulmal is an unknown quantity at this point 
Solved Threads: 1
paulmal paulmal is offline Offline
Newbie Poster

Re: Pygtk scrollbar

 
0
  #2
Oct 1st, 2006
You have spelt VScrollbar incorrectly, only 1 s!

Regards
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 26
Reputation: JyotiC is an unknown quantity at this point 
Solved Threads: 1
JyotiC JyotiC is offline Offline
Light Poster

Re: Pygtk scrollbar

 
0
  #3
Oct 3rd, 2006
hi,
thank you, the error is resolved.
but i cant seem to put it in use.

i have a long list, which require more than a page to cover up.
i want the scrollbar, so that i can see the whole list.
how do i make it attach to the list.

this is the snippet of the code
  1. def __init__(self):
  2. self.window=gtk.Window(gtk.WINDOW_TOPLEVEL)
  3. self.window.maximize()
  4. self.window.connect("delete_event",self.delete_event)
  5. self.window.connect("destroy",self.destroy)
  6.  
  7. hbox=gtk.HBox(False,1)
  8. vbox=gtk.VBox(False,1)
  9. hbox.pack_start(vbox,False,False,0)
  10. vbox.show()
  11. for i in xrange(100):
  12. label=gtk.Label(str(i))
  13. vbox.pack_start(label,False,False,0)
  14. label.show()
  15.  
  16.  
  17. vbox=gtk.VBox(False,1)
  18. hbox.pack_start(vbox,False,False,0)
  19. vbox.show()
  20. vscrollbar = gtk.VScrollbar()
  21. vbox.pack_start(vscrollbar,True,True,0)
  22. vscrollbar.show()
  23.  
  24. hbox.show()
  25. self.window.add(hbox)
  26. self.window.show()
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 2
Reputation: paulmal is an unknown quantity at this point 
Solved Threads: 1
paulmal paulmal is offline Offline
Newbie Poster

Re: Pygtk scrollbar

 
0
  #4
Oct 3rd, 2006
Hi

It is actually easier to use ScrolledWindow. Here is a link to the pygtk tutorial which gives a good example:

http://www.pygtk.org/pygtktutorial/s...edWindows.html

Regards, Paul
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 26
Reputation: JyotiC is an unknown quantity at this point 
Solved Threads: 1
JyotiC JyotiC is offline Offline
Light Poster

Re: Pygtk scrollbar

 
0
  #5
Oct 4th, 2006
thank you
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,221
Reputation: bumsfeld will become famous soon enough bumsfeld will become famous soon enough 
Solved Threads: 138
bumsfeld's Avatar
bumsfeld bumsfeld is offline Offline
Nearly a Posting Virtuoso

Re: Pygtk scrollbar

 
0
  #6
Oct 4th, 2006
I have used pygtk one little and have found these good resources:
Recommended reading for Python+GTK users
PyGTK 2.0 Tutorial by John Finlay
download from: http://www.pygtk.org/dist/pygtk2-tut.pdf

also:
PyGTK FAQ Index
at: http://www.async.com.br/faq/pygtk/index.py?req=index
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 26
Reputation: JyotiC is an unknown quantity at this point 
Solved Threads: 1
JyotiC JyotiC is offline Offline
Light Poster

Re: Pygtk scrollbar

 
0
  #7
Oct 5th, 2006
thank you,
these links r really helpfull
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC