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 #25125 is a reply to message #25090] Thu, 11 February 2010 21:25 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
nlneilson wrote on Tue, 09 February 2010 20:29


In Java it is done like this:
public void propertyChange(PropertyChangeEvent e) {
    Object source = e.getSource();
    if (source == point1Field) {
        point1Action();
	return;
    }
}




You can do very similiar thing in U++, as key delivery starts at focused widget, but moves up until Key returns true.

So you can do

void MyDialogWindow::Key(dword code, int)
{
    if(point1Field.HasFocus()) {
         point1Action();
         return;
    }
}


Good to know to manage some more complex cases...
 
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: Tue Jun 16 12:21:00 GMT+2 2026

Total time taken to generate the page: 0.00685 seconds