How to fill a combo box with numbers like 2,3,4,5 ,when the user select the number , after that a button coded with clustering will take the value from the combo box to do the selected number of clustering.
Need help .
In case someone wants an answer, here is a sketch using gWidgets2:
gWidgets2
w <- gwindow() g <- gvbox(cont=w) e <- gedit("5", cont=g, coerce=as.integer) cb <- gcombobox(1:5, cont=g) b <- gbutton("do clustering", cont=g) addHandlerChanged(e, handler=function(h,...) { ## check svalue(e) is non-NA cb[] <- seq_len(svalue(e)) }) addHandlerClicked(b, handler=function(h,...) { print(sprintf("Do clustering with %s", svalue(cb))) })
Copyright © 2021 Jogjafile Inc.
In case someone wants an answer, here is a sketch using
gWidgets2
: