[R] tcltk: help with tkmenubutton
Alberto Monteiro
albmont at centroin.com.br
Fri Oct 19 13:27:48 CEST 2007
I am struck here. What magic inchantation is required with tkmenubutton?
I am converting the examples of Perl/Tk from page...
http://gd.tuwien.ac.at/languages/perl/Hajji-Perlkurs/part4/tkperl.html
... to R's tcltk.
But I don't know how to convert one line in this example:
library(tcltk)
# create a main window
mw <- tktoplevel()
# a menu consists of a horizontal menubar,
# with associated submenus
##### first create the horizontal menubar
mb <- tkframe(mw, relief = 'raised', bd = 2)
# now put in the menubar some menubuttons
m_file <- tkmenubutton(mb, text = "File", underline = 0)
# pack everything from the menubar
tkpack(mb, side = "top", fill = "x")
tkpack(m_file, side = "left")
#### now create the submenus
# the file menus
#
# HERE!!! What is the magic inchantation that I must use here?
#
# $m_file->command(-label => "New", -command => [\&file, "new"]);
#
#
Alberto Monteiro
More information about the R-help
mailing list