キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Scripting - .NET RichTextBox

解決済み
解決策を見る

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 件の賞賛
メッセージ1/3
2,451件の閲覧回数
解決策
トピック作成者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!
メッセージ2/3
2,389件の閲覧回数

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

0 件の賞賛
メッセージ3/3
2,377件の閲覧回数