Python Forum
Require scroll bars horizontal and vertical throughout the window
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Require scroll bars horizontal and vertical throughout the window
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

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')

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)
Label(master,text ="Enter the sequence number").grid(row=rowno+2,sticky=W)
global imageid
imageid = Entry(master)

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)
From 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.
Hello ,

I wanted a horizontal and vertical scroll bar on the main window.

Thanks and Regards
Tej Gandhi

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] command require close window Krissstian 14 1,118 Nov-19-2022, 04:18 PM
Last Post: Krissstian
  [PyQt] QTableView: scroll to top cell of the screen random_nick 2 1,020 Oct-08-2022, 12:29 AM
Last Post: random_nick
Photo [PyQt] Connecting progress bars to sensors anastejzja 1 657 May-28-2022, 09:09 AM
Last Post: Axel_Erfurt
  [PyQt] How do I get a QScrollArea to scroll? LavaCreeperKing 9 4,647 Oct-29-2021, 08:33 AM
Last Post: Axel_Erfurt
  Treeview scroll selected node to top rfresh737 1 2,022 Apr-14-2021, 03:27 AM
Last Post: deanhystad
  [Tkinter] canvas widget scroll issue chrisdb 2 2,627 Apr-07-2021, 05:48 AM
Last Post: chrisdb
  [Tkinter] Vertical Tabs Alignment in Tkinter muhammadasim 2 4,262 Oct-05-2020, 08:40 AM
Last Post: Larz60+
  [Tkinter] Help with scroll bars kraco 1 1,812 Sep-27-2020, 11:20 PM
Last Post: Larz60+
  [PyQt] Help: check content of combobox in horizontal header of QTableWidget mart79 1 2,430 Jul-26-2020, 06:18 PM
Last Post: deanhystad
  [Tkinter] How to place scroll bar correctly scratchmyhead 1 3,217 May-18-2020, 04:17 PM
Last Post: scratchmyhead

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020