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 » U++ Widgets - General questions or Mixed problems » Bugfix: DocEdit, not to put back to wantfocus after clicking into it
Bugfix: DocEdit, not to put back to wantfocus after clicking into it [message #43215] Sun, 08 June 2014 19:13 Go to previous message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
The patch:
-------------------------- uppsrc/CtrlLib/DocEdit.cpp --------------------------
index e5344eb..672e581 100644
@@ -257,17 +257,17 @@ void DocEdit::PlaceCaret(int newpos, bool select) {
 }
 
 int DocEdit::GetMousePos(Point p)
 {
 	return GetCursorPos(Point(p.x - 1, p.y + sb - 1));
 }
 
 void DocEdit::LeftDown(Point p, dword flags) {
-	SetWantFocus();
+	SetFocus();
 	int c = GetMousePos(p);
 	int l, h;
 	if(GetSelection(l, h) && c >= l && c < h) {
 		selclick = true;
 		return;
 	}
 	PlaceCaret(c, flags & K_SHIFT);
 	SetCapture();

Edit: changed "clucking" to "clicking" in title

[Updated on: Tue, 17 June 2014 15:50]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Window not scrolling
Next Topic: How to use caret / caretCtrl in a custom control [SOLVED]
Goto Forum:
  


Current Time: Sat Apr 27 20:07:55 CEST 2024

Total time taken to generate the page: 0.03804 seconds