[R] tcltk - tkcreate question

2003-11-27 Thread Thomas Stabla
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

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] tcltk - tkcreate question

2003-11-27 Thread Peter Dalgaard
Thomas Stabla [EMAIL PROTECTED] 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
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] tcltk - tkcreate question

2003-11-27 Thread Thomas Stabla
On 27 Nov 2003, Peter Dalgaard wrote:

 Thomas Stabla [EMAIL PROTECTED] 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)


Works fine, thank you for your fast help.

Best regards,
Thomas Stabla

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help