473,698 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scaling Tk scrollbar handles

None of the online references that I'm using or can find tell you if
this can be done. It's standard practice in GUI's to have the handle of
a scrollbar sized to be the proportion of total ammount of viewable data
to the ammount you can see in the current view region. (I think that
explains it, you know what I mean.) I have a scrollbar attached to a
canvas, and it scrolls properly, but it always has a tiny little handle.
Is there anything I can do about this?

Jul 18 '05 #1
3 2073

"Gordon Airport" <uc*@ftc.gov> schrieb im Newsbeitrag
news:K9******** ************@co mcast.com...
None of the online references that I'm using or can find tell you if
this can be done.


???
This is really no secret!
E.g. look at at New Mexico Tech
http://www.nmt.edu/tcc/help/pubs/lang.html
There are two very concise as well as comprehensive documents. One about Tk,
one about Python.

scrollbar.set(a ,b)

where a is the fraction (0..1) where the thumb shall start and b where it
should end...

Kindly
Michael P

Jul 18 '05 #2
Thanks, I hadn't seen those. There are quite a few documents about this
out there with highly variable readability, comprehensivene ss, and
up-to-date-edness. I think I've been relying on the effbot documents too
much.

Jul 18 '05 #3
Gordon Airport wrote:
None of the online references that I'm using or can find tell you if
this can be done. It's standard practice in GUI's to have the handle of
a scrollbar sized to be the proportion of total ammount of viewable data
to the ammount you can see in the current view region. (I think that
explains it, you know what I mean.) I have a scrollbar attached to a
canvas, and it scrolls properly, but it always has a tiny little handle.


by default, the canvas tells the scrollbars that the canvas surface is
unbounded (-maxfloat to +maxfloat); no matter how you scroll around,
you're only seeing a very small portion of the available coordinate
space.

to get the behaviour you're after, set the "scrollregi on" option.

for some more background and code samples, see:

http://www.effbot.org/zone/tkinter-s...rns.htm#canvas
http://www.effbot.org/zone/tkinter-s...rns.htm#canvas

</F>


Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2643
by: Henk Verhoeven | last post by:
(Reply on this newsgroup to an email - reply by email did not work) Wolfman wrote: > > Hi, > I found your Email in the php Newsgroup. > I was looking for some way to resize some graphiks on my HP , to fit the actual Browser size. So I found this: > > <HTML><HEAD></HEAD>
22
2348
by: Colin McGuire | last post by:
I apologize for posting yet another scrollbar question. Here is my code. All I want is for a diagonal line to appear from coordinates (0,0) to (width,height) in a usercontrol regardless of whether the user autoscrolls the usercontrol (other things that are on the usercontrol I want to scroll, but haven't included any here). Here are the steps to reproduce my problem. 1. Launch Visual Studio and create a new Windows application with...
1
3383
by: johnperkins | last post by:
I am curious as to why the scrollbar.scroll event gets called twice Here is an example of my code Private Sub vsbMoveCar_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles vsbMoveCar.Scrol 'Position the up and down movemen 'Used when the scroll box is move picCar.Top = vsbMoveCar.Valu X +=
5
22512
by: Frank Rizzo | last post by:
I reload the items in the listview on a regular schedule (i.e. clear the listview, then load it up with fresh values). I want add a convinience to the user whereby my application remembers the position of the scrollbars after reloading the data. But I can’t figure out how to retrieve the scrollbar position (both horizontal and vertical). Neither can I figure out how to restore the state of the scrollbars. I could theoretically figure...
4
10555
by: Thiru .Net | last post by:
hi wagner, i have a doubt in panel control in windows application. i have a panel control wherein i have put a picturebox control. i show picture into picturbox control. now i need to zoom in and zoom out the picture in the picturebox control. the picturebox control is within panel(autoscroll is enabled true) scroll bars are enabled.
1
3633
by: placid | last post by:
Hi all, This is the following code i have, Public Class Form1 Inherits System.Windows.Forms.Form Dim A, B, c, U, x, y As Double Dim Red, Green, Blue As Integer
17
2641
by: IanIpp | last post by:
We have a 3 month old quad processor/dual core server running SQL Server 2005 and already it is getting close to hitting the CPU wall. An 8 way CPU box is prohibitively expensive and out of the question. I am looking desperately for a way to TRULY scale out SQL server...in the same way that IIS can be scaled out via App Center. The "in the box" solution for SQL Server 2005 scaling out is the DMV. Unfortunately this solution makes...
1
1644
by: batista | last post by:
Hello to all, I'm using the HScrollBar Control in one of my apps. Now the problem is how to detect that when did the scrollbar reached its right end or left end.? Please Any Suggestions....
2
7443
by: Rich | last post by:
Hello, Some database applicatins have a tooltip feature where when you are dragging the scrollbar of the table view a tooltip appears next to the mouse cursor displaying the approximate record number you are scrolling past (Excel, Access). Sql server has the rownumbers on the Row Header column of its table view. Ideally, I would like to add row numbers to the Row Header column of the datagridview like sql server - Any suggestions...
0
8668
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9152
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8885
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6515
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4358
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2320
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1995
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.