LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting - .NET RichTextBox

Solved!
Go to solution

Hi,

 

I'd like to know how to use scripting to add RichTextBox .NET RichTextBox.

My target is to create .net RichTextBox with New VI Object. I know how to add a .NET Container, but I am not sure how to cast it to .NET object class, so I can load the .NET library.

Capture.PNG

 

 

 

 

 

 

 

 

 

 

The reason to do it by scripting is to create user defined number of RichTextBox controls dynamically.

 

Anyone knows how to do it? Generic there is because I can't find .NET Container there.

PK

0 Kudos
Message 1 of 3
(2,340 Views)
Solution
Accepted by topic author kcs_pk

It doesn't look like the .NET container gets its own dedicated class. If you create a reference from a .NET container, its class is an ActiveX container, which at least in LV 2015, only seems to have a couple of private properties and methods which don't include selecting the object type.

 

One useful trick for scripting, which can probably work here, is to use the cooking show method of "here's one I made earlier" - manually create and save a VI with the code you want, then move or copy that over to your target VI using the relevant scripting methods. This is generally useful, because it can save a lot of tedious scripting for stuff which is fixed.


___________________
Try to take over the world!
Message 2 of 3
(2,278 Views)

Thanks for the direction. VI->Create from Reference actually helped.

0 Kudos
Message 3 of 3
(2,266 Views)