|
|
Home » Community » Newbie corner » How to reference value of an item on a layout?
|
Re: How to reference value of an item on a layout? [message #32579 is a reply to message #32578] |
Wed, 25 May 2011 21:06   |
Oblivion
Messages: 1204 Registered: August 2007
|
Senior Contributor |
|
|
silverx wrote on Wed, 25 May 2011 21:09 | I have tried lots of ways to reference or get the value of an input item on a layout. All seem to get an error.
I even tried what was on the video example of (int)~layoutname.fieldname, and still get errors.
Tried funcmid::funcmid.inStart.GetData();
where funcmid is the layout name. I have tried without the second funcmid, so it was just funcmid.inStart.GetData(); and still errors.
How does one reference or get the value of an input field?
Also how does one change the text on a label for an label on a layout?
All I get is errors about it.
There has to be an easy way to do this?
I have gotten buttons to perform an action when pushed, but haven't been able to change the text label on the button either.
David
|
Hi,
It is fairly easy. you don't have to perform any extra steps. Any widget can be accessed by their names, and they act just like regular U++ widgets.
I attached a very simple U++ example which demonstrates how to modify button labels on the fly and shows how to pass the content of an EditField to a static text box .
Regards.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Wed, 25 May 2011 21:13] Report message to a moderator
|
|
|
|
|
|
Re: How to reference value of an item on a layout? [message #32583 is a reply to message #32582] |
Wed, 25 May 2011 22:35  |
Oblivion
Messages: 1204 Registered: August 2007
|
Senior Contributor |
|
|
silverx wrote on Wed, 25 May 2011 23:05 | You did point me in the right direction. While your example didn't work, it did help me on getting it to work.
I have attached my example of a function for getting part of a string. It now works in windows vista.
I am thinking of writing a book on U++ for other, to be published in America. Which I sure would help U++ to get more noticed by others. Not sure what all it takes from U++ to do this I.E. permission to do this, or if anyone would like to help on it.
I am new to C++, and use windows for GUI. I do know some unix but command code only.
I come from a background of programming in VB 6, and mostly web back ground. But VB 6, will not do what I need done for a program, and I am not sure what if Microsoft programming will do what need.
David
|
Ok, I've tried your example, and congratulations, you have a working, cross-platform U++ example (I've tested it on Kubuntu 11.04/Linux).
I'm sure that people will be eager to help you writing a book on U++, since it is a very effective, and sadly, underrated, rad tool. And the U++ community is very friendly. IMO,the weakest part of U++ is its documentation, so you should familiarize yourself with the provided examples. They will also give you some hints and tips and let you understand U++ way of coding.
Regards.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Wed, 25 May 2011 22:36] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Apr 28 13:35:47 CEST 2025
Total time taken to generate the page: 0.03885 seconds
|
|
|