LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Key focus problem

Hi,

I have a small subvi that simply has a string control which the user enters a string value.
I am using the key focus property node to put the cursor in the string control.
The subvi works very well alone, however when I call it from my main vi, the cursor is not in the string control.
It seems the key focus is not working.  Any suggestions?
0 Kudos
Message 1 of 14
(4,011 Views)

Hello,

To use property nodes in sub VI you have to create a reference on your control and pass this reference to the subVI.

An simple example is attached.

 

0 Kudos
Message 2 of 14
(4,007 Views)
 I don't think that's the problem. He's using a property node for a control in the subVI and for that that you don't use a reference from the main VI.
 
Could you post your code. I've done this on numerous occassions and don't remember ever seeing this problem.
0 Kudos
Message 3 of 14
(4,001 Views)
Hi,

I have attached my program.  The subvi in question is AWG FTP New Directory Name Window.vi.
It opens up when you click on the folder icon in the main window.
Also the program main not work due in part it has to interact with an arb waveform generator.
If you comment out that portion of the code than it will work.

Thanks again for your help.
0 Kudos
Message 4 of 14
(3,988 Views)
Sorry the attachment is enclosed....
0 Kudos
Message 5 of 14
(3,987 Views)
Don't you want to wire a TRUE to the key focus property?

Message Edited by altenbach on 12-21-2005 09:43 AM

Message 6 of 14
(3,987 Views)
yes.  I would like to see the cursor in the string control.
0 Kudos
Message 7 of 14
(3,977 Views)
Do you really understand what Christian said? You wired a false to the Key Focus property. You have to wire a True to it in order to set the Key Focus to your string control.
0 Kudos
Message 8 of 14
(3,974 Views)
Sorry for my misunderstanding.
You probably have a version, where I was playing around with the key focus property.
I have wired the key focus to true.  It works when I run it by itself, however when running it with the main window, I don't see the key focus.
0 Kudos
Message 9 of 14
(3,970 Views)
OK, I agree there is still something broken in that subVI, because it does not work with a TRUE setting either. 😉
 
I was able to fix it by simply going to the windows properties of the subVI in question and setting its mode to "Dialog", then saving it again. (Make sure to close the FP before running the main VI) This seem to clear the corruption and the keyfocus now works. See if this works for you too. Good luck! 😄
Message 10 of 14
(3,958 Views)