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

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 件の賞賛
メッセージ1/14
6,784件の閲覧回数

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 件の賞賛
メッセージ2/14
6,780件の閲覧回数
 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 件の賞賛
メッセージ3/14
6,774件の閲覧回数
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 件の賞賛
メッセージ4/14
6,761件の閲覧回数
Sorry the attachment is enclosed....
0 件の賞賛
メッセージ5/14
6,760件の閲覧回数
Don't you want to wire a TRUE to the key focus property?

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

メッセージ6/14
6,760件の閲覧回数
yes.  I would like to see the cursor in the string control.
0 件の賞賛
メッセージ7/14
6,750件の閲覧回数
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 件の賞賛
メッセージ8/14
6,747件の閲覧回数
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 件の賞賛
メッセージ9/14
6,743件の閲覧回数
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! 😄
メッセージ10/14
6,731件の閲覧回数