Re: help image scrolling
- From: "Gerald W. Lester" <Gerald.Lester@xxxxxxx>
- Date: Sat, 29 Apr 2006 18:15:30 -0500
suchodj@xxxxxxxxxx wrote:
Hello Aric
i downloaded Tcl/Tk 8.5a4 from http://www.equi4.com/pub/tk/8.5a4/.
As you said it works fine. Since it has not the package "Img" i had
to convert my picture from "jpg" to "gif". Many thanks.
One more question please :
supposing there is no Tcl/Tk 8.5.x and i have only Tcl/Tk 8.4.x
how can i visualize pictures and scroll them horizontal and vertical ?
thanks in advance
Prior to 8.5, text widgets minimum scrolling was a line at a time.
Try a canvas widget instead, as in:
package require image
scrollbar .hsb -orient horizontal -command [list .c xview]
scrollbar .vsb -orient vertical -command [list .c yview]
canvas .c \
-xscrollcommand [list .hsb set] \
-yscrollcommand [list .vsb set]
grid .c -row 1 -column 1 -sticky nsew
grid .vsb -row 1 -column 2 -sticky ns
grid .hsb -row 2 -column 1 -sticky ew
grid columnconfigure . 1 -weight 1
grid rowconfigure . 1 -weight 1
set im [image create photo im -file {04.jpg}
.c create image 0 0 -image im
.c configure -scrollregion [.c bbox all]
jerome
On 29 Apr 2006 13:21:05 -0700, "Aric Bills" <aric.bills@xxxxxxxxx>
wrote:
Scrolling has been enhanced in Tk 8.5. If you use the ActiveTcl 8.5
beta, an 8.5 tclkit, or some other incarnation of Tcl 8.5, your code
should work okay.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.
- Follow-Ups:
- Re: help image scrolling
- From: suchodj
- Re: help image scrolling
- From: suchodj
- Re: help image scrolling
- References:
- help image scrolling
- From: suchodj
- Re: help image scrolling
- From: Aric Bills
- Re: help image scrolling
- From: suchodj
- help image scrolling
- Prev by Date: Couldn't load library (libmysqltcl.dll)
- Next by Date: Re: help image scrolling
- Previous by thread: Re: help image scrolling
- Next by thread: Re: help image scrolling
- Index(es):
Relevant Pages
|