I'm newbie in C++/Tk and want to pass variable which is defined in C++ to command attribute in button. Herewith I'm posting code snippet.
int eoutputvar ; stringstream ss ; string setquery ; ss.str( "set eoutputvar 10" ) ; setquery = ss.str() ; entry(".eoutput") -textvariable(eoutputvar) -width(20) ; button(".b1") -text("click it") -command( setquery ); pack(".eoutput" ) -side("left") ;
My objective here is to set eoutputvar of entry widget when the button is clicked.
Log in to post a comment.
I'm newbie in C++/Tk and want to pass variable which is defined in C++ to command attribute in button.
Herewith I'm posting code snippet.
My objective here is to set eoutputvar of entry widget when the button is clicked.