C++ Builder IDE >> TMemo - SelLength = 0 not clear highlighting

by Alan Agnew » Wed, 07 Sep 2005 00:04:52 GMT

Have a TMemo control which contains a file name in its text on a line by
itself.
Have a OnDblClick event handler that establishes the beginning and end
of the line so that the file name can be retrieved from TMemo->SelText.
I then set SelLength = 0.
If I then do a shell open of the file name, thus taking focus from the
TMemo, I end up with the "word" containing the cursor highlighted.

What can I do to either end up with no highlighting, or the whole file
name highlighted even when it includes spaces.

Alan


Similar Threads

1. For Jeff Partch - How to clear highlighted results

2. Syntax highlighting in a TMemo?

Can anyone suggest an easy and efficient way to perform syntax 
highlighting in a TMemo? Or a richedit, whichever is best. Basically all 
I need to know is how to change the color of only a small portion of the 
text. If anyone has any ideas I'd love to hear them.

regards,
Rory.

3. TRichEdit/TMemo derived Syntax Highlighting - Borland C++ Builder VCL Components

4. keeping highlighted text visible in a form that does not have focu

5. Reverse Video or Highlight of some text, but not all, in a textBox - CSharp/C#

6. keeping highlighted text visible in a form that does not have focus

Hey,

Here is a quick question: I have two forms that I am using, and I need
to highlight the text in Form1 by clicking and dragging (obviously).
So, when I switch to Form2 (making it the focused form), I want to
still be able to see the highlighted text in Form1 even though the form
is not focused. When I click back to Form1, I see the highlighted text,
but if I focus Form2, I don't see the highlighted text. Is there a way
that I can change this? I've googled to no avail =( 


Thanks so much!

7. Highlighting a ListView item when the ListView does not have focus - CSharp/C#

8. Title Bar Highlights Not Updating

    We have an application that allows you to open multiple views at a
time and do normal operations such as tile, cascade, minimize etc.  I
have recently noticed when change focus to a new view while another is
active, the title bar in the old view remains highlighted (darker blue
xp style).  I also noticed that i could drag the newly active view
over the other views title bar to force a redraw on parts of the title
bar; any spot redrawn is drawn as non-highlighted(light gray xp
style).  I'm not sure what is causing this, anyone have any ideas?

Thanks in advance,
Scott