How to select a single word in a list control ?
-
Hi, I have a simple dialog that has a list control which displays a history of commands entered into the system. Let's say I want to select the last argument from a command and copy and paste it somewhere, I just can't do that in a list control since it let me select the whole line only. I tried using rich edit, but it has no notion of AddString which just adds text as we go. Is there any control out there to solve this problem before I sub class Rich Edit ????? Thanks.
-
Hi, I have a simple dialog that has a list control which displays a history of commands entered into the system. Let's say I want to select the last argument from a command and copy and paste it somewhere, I just can't do that in a list control since it let me select the whole line only. I tried using rich edit, but it has no notion of AddString which just adds text as we go. Is there any control out there to solve this problem before I sub class Rich Edit ????? Thanks.
I have No idea of what you wanty to achieve, other than to try and pick an individual piece of test out of a line in a control of some kind.You must be using something like a List or Tree Control, and you are probably trying to achieve an effect you have seen in some microsoft products. Do not forget, Microsoft has the luxurary of being able to throw say 500 writers at a problem, and sort it by the weekend, and also provide these writers with details of proven but not yet released features. Subclassing will probably work, but is a lot of work on your end, and may not mesh in with future microsoft code releases. Why not try to be safe, and do as follows:-: When you pick the line, bring up a Dialog Box with the entry in it in a readonly Edit box, Allow the user to pick a section of text, and work from there. You still will have to go thru the pallaver of validating the entry, etc, but at least you have your (several)problems isolated. regards
LateNightsInNewry
-
Hi, I have a simple dialog that has a list control which displays a history of commands entered into the system. Let's say I want to select the last argument from a command and copy and paste it somewhere, I just can't do that in a list control since it let me select the whole line only. I tried using rich edit, but it has no notion of AddString which just adds text as we go. Is there any control out there to solve this problem before I sub class Rich Edit ????? Thanks.
Shay Harel wrote:
Let's say I want to select the last argument from a command and copy and paste it somewhere, I just can't do that in a list control since it let me select the whole line only.
Of course that is what it's made for. What about a simple multiline edit control with. Which is more handy than a list control. There are applications that do that. Make this edit box a readonly one. After every command you can add new line. :) This will help the user in selecting any line or any word or any character.
Nibu thomas A Developer Programming tips[^] My site[^]