Scroll bars, especially the vertical, are displayed at the end of the region. They appear to function well otherwise.
Code: - #test_scroll_bar_2_pack.py
-
from tkinter import *
-
-
t = Tk()
-
-
c = Canvas(t)
-
hsb = Scrollbar(t, orient="h", command=c.xview)
-
vsb = Scrollbar(t, orient="v", command=c.yview)
-
c.configure(yscrollcommand=vsb.set, xscrollcommand=hsb.set)
-
-
c.pack()
-
hsb.pack(side=BOTTOM, fill=X)
-
vsb.pack(side=RIGHT, fill=Y)
-
-
###t.grid_rowconfigure(0, weight=1)
-
###t.grid_columnconfigure(0, weight=1)
-
-
-
for x in range(100, 5000, 100):
-
for y in range(100, 5000, 100):
-
c.create_text((x,y), anchor=CENTER, text="%d,%d" % (x,y))
-
c.configure(scrollregion = (0, 0, 5000, 5000))
-
-
t.mainloop()
0 1383 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Mickel Grönroos |
last post by:
Hi,
I have a Tkinter.Canvas of variable width. Is there a standard way of
asking the canvas which parts of it that is visible? I.e. on the
horizontal scale, I would like to know at what fraction...
|
by: Askari |
last post by:
Hi,
I do a "perso"widget where have two scrolls (one vertical, one
horizontal) for a canvas.
When, the first time, I added widget in the canvas, the scroll self-ajust
and when I move scrollbar,...
|
by: PhilC |
last post by:
Hi Folks,
I'm trying to click on a canvas to draw a line. The canvas has scroll
bars. All is well until I move the scrollbars. This naturally because
the relationship between my screen click and...
|
by: syed_saqib_ali |
last post by:
Please take a look at and run the code snippet shown below.
It creates a canvas with vertical & Horizontal scroll-bars.
If you shrink the window to smaller than the area of the canvas, the...
|
by: William Gill |
last post by:
I need to display a couple of labels and a checkbox from each entry in
my database. Simple enough, but there are several hundred records, and
I only want to display 5 or 10 at a time. Can this be...
|
by: Jeremy Chapman |
last post by:
I've got a grid inside a div so that it's got scroll bars around it.
What I want to do is have the header row fixed at the top, so that the
vertical scroll bars scroll just the data rows of the...
|
by: John McMonagle |
last post by:
I tried binding mouse wheel events (<Button-4>, <Button-5>) to a Tkinter
Canvas widget with the hope of using the event.delta value to
subsequently scroll the Canvas.
However, it seems that...
|
by: Shankartalukdar |
last post by:
Dear all,
I am currently drawing a visualization tool in python using Tkinter. I would like to know how to add scroll bars into the canvas widget using the Tkinter module.Could you...
|
by: Haiyan |
last post by:
Dear experts:
I am trying to add one xy-scrollbar on the canvas, then put lots of check buttons on the canvas. I got at least following 2 problems:
1.I can see the y-scroll bar but contents on...
|
by: ilya Kraft |
last post by:
Hello I have this interactive canvas as a background of my web, it is on 100% width and high, but when I add content that continues longer than canvas and you have to scroll down, canvas is not...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |