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 » DocEdit bug
DocEdit bug [message #10218] Mon, 25 June 2007 23:43 Go to next message
zsolt is currently offline  zsolt
Messages: 693
Registered: December 2005
Location: Budapest, Hungary
Contributor
After calling NoWantFocus(), the needed behaviour would be to accept focus when clicking in the DocEdit, but to not accept using keyboard navigation (TAB).
Currently, it is unable to accept focus aon mouse clicks, so the control is not editable. Fix:
void DocEdit::LeftDown(Point p, dword flags) {
	//SetWantFocus(); //removed
	SetFocus(); //added


I think, LineEdit has the same problem.
Re: DocEdit bug [message #10222 is a reply to message #10218] Tue, 26 June 2007 00:04 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
zsolt wrote on Mon, 25 June 2007 17:43

After calling NoWantFocus(), the needed behaviour would be to accept focus when clicking in the DocEdit, but to not accept using keyboard navigation (TAB).
Currently, it is unable to accept focus aon mouse clicks, so the control is not editable. Fix:
void DocEdit::LeftDown(Point p, dword flags) {
	//SetWantFocus(); //removed
	SetFocus(); //added


I think, LineEdit has the same problem.


This is a very good point, but right now I am not sure it is OK (despite possible documentation).

Theory: If widget does not want focus, it simply does not want to get it by any user action (neither Tab or Click), end of the story...

(This does not mean I strongly agree with you, just I am not sure...)

Mirek
Re: DocEdit bug [message #10224 is a reply to message #10222] Tue, 26 June 2007 00:33 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 693
Registered: December 2005
Location: Budapest, Hungary
Contributor
You are right, but AFAIK, currently, all upp controls are working, as I described in my first post (except for DocEdit and LineEdit).

Quote:


Theory: If widget does not want focus, it simply does not want to get it by any user action (neither Tab or Click), end of the story...

I think, this can be acheived using SetEditable(false) as well. Maybe the WantFocus name is not the best, something like WantKeyboardFocus would be better, but I think, this behaviour is needed. I use this for controls, I don't want to be in TAB sequence, such as buttons or some other controls in some special windows.

But a consistent behaviour would be good.
Re: DocEdit bug [message #10226 is a reply to message #10224] Tue, 26 June 2007 07:55 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
zsolt wrote on Mon, 25 June 2007 18:33

You are right, but AFAIK, currently, all upp controls are working, as I described in my first post (except for DocEdit and LineEdit).



AFAIK, not true. Check ArrayCtrl::LeftDown, TreeCtrl::LeftDown etc...

The exception is EditField, where in fact it most likely should be fixed...
Re: DocEdit bug [message #10232 is a reply to message #10226] Tue, 26 June 2007 13:11 Go to previous message
zsolt is currently offline  zsolt
Messages: 693
Registered: December 2005
Location: Budapest, Hungary
Contributor
Uhh. These are not good news for me Sad
Are there any plans to implement something like WantKeyboardFocus()?
Previous Topic: EditString: how to convert data with "~" operator to char*?
Next Topic: TextCtrl not working
Goto Forum:
  


Current Time: Thu Mar 28 13:21:58 CET 2024

Total time taken to generate the page: 0.01594 seconds