writeText            package:widgetTools            R Documentation

_F_u_n_c_t_i_o_n_s _t_h_a_t _r_e_a_d _f_r_o_m _a_n_d _w_r_i_t_e _t_o _t_c_l_t_k _w_i_d_g_e_t_s

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

     These functions provide some of the common read and write
     operations for tcltk widgets

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

     writeText(widget, value, clear = TRUE)
     writeList(widget, value, clear = TRUE)
     getListValue(which)
     getTextValue(which)
     getEntryValue(which)

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

  widget: 'widget' a tkwin object for the tcltk widget to be read or
          written to

   value: 'value' the text of numerical value to be written to a tcltk
          widget

   clear: 'clear' a boolean to indicate whether a value will append to
          the existing one (FALSE)

   which: 'which'

     a tkwin object for the tcltk widget whose value will be retrieved

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

     'writeText' writes to a given tcltk text box widget.

     'writeList' writes to a given tcltk list or entry box widget.

     'getListValue' retrieves the selected value in a tcltk list
     widget.

     'getTextValue' retrieves the value of a text box.

     'getEntryValue' retrieves the value of an entry box.

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

     'getListValue' returns the selected value in a tcltk list widget.

     'getTextValue' returns the value of a text box.

     'getEntryValue' returns the value of an entry box.

_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:

     R tcltk

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

     'basicPW-class', 'widget-class'

_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

         # Create the widgets
         base <- tktoplevel()
         list <- tklistbox(base, width = 20, height = 5)

         entry <- tkentry(base)
         text <- tktext(base, width = 20, height = 5)
         tkpack(list, entry, text)
         # Write and read from the widgets
         writeList(list, c("Option1", "Option2", "Option3"))
         writeList(entry, "An Entry box")
         writeText(text, "A text box")
         # Will be NULL if not selected
         getListValue(list)
         getTextValue(text)
         getEntryValue(entry)
     # Destroy toplevel widget
     #    tkdestroy(base)
     ## End(Not run)

