Python Forum
[Tkinter] How to place scroll bar correctly
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] How to place scroll bar correctly
I have a listbox that is inside of a frame and when I put a scrollbar with the listbox, I want it to be to the right of the listbox but instead is located at the bottom just to the right. How can I place the scrollbar to the side and right of listbox?

lbframe=Frame(rooms, height=50, width=70, border=1), y=50)

    roomlb = Listbox(lbframe, height=25, width=60, font="courier")

    scrollbar = Scrollbar(lbframe, orient="vertical")
    scrollbar.pack(side="right", fill="y")

Attached Files

I figured it out. When packing the Listbox, I added the following parameters:

roomlb = Listbox(lbframe, height=25, width=65, font="courier")
roomlb.pack(side="left", fill="y")

Possibly Related Threads…
Thread Author Replies Views Last Post
  Treeview scroll selected node to top rfresh737 1 498 Apr-14-2021, 03:27 AM
Last Post: deanhystad
  [Tkinter] canvas widget scroll issue chrisdb 2 700 Apr-07-2021, 05:48 AM
Last Post: chrisdb
  [Tkinter] Help with scroll bars kraco 1 1,016 Sep-27-2020, 11:20 PM
Last Post: Larz60+
  Label.Place did not work? ATARI_LIVE 15 1,546 Sep-18-2020, 04:22 PM
  How to use place holders in tkinter sqlite scratchmyhead 1 748 May-12-2020, 06:13 PM
Last Post: Larz60+
  Scroll frame with MouseWheel Nemesis 1 911 Mar-25-2020, 09:29 PM
Last Post: Nemesis
  [Kivy] Why I have to click twice to scroll? Hummingbird 0 1,289 Jan-06-2020, 09:08 PM
Last Post: Hummingbird
  thinker button gui place next to each other jacklee26 9 2,168 Jul-04-2019, 07:48 AM
Last Post: wuf
  [Tkinter] Scroll Bars going backwards goofygoo 2 1,117 Jun-07-2019, 05:07 PM
Last Post: goofygoo
  [Tkinter] Scroll at cursor position lollo 4 3,754 Jan-31-2018, 11:33 PM
Last Post: lollo

Forum Jump:

User Panel Messages

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