LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need to locate a control as absolute coordinates?

Is there a mean to locate a control as absolute position (screen coordinates) with interface containing splitter(s)?

 

I wrote a solution but not very smart and not optimised:

 

ScreenPosition.jpg

 

 

I used this method because I encounter a problem with a shadow offset of each splitter origin. And so, I can't sum the object position and the pane position to obtain the absolute position.

 

Better soluce?

 

I work on an application developed in LV8.5.1.

 

Thanks

 

Message Edité par J.DECHET le 07-20-2009 01:07 PM
Message 1 of 3
(2,992 Views)

What do you want to do?

Find the location of 1 control referenced to the display borders, not the VI borders, is that it?

Additional problem, the VI contain splitter(s) 😞

 

Biggest problem is that you don't know in which splitted part of the front panel to control is located 😞

Strange that I don't see any reference to the possible splitter(s) in your code.

 

With the attached code you get the position of the "numeric" control reference to both VI & screen.

Works fine when no splitters are used Smiley Tongue

 

 

0 Kudos
Message 2 of 3
(2,978 Views)

Biggest problem is that you don't know in which splitted part of the front panel to control is located :smileysad: => This is exactly my problem!!!

Strange that I don't see any reference to the possible splitter(s) in your code. => Splitter are just separation of "panes" but as origin of splitters is wrong (because an undefined offset) I can't used it. That's why, I use panes instead of splitters.

 

Thanks for your code but my interfaces are specifically made with splitters.

 

To redefine my question : how to know the most efficiently possible in which pane is an object?

 

In fact, I need this function 2 times in my application:

- to operate a snapshot of an interface and to highlight some specific controls.

- to operate a left click on combo box to avoid the User to click 2 times (one for focus, the other to obatin the menu)

Message Edité par J.DECHET le 07-20-2009 02:09 PM
0 Kudos
Message 3 of 3
(2,972 Views)