LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Embed a text editor instead of string control on front panel GUI

Hello everyone,

 

I was wondering if anyone has ever tried to embed a text editor (i.e. Notepad++, Emacs, etc...) into a string control on a front panel GUI.  By this I mean instead of a 'dumb' string control on the front panel, it is another program like notepad++ being shown in the front panel, with all of the functionality and finesses that the original program includes.  I could create a notepad++ light edition using the string control and whole bunch of events, but it would be much easier if I could just show a finished program inside of the front panel 'container'.  I have another program that is an analysis program in which I do this very thing... that program exposes an active x object that I then use in another VI. Currently I have used the system exec function together with the command line command codes to perform the functionality that I need.  It just isn't as good as having control remain in LabVIEW.  This VI launches notepad++ and waits for the user to complete editing the text and saving the file.  Any help is appreciated, thanks!

 

/David

0 Kudos
Message 1 of 8
(7,569 Views)

There are ActiveX text editors out there that can be had cheaply which you could put into LabVIEW.

 

An alternate method I have used is putting a browser in LabVIEW and running http://www.editpad.org/ in the browser. Works fine.

Richard






0 Kudos
Message 2 of 8
(7,544 Views)

Hi David,

I have used the .NET Rich Text control before to implement a simple text editor, but you still have to do quite a lot of coding to handle the events thrown up by the control.  On the last project i was working on I simply used a string control because i did not need any formatting.  Ctrl-X and Ctrl-V work in a string control without any programming, and using property nodes such as text.selection allow you to do stuff with your own toolbar.  You can also do a custom shortcut menu for the control.  The windows clipboard can be accessed using th Application Method Clipboard.Read or Write.

Michael.

 

 

0 Kudos
Message 3 of 8
(7,525 Views)

Yeah, the two main things I miss in a plain LabVIEW string control are Tab and Find. I know the .NET Rich Text control will do Tab but not sure about Find.

Richard






0 Kudos
Message 4 of 8
(7,514 Views)

Tab would be a problem, but you can use search/replace string functions to do find and replace.  Does anyone know a workaround for tab, other than using spaces and a fixed size font?

Michael.

0 Kudos
Message 5 of 8
(7,495 Views)

Thanks for your replies.  I was wondering where I could find the .NET rich text control you mentioned?  You also mentioned that there are alot of active x text editors to be had cheaply... Do you have one or more specifically in mind (and a link to that as well), preferably one that you have personally tried and think that it works well.

 

/David

0 Kudos
Message 6 of 8
(7,466 Views)

Hi Dave,

Drop a .NET container on the front panel and from the shortcut menu Insert .NET Control then browse to:

 

System.Windows.Forms (2.0.0.0) RichTextBox

 

All the best,

Michael.

0 Kudos
Message 7 of 8
(7,461 Views)

hello friend

you have any example with this solution. NET RichText? preferably with toolbox treating events.

 

grateful

0 Kudos
Message 8 of 8
(6,533 Views)