Click here to Skip to main content
15,889,281 members
Home / Discussions / C#
   

C#

 
GeneralXml Documentation Pin
afronaut10-Dec-02 7:06
afronaut10-Dec-02 7:06 
GeneralRe: Xml Documentation Pin
Not Active10-Dec-02 7:24
mentorNot Active10-Dec-02 7:24 
GeneralRe: Xml Documentation Pin
Kannan Kalyanaraman10-Dec-02 22:14
Kannan Kalyanaraman10-Dec-02 22:14 
GeneralWeb Service authentication issue Pin
Craig James10-Dec-02 4:37
Craig James10-Dec-02 4:37 
GeneralRe: Web Service authentication issue Pin
OBRon11-Dec-02 9:58
OBRon11-Dec-02 9:58 
GeneralOwnderDraw ComboBox Pin
mikasa10-Dec-02 3:27
mikasa10-Dec-02 3:27 
GeneralCast an Array to a Treenode Array Pin
Paul Watson10-Dec-02 1:15
sitebuilderPaul Watson10-Dec-02 1:15 
GeneralRe: Cast an Array to a Treenode Array Pin
James T. Johnson10-Dec-02 1:28
James T. Johnson10-Dec-02 1:28 
Paul Watson wrote:
The one method I convert to an object array and that then makes adding it to the ComboBox really simple (just use AddRange.)

The ComboBox works by calling ToString() on the objects in the Items collection to get the string it should display (by default, this behavior can be changed by setting the DisplayMember property).

Because the ComboBox works this way you can put add any type of object to the Items collection and it will work (it may not display the string you wanted, but it will at least be displayed).

The TreeView works by using a collection of specialized objects (TreeNode's), since it requires a specific type of object to be in its collection you'll have to convert your string objects to TreeNode objects. In this case it means creating a new TreeNode object and setting the Text property to the string for each string in the array (ie use a blasted for loop; or foreach)

James

- out of order -
GeneralRe: Cast an Array to a Treenode Array Pin
Paul Watson10-Dec-02 1:32
sitebuilderPaul Watson10-Dec-02 1:32 
GeneralRe: Cast an Array to a Treenode Array Pin
leppie10-Dec-02 8:02
leppie10-Dec-02 8:02 
GeneralRe: Cast an Array to a Treenode Array Pin
Paul Watson10-Dec-02 20:39
sitebuilderPaul Watson10-Dec-02 20:39 
GeneralRe: Cast an Array to a Treenode Array Pin
Nick Parker10-Dec-02 4:14
protectorNick Parker10-Dec-02 4:14 
GeneralRe: Cast an Array to a Treenode Array Pin
James T. Johnson10-Dec-02 8:29
James T. Johnson10-Dec-02 8:29 
GeneralOpenDialog Pin
fredza9-Dec-02 21:36
fredza9-Dec-02 21:36 
GeneralControl bar Pin
fredza9-Dec-02 21:33
fredza9-Dec-02 21:33 
GeneralRe: Control bar Pin
David Stone10-Dec-02 4:56
sitebuilderDavid Stone10-Dec-02 4:56 
QuestionUsing C# dll in VB? Pin
$iva9-Dec-02 20:20
$iva9-Dec-02 20:20 
AnswerRe: Using C# dll in VB? Pin
Burt Harris9-Dec-02 21:47
Burt Harris9-Dec-02 21:47 
GeneralRe: Using C# dll in VB? Pin
Nick Parker10-Dec-02 4:20
protectorNick Parker10-Dec-02 4:20 
AnswerRe: Using C# dll in VB? Pin
Rickard Andersson209-Dec-02 21:48
Rickard Andersson209-Dec-02 21:48 
GeneralRe: Using C# dll in VB? Pin
Kannan Kalyanaraman9-Dec-02 22:37
Kannan Kalyanaraman9-Dec-02 22:37 
GeneralRe: Using C# dll in VB? Pin
Rickard Andersson209-Dec-02 23:08
Rickard Andersson209-Dec-02 23:08 
GeneralRe: Using C# dll in VB? Pin
Kannan Kalyanaraman9-Dec-02 23:13
Kannan Kalyanaraman9-Dec-02 23:13 
GeneralRe: Using C# dll in VB? Pin
Rickard Andersson209-Dec-02 23:50
Rickard Andersson209-Dec-02 23:50 
GeneralRe: Using C# dll in VB? Pin
Kannan Kalyanaraman10-Dec-02 0:00
Kannan Kalyanaraman10-Dec-02 0:00 

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.