11-15-2010 09:36 AM
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
11-15-2010 10:14 AM - edited 11-15-2010 10:14 AM
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.
11-15-2010 10:50 AM
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.
11-15-2010 11:39 AM
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.
11-15-2010 03:39 PM
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.
11-16-2010 06:32 AM
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
11-16-2010 06:43 AM
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.
08-04-2013 10:27 PM
hello friend
you have any example with this solution. NET RichText? preferably with toolbox treating events.
grateful