![]() |
Require scroll bars horizontal and vertical throughout the window - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: Require scroll bars horizontal and vertical throughout the window (/thread-19403.html) |
Require scroll bars horizontal and vertical throughout the window - tejgandhi - Jun-27-2019 Hello All, When I try to create scroll bars,horizontal and vertical utilizing grid I get them for particular row and particular column I wanted scroll bar throughout the window how can I do that? Here is my code I have following elements -Display text window -Labels through a for loop (no of labels depend at run time -Entry text boxes -Checkboxes I require vertical and horizontal scroll bars through out the window.I tried utilizing scroll bar for horizontal one but it only creates for one row and one column want to have horizontal and vertical scroll bar throughout the window utilizing grid global master master =Tk() scrollbar = Scrollbar(master,orient="horizontal") scrollbar.grid(column=20, row=20, sticky='NS') display=Text(master,height=10,width=80) display.insert(END,output2) display.grid(row=0) global count for i in range(0,len(count)): Label(master,text= str(i) +"." +output1.split()[i]).grid(row=i+11,sticky=W) rowno = i+11 Label(master,text ="Enter the location ").grid(row=rowno+1,sticky=W) global EnterLocation EnterLocation = Entry(master) EnterLocation.grid(row=rowno+1,column=1) Label(master,text ="Enter the sequence number").grid(row=rowno+2,sticky=W) global imageid imageid = Entry(master) imageid.grid(row=rowno+2,column=1) c = Checkbutton(master, text="c1", variable=var1).grid(row=rowno+3,sticky=W) # print(var1.get()) global var2 var2 =IntVar() c= Checkbutton(master,text="c2",variable=var2).grid(row=rowno+4,sticky=W) global var3 var3= IntVar() c= Checkbutton(master,text="c3",variable=var3).grid(row=rowno+5,sticky=W) global var4 var4= IntVar() c= Checkbutton(master,text="c4",variable=var4).grid(row=rowno+6,sticky=W) global var5 var5= IntVar() c= Checkbutton(master,text="c5",variable=var5).grid(row=rowno+7,sticky=W) global var6 var6= IntVar() c= Checkbutton(master,text="c6",variable=var6).grid(row=rowno+8,sticky=W) global var7 var7= IntVar() c= Checkbutton(master,text="c7",variable=var7).grid(row=rowno+9,sticky=W) global var8 var8= IntVar() c= Checkbutton(master,text="c8",variable=var8).grid(row=rowno+10,sticky=W) global var9 var9= IntVar() c= Checkbutton(master,text="c9",variable=var9).grid(row=rowno+11,sticky=W) RE: Require scroll bars horizontal and vertical throughout the window - woooee - Jun-27-2019 From http://effbot.org/tkinterbook/scrollbar.htm Note that master/Tk() is not in this list Quote:The Scrollbar widget is almost always used in conjunction with a Listbox, Canvas, or Text widget. Horizontal scrollbars can also be used with the Entry widget.There are many examples on the web. RE: Require scroll bars horizontal and vertical throughout the window - tejgandhi - Jun-28-2019 Hello , I wanted a horizontal and vertical scroll bar on the main window. Thanks and Regards Tej Gandhi |