U++ framework
Do not panic. Ask here before giving up.

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: 705
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 Oct 10 05:57:55 GMT+2 2026

Total time taken to generate the page: 0.00533 seconds