Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
sapiency is currently offline  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).


Wink 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 Wink. I solved my problem by moving Focus to the parent. In my case just SetFocus().

regards

Reinhard
 
Read Message
Read Message
Read Message
Previous Topic: Focus Event Handling in Edit Fields
Next Topic: EditString and custom msg on status bar
Goto Forum:
  


Current Time: Tue May 14 02:52:01 CEST 2024

Total time taken to generate the page: 0.01332 seconds