viewpoint-particle

Author Topic: Windows Forms - Treelist  (Read 2755 times)

stanl

  • Pundit
  • *****
  • Posts: 946
Windows Forms - Treelist
« 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.

stanl

  • Pundit
  • *****
  • Posts: 946
Re: Windows Forms - Treelist
« Reply #1 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.

stanl

  • Pundit
  • *****
  • Posts: 946
Re: Windows Forms - Treelist
« Reply #2 on: March 17, 2014, 06:39:34 am »
Got it. Third Time's a charm 8)

td

  • Tech Support
  • *****
  • Posts: 3054
    • WinBatch
Re: Windows Forms - Treelist
« Reply #3 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.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

  • Pundit
  • *****
  • Posts: 946
Re: Windows Forms - Treelist
« Reply #4 on: March 17, 2014, 12:26:52 pm »
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.