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

Home » U++ Library support » U++ Widgets - General questions or Mixed problems » How to handle copy & paste with focus changing
How to handle copy & paste with focus changing [message #48457] Wed, 05 July 2017 11:53 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
Hi all!

I have an interesting problem: I'm implementing an IDE and it is similar to TheIDE: it has CodeEditors above and error messages bellow. The error messages are displayed in a read-only LineEdit. When the user does a mouse up on the LineEdit, the error around the cursor is parsed and the CodeEditor get's placed on the right line and column and receives focus so that the blinking cursor will give the sue feedback on where the error is.

Pretty standard stuff. Unfortunately, after the set focus, when selecting an error, you can no longer copy & paste from the LineEdit, since it is no longer focused.

So far the only partial solution I found is to exist the error message parse when there is a selection active in the linedit:
if (console.GetSelection().GetLength() != 0)
		return;


Is there a more elegant solution to redirect the focus for copy & paste?

Thanks!
 
Read Message
Read Message
Previous Topic: how to catch CodeEditor keys?
Next Topic: X11 middle mouse copy paste in own widget [SOLVED]
Goto Forum:
  


Current Time: Fri Nov 20 16:23:57 GMT+1 2026

Total time taken to generate the page: 0.01022 seconds