Home » Community » Newbie corner » text box action with enter key
Re: text box action with enter key [message #25092 is a reply to message #25091] |
Wed, 10 February 2010 05:49 |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
Thanks Aris. I am new to C++ GUI and upp.
I am lost on how to use the code you posted.
For a simple app re text only when enter key pushed (K_ENTER ?).
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
GUI_APP_MAIN
{
TopWindow app;
app.SetRect(0, 0, 200, 60);
EditField box1, box2;
app.Add(box1.TopPosZ(0, 20).HSizePos());
app.Add(box2.TopPosZ(20, 20).HSizePos());
box2<<= ~box1;
// box2<<= conv(~box1, units, decpl);
app.Run();
}
Having the data typed into box1 go to box2 only when K_ENTER.
My upp Gui works good and converts angles decimal degrees to deg min sec, converts distance meters, km, feet, miles nautical miles, etc.
Calculate the geodesic distance with the Vincenty Formula/s. There are some situations where data typed in like miles it should be acted on by K_ENTER rather than and before a calculation function is called.
[Updated on: Wed, 10 February 2010 05:53] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Jun 01 23:45:22 CEST 2024
Total time taken to generate the page: 0.02338 seconds
|