05-29-2024 05:48 AM
When I right click on string control the key focus property of the control returns True.
why when I right click on button control the key focus stays the same?
05-29-2024 05:56 AM - edited 05-29-2024 05:58 AM
Hi Max,
mind to share an example VI?
@maxnoder1995 wrote:
When I right click on string control the key focus property of the control returns True.
why when I right click on button control the key focus stays the same?
Whatever I do no control (neither string, numeric or boolean) gets key focus on right-click in my VI:
05-29-2024 06:00 AM
Sorry… I meant left click.
I can know if the string value as changed from the user or my program by the key focus.
i can’t know if the button as toggled by my program or by the user.
05-29-2024 06:21 AM
Hi Max,
@maxnoder1995 wrote:
Sorry… I meant left click.
i can’t know if the button as toggled by my program or by the user.
Ok, left-click only sets keyfocus for string and numeric, but not for boolean…
But you still can detect the "keyfocus" by handling the ValueChange event for your button! (The same applies for string and numeric…)
@maxnoder1995 wrote:
I can know if the string value as changed from the user or my program by the key focus.
No, you cannot know the string has really changed just from the keyfocus property!
(But there is a ValueChange event…)
Why do you want to rely on KeyFocus property instead of ValueChange events?
05-29-2024 11:43 AM
@GerdW wrote:
@maxnoder1995 wrote:
I can know if the string value as changed from the user or my program by the key focus.
No, you cannot know the string has really changed just from the keyfocus property!
(But there is a ValueChange event…)
Why do you want to rely on KeyFocus property instead of ValueChange events?
In a related note, strings also have two optional setting that often helps
I have the nagging feeling that the OP is on a snipe hunt trying to solve a problem that does not really exist. We can give much more specific suggestions once we see the code and a detailed description of the re