WinBatch® Technical Support Forum

Archived Boards => COM Automation and dotNet => Topic started by: stanl on March 16, 2014, 01:18:31 PM

Title: Windows Forms - Treelist
Post by: stanl on March 16, 2014, 01:18:31 PM
While I could set the Form ClientSize, or the .Size for a RichText Box, these error with a Treeview. Also, cannot add Treeview Nodes.

Duke lost to Virginia so figured I'd just play some more with CLR forms.
Title: Re: Windows Forms - Treelist
Post by: stanl on March 17, 2014, 05:32:41 AM
Stupid mistakes (pasted in ObjectClrType instead of ObjectClrNew). Revised attached. Form builds, but still cannot add tree nodes.
Title: Re: Windows Forms - Treelist
Post by: stanl on March 17, 2014, 06:39:34 AM
Got it. Third Time's a charm 8)
Title: Re: Windows Forms - Treelist
Post by: td on March 17, 2014, 08:36:37 AM
I don't think the line ObjectClrType("System.String", "Treeview Node ":i) is necessary.  Generally, WIL strings are automagically converted to the appropriate FCL string type by the WinBatch CLR subsystem.  This is in keeping with the design idea that strings are treated as a native language type and not a full FCL type by the FCL.
Title: Re: Windows Forms - Treelist
Post by: stanl on March 17, 2014, 12:26:52 PM
Quote from: td on March 17, 2014, 08:36:37 AM
I don't think the line ObjectClrType("System.String", "Treeview Node ":i) is necessary. 

It isn't. In my hurried search for a solution, I was weaning out all possibilities.