dropdownList           package:widgetTools           R Documentation

_A _w_i_d_g_e_t _t_o _m_i_m_i_c _a _d_r_o_p_d_o_w_n _l_i_s_t

_D_e_s_c_r_i_p_t_i_o_n:

     The current tcltk library does not support dropdown lists unless
     an extension is included. The function dropdownList provide an
     alternative.

_U_s_a_g_e:

     dropdownList(base, options, textvariable, width = 10, default, editable
     = FALSE)
     getListOption(targetWidget, options, height, vScroll = FALSE)

_A_r_g_u_m_e_n_t_s:

    base: 'base' a tkwin object that is the parent frame of the
          dropdown list to be created

 options: 'options' a vector of character strings for the content of
          the dropdown list

textvariable: 'textvariable' a tclVar object to be associated with the
          selected item of the dropdown list

   width: 'width' an integer for the width in number of characters of
          the selection containing part of the dropdown list

 default: 'default' a character string for the default selection that
          is going to be shown in the selection containing window of
          the dropdown list

targetWidget: 'targetWidget' a tkwin object for an entry box to which a
          button will be associated to make the look of a dropdown list

editable: 'editable' a boolean indicating whether the dropdown list
          will be editable or not

  height: 'height' an integer for the height of the dropdown list box.
          If missing, height will be assigned the length of the options
          to be shown in the list box

 vScroll: 'vScroll' a boolean indicating whether a vertical scroll bar
          will be associated with the dropdown list box

_D_e_t_a_i_l_s:

     'base' can be a top window or a frame.

     The widget returns a frame that contains a dropdown list. The
     frame need to be placed using any of the layout methods of tcltk.
     The value of the selection will be accessed through the tclVar
     object passed to the function.

     getListOptions is called by dropdown list to get the selected item

_V_a_l_u_e:

     dropdownList returns a tkwin object for the frame that contains a
     dropdown list

     getListOptions returns a character string for the selected item

_N_o_t_e:

     The functions are part of the Bioconductor project at Dana-Farber
     Cancer Institute to provide Bioinformatics functionalities through
     R

_A_u_t_h_o_r(_s):

     Jianhua Zhang

_R_e_f_e_r_e_n_c_e_s:

     tcltk

_S_e_e _A_l_s_o:

     'tooltip'

_E_x_a_m_p_l_e_s:

     ## Not run: 
         ## These cannot be run by examples() but should be OK when pasted
         ## into an interactive R session with the widgetTools package loaded
         
         base <- tktoplevel()
         selection <- tclVar()
         dropdownList(base, c("Option 1", "Option 2", "Option 3"),
               selection, 15, "Option 2")
         tclvalue(selection)
         # Destroy toplevel widget
         # tkdestroy(base)
     ## End(Not run)

