Tk-Thumb wheel

Robert Edsall edsall at geog.psu.edu
Mon Jun 21 14:08:49 EDT 1999


Dave,

>I am trying to provide a GUI to a Vtk application using Tcl/Tk.  The
>question is whether anyone knows about or has developed a thumb wheel or
>better still a vernier dial widget in Tk.  The thumb wheel is similar to a


I've *just* this past week developed a 
little thumbwheel widget for Tcl/Tk.  But 
it's quite cumbersome, and not too pretty.  
There's a thumbwhell Java Bean a friend of 
mine gave me that, graphically, is a just 
a series of four bitmaps that are animated 
and then recylced (i.e. bitmap1, bitmap2, 
bitmap3, bitmap4, bitmap1, bitmap2...).  As 
far as I know (perhaps you know better), Tcl 
can only support X monochrome bitmaps, so I 
had to convert the pretty color-coded thumbwheel 
bitmaps to ugly black-and-white bitmaps, but 
other than that, it's all just the same.  
In general, here's what I did:

1. created a canvas that's the same size 
as the bitmaps, and placed a bitmap of 
the first "frame" of the wheel animation.
2. bound any <b1-motion> on the canvas to 
a proc called "Step," which checks to see 
whether the motion is to the left or the 
right.
3. Upon the move of the mouse 5 pixels to 
the right, I swap the bitmap with "bitmap+1," 
which is the next "frame" of the animation
of the bitmaps.  (If the mouse is moved to 
the left, I swap in "bitmap-1.")
4. I call a proc or vtk Method (like SetPosition 
or RotateX).

I have code if you'd like it, and have the 4 
bitmaps too.  Let me know if you want it, and 
also, if you hear from anyone with other ideas, 
let me know... I'm sure there are better/more 
direct/higher level solutions.  I haven't looked 
into packages like tix and BLT as much as I should...

I'm *very* interested in the vernier dial idea.  
We're working on interfaces for temporal data 
and we're trying to get away from the timeline 
slider ideas... the vernier dials might be 
particularly useful for cyclical information 
(like seasonal or daily pehnomena).  Please
forward to me anything you discover!

Rob

Robert Edsall
Department of Geography
Penn State University
www.geog.psu.edu/~edsall


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list