LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Focus of some system checkboxes or radio buttons are not visible

Solved!
Go to solution

Hi,

 

I've got a problem while UI-programming:

 

On my window are severel controls, some of them are system checkboxes. All of them should get the key focus while tabbing through them.

Now the problem: one of them doesn't show visibly the focus.

See the following pictures:

focus_hidden.png

 

Am I missing an option to hide the focus?

 

I became curios about that and experimented a little bit. Newly inserted checkboxes are working how expected, but if I replace the checkbox against a radio button, it also doesn't visualize the focus.

Once, the code modifies the focus programmatically, the focus starts working how it is expected, but why does that happen?

 

Edit: I'm using LV 2011

0 Kudos
Message 1 of 8
(3,600 Views)

Can you ensure that the checkboxes are "front most"? Does that change things?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 8
(3,597 Views)

Nope, doesn't change anything.

 

Anyway, the checkbox is in empty space.

 

By the way, in my first post, I guessed, it may have to do something with programmatic setting the focus. That was wrong. It depends on which control had focus before. The programmatic access just activated an additional button control. So, this happens: Listbox --> checbox - focus invisible, Button --> checkbox - focus draws frame.

Also, sometimes it depends on if the VI runs as standalone (the example above) or it is inserted into a subpanel (I've got working and not working examples for that case).

 

0 Kudos
Message 3 of 8
(3,563 Views)

Does the issue also occur when using tabbing to move focus from element to element?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 8
(3,549 Views)

Sorry, I don't understand Your question properly.

 

The checkboxes are controls, which are not part of a container, so I'm not sure about, what means moving focus from element to element. Tabbing moves the focus from a control to the next control. Also, I can't test another situation, because some existing controls spread around in my application seem to have lost their ability to visualize the focus, but newly inserted are working just fine.

0 Kudos
Message 5 of 8
(3,506 Views)

@gerh wrote:
[...], but newly inserted are working just fine.

Have you tried "Replace" on this checkbox?

 

My question regarding tabbing is that you can use the tab key to jump from element to element. Each element has the option to disable tabbing so it will not be active when cycling through with tab.

You can modify tab ordering of a panel by selecting Edit >> Set Tabbing Order.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 8
(3,489 Views)
Hi,

@Norbert_B wrote:

My question regarding tabbing is that you can use the tab key [...]


yes, I tried to replace. But You're right, changing the tabbing order changes the behavior of the controls. It is always the first system checkbox or system radio button which gets focus after the system listbox. Seems the issue has something to do with the listbox. If I insert a new listbox the focus is OK. But if I edit it, the focus stops working.
Now I'm up to check which step causes the issue.

 edit: I forgot to answer: the main issue belongs to the tab key.

0 Kudos
Message 7 of 8
(3,477 Views)
Solution
Accepted by topic author gerh

Hi again,

 

I've found it!

 


@Norbert_B wrote:

Can you ensure that the checkboxes are "front most"? Does that change things?

 

Norbert


against to your advice, "move to back" does the trick.

 

It is a quite strange behavior. Both, the Listbox and the checkbox are in empty space (directly placed in the pane of the VI's front panel), not overlapping each other. Furthermore, there is a disabled button in between them (located and in tabbing order).

If the checkbox is in a layer above the listbox and the listbox is at the background (lowest layer of the focusable objects), then the checkbox is not able to display it's focus state, but only if tabbing moves the focus directly from the listbox to the checkbox. So, if the listbox is the frontmost object, and the other controls (checkbox, radio button,...) behind it, then it works. By the way, the listbox always shows the focus properly, or if the button is enabled all controls are working as expected.

 

Thanks to Norbert_B for leading me onto the right track.

Has anybody an idea, what causes this focus issue? Is it possibly a bug in the Qt code? If not, I'll mark this post as answer.

 

Cheers,

Gerhard

0 Kudos
Message 8 of 8
(3,468 Views)