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 » Getting the value/text from a EditField (getting values from an editfield)
Getting the value/text from a EditField [message #59878] Tue, 16 May 2023 08:56 Go to next message
sniffgriff is currently offline  sniffgriff
Messages: 10
Registered: May 2023
Location: NY
Promising Member
Hello friends,

Im sure Im obtuse, but I cant find an example of getting the value of an editfield to use in a function. Im using some windows.h functions, and I want to send a user's editfield text to be saved into windows memory. How do I get the editfield value into a string I can use?
Re: Getting the value/text from a EditField [message #59879 is a reply to message #59878] Tue, 16 May 2023 17:15 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
Hi,

A simple example:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
	EditField edit;
	edit.WhenEnter = [&edit] { String s = ~edit; PromptOK("The text is " + s); };
	TopWindow w;
	w.Add(edit.HCenterPosZ(400).VCenterPosZ());
	w.Run();
}



Best regards,
Oblivion


[Updated on: Tue, 16 May 2023 17:17]

Report message to a moderator

Re: Getting the value/text from a EditField [message #59881 is a reply to message #59879] Wed, 17 May 2023 04:36 Go to previous message
sniffgriff is currently offline  sniffgriff
Messages: 10
Registered: May 2023
Location: NY
Promising Member
Thank you so much for your patience my friend, that worked!
Previous Topic: Is there a way to get desktop mouse coordinates?
Next Topic: Pdf parser/viewer
Goto Forum:
  


Current Time: Sat Jun 15 07:32:56 CEST 2024

Total time taken to generate the page: 0.01297 seconds