Hello Gerald
thank you for the code it works perfectly. Since i am new to
canvas your code will help me practicing it.
thank you again
jerome
On Sat, 29 Apr 2006 18:15:30 -0500, "Gerald W. Lester"
<Gerald.Lester@cox.net> wrote:
>suchodj@wanadoo.fr 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@gmail.com>
>> 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.
>>
Received on Sun Apr 30 14:07:29 2006