Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » How to reference value of an item on a layout?
icon13.gif  How to reference value of an item on a layout? [message #32578] Wed, 25 May 2011 20:09 Go to next message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member
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
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 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
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.


[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 #32580 is a reply to message #32579] Wed, 25 May 2011 21:17 Go to previous messageGo to next message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member
I tried it. Nothing happened.

Also I want to use the data in a function and put into a variable to pass onto another function to do things based upon input.

I wish this would work, but as I said nothing happened when I put it something in the text box, and hit the button.

David
Re: How to reference value of an item on a layout? [message #32581 is a reply to message #32580] Wed, 25 May 2011 21:29 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1092
Registered: August 2007
Senior Contributor
silverx wrote on Wed, 25 May 2011 22:17

I tried it. Nothing happened.

Also I want to use the data in a function and put into a variable to pass onto another function to do things based upon input.

I wish this would work, but as I said nothing happened when I put it something in the text box, and hit the button.

David


That's interesting, can you compile and run the examples provided with U++ without any errors?

Can you upload a simple testcase which does not work for you, so that I can check it on my configuration?

Regards.



Re: How to reference value of an item on a layout? [message #32582 is a reply to message #32581] Wed, 25 May 2011 22:05 Go to previous messageGo to next message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member
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
  • Attachment: funcmid.zip
    (Size: 1.52KB, Downloaded 185 times)
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 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 1092
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 Cool (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.


[Updated on: Wed, 25 May 2011 22:36]

Report message to a moderator

Previous Topic: Writing hexadecimal to files
Next Topic: [SOLVED] I have a problem linking a LIB
Goto Forum:
  


Current Time: Fri Apr 19 22:32:27 CEST 2024

Total time taken to generate the page: 0.02719 seconds