LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does DISABLED disable a SCREEN RECTANGLE instead of just the control?

I understand all that. It is certainly easier (faster) to check for a rectangle hit than a nonrectangle region hit.

The question remains, though: Why does the rectangle that we're checking for include the label?

If it were just the field itself, it wouldn't suffer any speed penalty. And I can't think of why a click on the label should be detectable - it doesn't change focus or anything.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 11 of 13
(434 Views)
The rectangle contains everything: the control, the label, the caption. For display purposes, only one set of coordinates are needed. To disable the control, the rectangle coordinates are all that is available. So everything inside that rectangle is disabled, whether there happens to be another control or not. To separate the label and control for disabling purposes, two sets of coordinates and two rectangles would be needed. If the caption is involved, then three rectangles and coordinate sets are needed. For ease of programming, the one set is used and it includes everything inside the rectangle.
- tbob

Inventor of the WORM Global
0 Kudos
Message 12 of 13
(431 Views)
To separate the label and control for disabling purposes, two sets of coordinates and two rectangles would be needed.


But there's already another rectangle available - try using the TAB key on my test VI. It won't show on the controls inside the cluster, but the ones outside show a focus rectangle which DOES NOT include their label. The control is already carrying that around.

For that matter, the field itself is framed (drawn) by using rectangles.

Given that the test VI I sent uses 12+ kBytes for 5/6 controls, memory conservation seems an unlikely reason.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 13 of 13
(424 Views)