gWidget中更好看的菜单

时间:2015-02-05 03:47:46

标签: r gwidgets

如何在gWidget中拥有更好看的菜单?我在Stackoverflow

中找到了一个代码
library(gWidgets)
options(guiToolkit="RGtk2")
w <- gwindow()
g <- ggroup(cont=w)
do_expand=TRUE
options <- glayout(cont=g, spacing=5, expand=do_expand)
items <- ""

options[1,1] = "vanilla"
options[1,2] <- gcombobox(items, cont=options)

options[2,1] = "expand"
options[2,2, expand=TRUE] <- gcombobox(items, cont=options)

options[3,1] = "expand, fill"
options[3,2, expand=TRUE, fill="y"] <- gcombobox(items, cont=options)

options[4,1] = "size"
options[4,2] <- (cb <- gcombobox(items, cont=options))
size(cb) <- c(250, -1)

## populate comboboxes 
items <- state.name 
sapply(options[,2], function(i) i[] <- items)

创建如下菜单: enter image description here

并说当你使用其中一个下拉菜单时,它会显示如下内容: enter image description here

但是我希望看到如下所示的更加闪亮的外观,任何想法如何在R中创建更好看的GUI(比如使用gWidgets)? enter image description here

0 个答案:

没有答案