Hello, i'm trying to translate following tcltk source code, which I found in newsgroup comp.lang.tcl, written by Tom Wilkason, into R Code. proc scrolled_Canvas {base} { frame $base.fm -borderwidth 2 -relief sunken canvas $base.fm.cv -yscrollcommand "$base.fm.cv_vertscrollbar set" scrollbar $base.fm.cv_vertscrollbar -orient vertical \ -command "$base.fm.cv yview" pack $base.fm.cv -side left -fill both -expand true pack $base.fm.cv_vertscrollbar -side right -fill y pack $base.fm -side top -fill both -expand true set hull [frame $base.fm.cv.hull -borderwidth 2 -relief ridge] set wid [winfo width $base.fm] $base.fm.cv create window 0 0 -anchor nw -window $hull -width 10 -height 500 -tag window bind $base.fm.cv <Configure> "ResizeCanvas %W %w %h" return $hull } I have successfully translated the code until the line $base.fm.cv create window 0 0 -anchor nw -window $hull -width 10 -height 500 -tag window which i don't fully understand because i started with tcltk just this week. I tried to translate this line using the R function tkcreate, but i didn't get very far. Thanks for your help. Greetings, Thomas Stabla
Thomas Stabla <statho3 at web.de> writes:> > I have successfully translated the code until the line > > $base.fm.cv create window 0 0 -anchor nw -window $hull -width 10 -height 500 -tag window > > which i don't fully understand because i started with tcltk just this > week. > > I tried to translate this line using the R function tkcreate, but i didn't > get very far.I assume you got the canvas ($base.fm.cv) stored in a variable, "cv", say, and "hull" similarly. Then my first guess would be tkcreate(cv, "window", 0, 0, anchor="nw", window=hull, width=10, height=5, tag= "window") -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Possibly Parallel Threads
- tcltk, X11 protocol error: Bug?
- [PATCH] Make outputDeviceForGeometry behave smarter when dealing with overlapping outputs. Currently, the current output is returned if some part of the rectangle is on it; otherwise the output device the rectangle center is on is returned. This works
- Problem with tcltk listbox
- Drawing a graph with vertices and edges using tcl/tk
- Difficulties with R.oo (static fields, etc.)