Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
how to use scrollbars for canvas

Posted by vinzy1983 (vinzy1983), 10 December 2004
i want to use scrollbar for a canvas.
can someone please tell me how to do this

Posted by admin (Graham Ellis), 11 December 2004
Create a frame, and grid a canvas and two scrollbars within it.

Define the visible size of the canvas via -width and -height, and the overall size with the -scrollregion.

Tie the two scrollbar's events to the canvas using the -xscrollcommand and -yscrollcommand on the canvas.

Set the highlight thickness and border widths to 0 in order to avoid them occupying any of the visible canvas area.

Posted by vinzy1983 (vinzy1983), 13 December 2004
could u pls provide me any examples for doing that..
because i am facing problems while providing the options for canvas.

do i need to use the grid command fro placing the canvas and scrollbar on the frame..

Posted by admin (Graham Ellis), 13 December 2004
I don't have an example that's within my copyright to reproduce here, but there is a good example in "Practical Programming in Tcl and Tk" (see on page 474.  The best example I could find online (I've just had a quick search - I'm sure there are more) is at

And, yes, you place the scollbar and canvas on the frame with the grid command.

Posted by vinzy1983 (vinzy1983), 13 December 2004
don'y mind, but, now could you please tell me how grid them together in a  canvas.
because i haven't used grid command in tk till now..
but i have an urgency to complete my work .
so would be a great favour from your side if u could please help me in this topic.


Posted by admin (Graham Ellis), 13 December 2004
I'm just about to leave home to give a training course, so much as I would like to do you the great favour, I can't at the moment. The two references in my previous answer both include worked examples, including the use of grid. One of the references is online and available for you to read.

A previous answer at may also help give you some further insite into what I we can provide here, and the timescale put on answering.

Posted by vinzy1983 (vinzy1983), 13 December 2004
it's ok thank you.
i got it solved without using grid..

thank you once again..

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2022: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho