Fix Jira issue #ROOT-6680 Display issues with TGTextEntry

Fix also an issue with partially highlighted text not moving when resizing the text entry