Click here to Skip to main content
15,921,113 members
Home / Discussions / C#
   

C#

 
GeneralSelected text in TreeNodes Pin
Anonymous30-Jan-04 3:50
Anonymous30-Jan-04 3:50 
GeneralRe: Selected text in TreeNodes Pin
Guinness4Strength30-Jan-04 3:56
Guinness4Strength30-Jan-04 3:56 
GeneralRe: Selected text in TreeNodes Pin
Anonymous30-Jan-04 4:00
Anonymous30-Jan-04 4:00 
GeneralRe: Selected text in TreeNodes Pin
Guinness4Strength30-Jan-04 4:12
Guinness4Strength30-Jan-04 4:12 
GeneralRe: Selected text in TreeNodes Pin
Guinness4Strength30-Jan-04 4:40
Guinness4Strength30-Jan-04 4:40 
GeneralRe: Selected text in TreeNodes Pin
Anonymous31-Jan-04 2:37
Anonymous31-Jan-04 2:37 
GeneralRe: Selected text in TreeNodes Pin
Heath Stewart30-Jan-04 5:02
protectorHeath Stewart30-Jan-04 5:02 
GeneralRe: Selected text in TreeNodes Pin
Guinness4Strength30-Jan-04 4:42
Guinness4Strength30-Jan-04 4:42 
Sorry replied to myself....

Another not-so-simple resolution would be to create your own TextBox and handle the edits yourself.
private void tvTestTree_BeforeLabelEdit(object sender,
System.Windows.Forms.NodeLabelEditEventArgs e)
{
	e.Node.EndEdit(true);
	TextBox MyEdit= new TextBox();
	Rectangle IRect = e.Node.Bounds;
	MyEdit.Location= new Point(IRect.X,IRect.Y);
	MyEdit.Width=IRect.Width+20;
	MyEdit.Height=IRect.Height;
	MyEdit.Text=e.Node.Text;
	tvTestTree.Controls.Add(MyEdit);
	//MyEdit.Show();
}

You will probably have to add an event handler for the TextBox to close it and
get the selected text...
GeneralRe: Selected text in TreeNodes Pin
Heath Stewart30-Jan-04 5:14
protectorHeath Stewart30-Jan-04 5:14 
GeneralRe: Selected text in TreeNodes Pin
Guinness4Strength30-Jan-04 5:18
Guinness4Strength30-Jan-04 5:18 
GeneralRe: Selected text in TreeNodes Pin
Anonymous31-Jan-04 2:37
Anonymous31-Jan-04 2:37 
QuestionAnyone Know a better way ? Pin
Guinness4Strength30-Jan-04 3:49
Guinness4Strength30-Jan-04 3:49 
AnswerRe: Anyone Know a better way ? Pin
Heath Stewart30-Jan-04 4:59
protectorHeath Stewart30-Jan-04 4:59 
GeneralRe: Path.Combine Pin
Mike Osbahr30-Jan-04 9:19
Mike Osbahr30-Jan-04 9:19 
GeneralRequest help for 2 newbie questions Pin
bouli30-Jan-04 3:06
bouli30-Jan-04 3:06 
GeneralRe: Request help for 2 newbie questions Pin
Wizard_0130-Jan-04 3:23
Wizard_0130-Jan-04 3:23 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 3:31
bouli30-Jan-04 3:31 
GeneralRe: Request help for 2 newbie questions Pin
Mazdak30-Jan-04 3:40
Mazdak30-Jan-04 3:40 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 3:42
bouli30-Jan-04 3:42 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 3:54
bouli30-Jan-04 3:54 
GeneralRe: Request help for 2 newbie questions Pin
Mazdak30-Jan-04 4:32
Mazdak30-Jan-04 4:32 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 4:36
bouli30-Jan-04 4:36 
GeneralRe: Request help for 2 newbie questions Pin
Mazdak30-Jan-04 4:45
Mazdak30-Jan-04 4:45 
GeneralRe: Request help for 2 newbie questions Pin
bouli30-Jan-04 5:08
bouli30-Jan-04 5:08 
GeneralRe: Request help for 2 newbie questions Pin
Heath Stewart30-Jan-04 4:51
protectorHeath Stewart30-Jan-04 4:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.