Home » U++ Library support » LineEdit, EditFields, DocEdit » EditField & K_ENTER example (?)
Re: EditField & K_ENTER example (?) [message #19272 is a reply to message #19261] |
Sun, 23 November 2008 22:01 |
sapiency
Messages: 56 Registered: September 2008
|
Member |
|
|
luzr wrote on Sun, 23 November 2008 18:43 |
(this part is a little bit crazy:
std::stringstream ssStream(~tmp);
ssStream >> _count;
_edit.SetData(Sprintf("%d",_count));
- using EditInt would be much easier IMO).
|
you are right.
luzr wrote on Sun, 23 November 2008 18:43 |
You cannot really 'remove' focus, but you can set it to something else.
There is also one more complicated aspect - TopWindow remembers that last child with focus before it was deactivated - and it is independent from being "open" (otherwise, only "open" widgets can have focus). When it reactivates, it restores focucs to that widget.
You can affect it by calling TopWindow::ActiveFocus(ctrl) - that is practically similar to calling ctrl.SetFocus(), but can be called at any time. When TopWindow gets activated, w will have focus (if it is active, it is same as SetFocus).
Mirek
|
ok ... I'm learning more and more . I solved my problem by moving Focus to the parent. In my case just SetFocus().
regards
Reinhard
|
|
|
Goto Forum:
Current Time: Tue May 14 02:52:01 CEST 2024
Total time taken to generate the page: 0.01332 seconds
|