Click here to Skip to main content
15,902,189 members
Home / Discussions / C#
   

C#

 
AnswerRe: Can anyone help me take a look at my code? Pin
J4amieC7-Dec-05 23:25
J4amieC7-Dec-05 23:25 
GeneralRe: Can anyone help me take a look at my code? Pin
momoo8-Dec-05 14:05
momoo8-Dec-05 14:05 
Questionhwo to generate radom number with fixed seed? Pin
zhujp987-Dec-05 16:48
zhujp987-Dec-05 16:48 
AnswerRe: hwo to generate radom number with fixed seed? Pin
Vikram A Punathambekar7-Dec-05 17:47
Vikram A Punathambekar7-Dec-05 17:47 
QuestionWho do i include shell icons Pin
Garbast7-Dec-05 12:48
Garbast7-Dec-05 12:48 
AnswerRe: Who do i include shell icons Pin
Judah Gabriel Himango7-Dec-05 15:41
sponsorJudah Gabriel Himango7-Dec-05 15:41 
GeneralRe: Who do i include shell icons Pin
Garbast7-Dec-05 23:27
Garbast7-Dec-05 23:27 
QuestionGetting Selected Nodes from a Menu Pin
SeanCM7-Dec-05 12:20
SeanCM7-Dec-05 12:20 
Hi,

I am still new at C# and am coding an app that has tabs and on each tab is a treeview. I need to figure out which tab is selected and wich node on the treeview is selected for the current tab when the user clicks on certain menus.

I found a way to do it, but was wondering if there was an easier way.

//Get the selected node
TreeNode node;
string tabName = _tabs.SelectedTab.Text;
switch (tabName)
{
	case "One" :
		node = _tvwOne.SelectedNode;
		break;
	case "Two" :
		node = _tvwTwo.SelectedNode;
		break;
	case "Three" :
		node = _tvwThree.SelectedNode;
		break;
}


Thanks in advance.

Sean
AnswerRe: Getting Selected Nodes from a Menu Pin
Curtis Schlak.7-Dec-05 12:33
Curtis Schlak.7-Dec-05 12:33 
AnswerRe: Getting Selected Nodes from a Menu Pin
Curtis Schlak.7-Dec-05 12:36
Curtis Schlak.7-Dec-05 12:36 
GeneralRe: Getting Selected Nodes from a Menu Pin
SeanCM7-Dec-05 13:29
SeanCM7-Dec-05 13:29 
GeneralRe: Getting Selected Nodes from a Menu Pin
Curtis Schlak.8-Dec-05 2:23
Curtis Schlak.8-Dec-05 2:23 
QuestionBinary file serializaton Pin
Noon147-Dec-05 12:03
Noon147-Dec-05 12:03 
AnswerRe: Binary file serializaton Pin
leppie7-Dec-05 22:53
leppie7-Dec-05 22:53 
GeneralRe: Binary file serializaton Pin
Noon148-Dec-05 1:41
Noon148-Dec-05 1:41 
QuestionReload apllication Pin
RobertoTjMx7-Dec-05 11:40
RobertoTjMx7-Dec-05 11:40 
AnswerRe: Reload apllication Pin
Judah Gabriel Himango7-Dec-05 12:44
sponsorJudah Gabriel Himango7-Dec-05 12:44 
QuestionC# Flash Player Detection Pin
radnix7-Dec-05 11:34
radnix7-Dec-05 11:34 
AnswerRe: C# Flash Player Detection Pin
Curtis Schlak.7-Dec-05 11:45
Curtis Schlak.7-Dec-05 11:45 
GeneralRe: C# Flash Player Detection Pin
radnix7-Dec-05 13:13
radnix7-Dec-05 13:13 
GeneralRe: C# Flash Player Detection Pin
Curtis Schlak.8-Dec-05 2:23
Curtis Schlak.8-Dec-05 2:23 
QuestionGet the value of listview of selected row in C#.NET Pin
vikrant singh7-Dec-05 11:05
vikrant singh7-Dec-05 11:05 
Questioncommand data Pin
realmontanakid7-Dec-05 10:42
realmontanakid7-Dec-05 10:42 
Questionuser in a computer Pin
sebastianos7-Dec-05 9:35
sebastianos7-Dec-05 9:35 
AnswerRe: user in a computer Pin
RobertoTjMx7-Dec-05 12:08
RobertoTjMx7-Dec-05 12:08 

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.