10-26-2013 05:08 AM
I want to workaround that in LabVIEW i can't make text alignment in string control with tab key. I created a simple VI for that, with event struct. So I intercepts events from keyboard and checks if it's tab key. If it's true, puts spaces into the string. The problem is this simple idea doesnt work...
How can i make it work?
10-26-2013 02:38 PM
Several things complicate your attempt. When you discard the event for the tab key, the string is not updated. You can use the regular Key Down event rather than the filter event.
You need to go to the Properties dialog for all the controls on the front panel and check the Tab Behavior: Skip This Control When Tabbing box.
I am not quite sure why but a local variable for the string control works better than the Value property node.
You also need to return the Key Focus to the string control after hitting the tab key. Even with all controls set to skip when tabbing, the tab key behaves some what like the Enter key and removes the key focus.
And you need to set the Text Selection to the end of the string so that the cursor stays at the end.
Lynn
10-28-2013 06:31 AM
Try using a monospaced font.
10-28-2013 09:00 AM
You could also use a Rich Text box. This is essentially a .NET function in LabVIEW so it over takes the tab function and it appears to work as you would expect. You may have other unexpected issues using this but it could work.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord