Click here to Skip to main content
15,886,258 members
Home / Discussions / C#
   

C#

 
AnswerRe: API to control bass and treble Pin
Michael Bookatz1-Jun-09 4:43
Michael Bookatz1-Jun-09 4:43 
AnswerRe: API to control bass and treble Pin
bearfx1-Jun-09 4:44
bearfx1-Jun-09 4:44 
AnswerRe: API to control bass and treble Pin
DaveyM691-Jun-09 4:49
professionalDaveyM691-Jun-09 4:49 
AnswerRe: API to control bass and treble Pin
Kythen1-Jun-09 9:58
Kythen1-Jun-09 9:58 
Questionhow to show make differnet view for tree view nodes? Pin
samy1001-Jun-09 3:47
samy1001-Jun-09 3:47 
AnswerRe: how to show make differnet view for tree view nodes? Pin
Henry Minute1-Jun-09 5:04
Henry Minute1-Jun-09 5:04 
GeneralRe: how to show make differnet view for tree view nodes? Pin
samy1001-Jun-09 5:35
samy1001-Jun-09 5:35 
GeneralRe: how to show make differnet view for tree view nodes? Pin
Henry Minute1-Jun-09 6:21
Henry Minute1-Jun-09 6:21 
In that case you do not need MDI (Multiple Document Interface).

Either design your different views as UserControls or as a Form. The process is pretty much the same.

Then in the code that you use when a node is selected (I don't know if you are using BeforeSelect/AfterSelect or something else), your code should look something like this.
I am assuming the Panel on the right is called displayPanel, and that you decide to use names for your views like WhateverView

this.displayPanel.Controls.Clear();
WhateverView newView = new WhateverView();
newView.Dock = DockStyles.Fill;
this.displayPanel.Controls.Add(newView);

This code should work for a single type of 'view'

If you are using Form descendants you might also like to set their FormBorderStyle to FormBorderStyle.None

Just to see if it works as you would like, decide on one node, for now, and therefore one 'view' and use the code above to test it.

Of course you will need a way to decide which type of view to use depending on the node selected, assuming that you have more than one. For that you might want to investigate the Factory Pattern

Put (very) simply, this is a class that will return the right sort of 'view' when asked.

e.g the line WhateverView newView = ViewFactory.GetView("mp3"); will give you a view for looking at MP3 stuff.
the line WhateverView newView = ViewFactory.GetView("folder"); will give you a view for looking at Folder stuff.

There are many ways to select which type of 'view', this is just one of them.

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

GeneralRe: how to show make differnet view for tree view nodes? Pin
samy1001-Jun-09 22:35
samy1001-Jun-09 22:35 
Questionhow can i capture the mouseup event everytime in VC# based on WinCE platform and arm9 hardware? Pin
zh.again1-Jun-09 3:11
zh.again1-Jun-09 3:11 
AnswerRe: how can i capture the mouseup event everytime in VC# based on WinCE platform and arm9 hardware? Pin
Not Active1-Jun-09 3:19
mentorNot Active1-Jun-09 3:19 
QuestionProblem with a PictureBox control. [modified] Pin
Ankit Rajpoot1-Jun-09 3:07
Ankit Rajpoot1-Jun-09 3:07 
AnswerRe: Problem with a PictureBox control. Pin
Satish Pai1-Jun-09 3:13
Satish Pai1-Jun-09 3:13 
GeneralRe: Problem with a PictureBox control. Pin
Ankit Rajpoot1-Jun-09 3:21
Ankit Rajpoot1-Jun-09 3:21 
AnswerRe: Problem with a PictureBox control. Pin
Luc Pattyn1-Jun-09 3:22
sitebuilderLuc Pattyn1-Jun-09 3:22 
GeneralRe: Problem with a PictureBox control. Pin
Ankit Rajpoot1-Jun-09 3:25
Ankit Rajpoot1-Jun-09 3:25 
Questionc# resolve redirection IP Pin
evangile1-Jun-09 2:18
evangile1-Jun-09 2:18 
AnswerRe: c# resolve redirection IP Pin
Rajesh Anuhya1-Jun-09 2:32
professionalRajesh Anuhya1-Jun-09 2:32 
GeneralRe: c# resolve redirection IP Pin
evangile1-Jun-09 2:50
evangile1-Jun-09 2:50 
GeneralRe: c# resolve redirection IP Pin
Rajesh Anuhya1-Jun-09 2:58
professionalRajesh Anuhya1-Jun-09 2:58 
GeneralRe: c# resolve redirection IP Pin
evangile1-Jun-09 3:07
evangile1-Jun-09 3:07 
GeneralRe: c# resolve redirection IP Pin
harold aptroot1-Jun-09 3:29
harold aptroot1-Jun-09 3:29 
QuestionNotification Icon animation Pin
Abdul Rahman Hamidy1-Jun-09 2:04
Abdul Rahman Hamidy1-Jun-09 2:04 
AnswerRe: Notification Icon animation Pin
I Believe In GOD1-Jun-09 2:16
I Believe In GOD1-Jun-09 2:16 
GeneralRe: Notification Icon animation Pin
Abdul Rahman Hamidy1-Jun-09 18:13
Abdul Rahman Hamidy1-Jun-09 18:13 

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.