U++ framework
Do not panic. Ask here before giving up.

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 Go to previous messageGo to previous message
nlneilson is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Clipped frame
Next Topic: is there any way to embed a browser window in a U++ window or view the html direclty?
Goto Forum:
  


Current Time: Wed Sep 30 16:29:44 GMT+2 2026

Total time taken to generate the page: 0.00898 seconds