Re: [R] tk combobox question

From: JeeBee <>
Date: Thu 10 Aug 2006 - 07:19:25 EST

I think you want something like this:

  require(tcltk) || stop("Package tcltk is not available.")   version.BWidget <- tclvalue(tclRequire("BWidget"))

  modify_command <- function() {
    print("Hey, I'm modified...")

  tt <- tktoplevel()

  values = c("foo", "bar", "jeebee")
  combo <- tkwidget(tt, "ComboBox", "-modifycmd",

                    modify_command, values=values)

> How can I get the index of the selected item in an Iwidgets combobox? Till now I
> am only able to get the contents of the selected combobox item.

For BWidget:

I haven't used Iwdigets yet...

JeeBee. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu Aug 10 08:56:27 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 10 Aug 2006 - 20:20:52 EST.

Mailing list information is available at Please read the posting guide before posting to the list.