473,396 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Accessing variables of C++ in Tk

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.

<CODE>
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") ;
</CODE>

My objective here is to set eoutputvar of entry widget when the button is clicked.
Aug 25 '15 #1
0 1191

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Leigh Riley | last post by:
Hi, Can someone tell me if the following is possible? I have a file containing some STATIC variables, and some functions e.g. -------------------------------------------------...
2
by: Domestos | last post by:
Hi all, Okay after reading some text on PHP i have come across my first query... What is the best method in using and accessing varibales... my book gives me three methods but gives pro's and...
8
by: scott | last post by:
hi, sorry if this has been adressed some where elss. if it has plz can you point me to it and ill go read it. any way, i want to declare some variables with in a header file. lets say int i; ...
4
by: Jim Heavey | last post by:
Hello, I have created a form which I intend to use a a dialog box. It has a few controls on that form and I changed the properties of those controls to "public" with the idea that I could access...
2
by: Nathan Sokalski | last post by:
I would like to access variables and functions that I declare in the Global.asax.vb file. However, I am having trouble doing that. What does the declaration have to look like in the Global.asax.vb...
1
by: Nathan | last post by:
Hi, I have created a class library creating a number of forms and a few public variables. I have a project that references the .dll for this class library, and in that project I need to access...
2
by: Jurek Dabrowski | last post by:
hi all, I have a question in reference to accessing variables in another class maybe someone has dealt with before. I have some public variables declared in my main plug-in class...
1
tolkienarda
by: tolkienarda | last post by:
hi all i have an have a script that i include in my program that validates a form, i was wondering if it would be possible to access variables from that script in my main script. example...
6
kaarthikeyapreyan
by: kaarthikeyapreyan | last post by:
Is there any possibility that i could access a the variables that i have defined in a function for example def foo(): i = 10 i = i + 10 I would like to retrieve the value and use it in...
0
by: sectrait | last post by:
I have defined some variables in my test file then i call a function from my test file to src file and verify the result. While using phing it is not working, but if i use php or phpunit to verify it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.