| | |
Pygtk scrollbar
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Sep 2006
Posts: 26
Reputation:
Solved Threads: 1
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.
it's giving me this error
what should i do?
thanks in advance
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.
Python Syntax (Toggle Plain Text)
vscrollbar = gtk.VSscrollbar(adjustment=None) AttributeError: 'module' object has no attribute 'VSscrollbar'
what should i do?
thanks in advance
•
•
Join Date: Sep 2006
Posts: 26
Reputation:
Solved Threads: 1
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
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
Python Syntax (Toggle Plain Text)
def __init__(self): self.window=gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.maximize() self.window.connect("delete_event",self.delete_event) self.window.connect("destroy",self.destroy) hbox=gtk.HBox(False,1) vbox=gtk.VBox(False,1) hbox.pack_start(vbox,False,False,0) vbox.show() for i in xrange(100): label=gtk.Label(str(i)) vbox.pack_start(label,False,False,0) label.show() vbox=gtk.VBox(False,1) hbox.pack_start(vbox,False,False,0) vbox.show() vscrollbar = gtk.VScrollbar() vbox.pack_start(vscrollbar,True,True,0) vscrollbar.show() hbox.show() self.window.add(hbox) self.window.show()
•
•
Join Date: Sep 2006
Posts: 2
Reputation:
Solved Threads: 1
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
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
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
![]() |
Similar Threads
Other Threads in the Python Forum
- Previous Thread: Is Python really that buggy?
- Next Thread: Sort a List of Tuples by Index
| Thread Tools | Search this Thread |
Tag cloud for Python
abrupt ansi anti apache approximation array backend beginner binary book builtin calculator chmod code converter countpasswordentry curved dan08 dictionaries dictionary drive dynamic examples excel file filename float format function gui heads homework import inches input java launcher library line lines linux list lists loop mouse mysql mysqlquery number numbers numeric output parsing path phonebook plugin pointer port prime programming progressbar projects py2exe pygame pyqt pysimplewizard python random recursion redirect refresh scrolledtext software statictext statistics string strings sum table terminal text textarea thread threading time tkinter tlapse trick tricks tuple tutorial twoup ubuntu unicode urllib urllib2 variable windows wordgame write wxpython






