Home » U++ Library support » U++ Library : Other (not classified elsewhere) » SOLVED how to intercept the ENTER key
SOLVED how to intercept the ENTER key [message #18858] |
Wed, 29 October 2008 11:35 |
|
forlano
Messages: 1186 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
Hello,
I have a class (window) AdvancedBrowser in which there are two classes bp1 and bp2. Both bp1 and bp2 contains a column list called slist.
The problem: when I press the ENTER key in the columnlist I would like to distinguish between the two in order to peform the appropriate action.
I've overrided the Key() method below. Unfortunetely after I've clicked in both slist the key pressure return always the slist in bp1.
Is there a way to understand from where the key RETURN is pressed?
Thanks,
Luigi
bool AdvancedBrowser::Key(dword key, int count)
{ if(key == K_ENTER) {
if (bp1.slist.IsCursor()) Exclamation("key bp1");
else if (bp2.slist.IsCursor()) Exclamation("key p2");
return true;
}
return TopWindow::Key(key, count);
}
[Updated on: Wed, 29 October 2008 19:01] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu May 23 16:41:44 CEST 2024
Total time taken to generate the page: 0.02328 seconds
|