| Scilab Reference Manual | 
|---|
TK_GetVar — Get a tcl/tk variable value
| o | varname : string character Contains the name of the tcl/tk variable. | 
| o | value : string character Contains the value of the tcl/tk variable 'varname'. | 
When tcl/tk support is enabled in scilab, this routine can be used to retreive the value of a tcl/tk variable.
TK_EvalStr('toplevel .tst1');
// creates a toplevel TK window. 
TK_EvalStr('entry .tst1.e -textvariable tvar');
// create an editable entry
TK_EvalStr('set tvar foobar');
// set the entry value
TK_EvalStr('pack .tst1.e');
// pack the entry widget. It appears on the screen.
text=TK_GetVar('tvar')
// retrieve the variable value
// change the entry text and repeat the last command ...
 
  Bertrand Guiheneuf
| << TK_EvalStr | TK_SetVar >> |