Training, Open Source computer languages

This is page http://www.wellho.net/forum/The-Tcl- ... guage/how-to-use-scrollbars-for-canvas.html

Our email: info@wellho.net • Phone: 01144 1225 708225

 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
how to use scrollbars for canvas

Posted by vinzy1983 (vinzy1983), 10 December 2004
hi,
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 http://www.wellho.net/book/0-13-022028-0.html) 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 http://www.usenix.org/publications/login/2002-06/pdfs/flynt.pdf

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.

THANKS IN ADVANCE

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 http://www.wellho.net/forum/Assistance/Answers-on-Opentalk.html 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 www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

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