HI, I need known the position of mouse, but i not know how obtain the
parameter %X used in tcl. the script in Tcl is:
set w .probe
catch {destroy $w}
toplevel $w
proc Captura_Datos { ancho alto } {
puts "El ancho es $ancho"
puts "El alto es $alto"
} bind $w <Configure> "Captura_Datos %X %Y"
In R
w<-tktoplevel()
f<-function(a,b)^`
print(a)
print(b)
tkbind(w,"<Configure>",f(%X,%Y))
Not works. How to do this? thanks Ruben
solares at unsl.edu.ar writes:> HI, I need known the position of mouse, but i not know how obtain the > parameter %X used in tcl. the script in Tcl is: > > set w .probe > catch {destroy $w} > toplevel $w > proc Captura_Datos { ancho alto } { > puts "El ancho es $ancho" > puts "El alto es $alto" > } bind $w <Configure> "Captura_Datos %X %Y" > > In R > w<-tktoplevel() > f<-function(a,b)^` > print(a) > print(b) > > tkbind(w,"<Configure>",f(%X,%Y)) > Not works. How to do this? thanks RubenYou need to pass a function which has arguments named X and Y. Check the demos (notably tkcanvas). -- 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