LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Panel Object xy coordinates and Multiple window list in task bar

Two questions...

I recently had to rearange panel objects to programatically display them. They were not at the origin, and had to futz them into
position.
Is the first object placed, placed at the origin?
Could the guys at NI provide an xy indicator?

And second,
I built my application, but in the task bar there is a listing for the app, then another listing for the window name. How can I
clean this up?

XP
LV 6.1

Cheers
0 Kudos
Message 1 of 5
(3,338 Views)
To take the second question first; you must add a key to the .ini file of the application to get rid of the extra task bar entry: HideRootWindow=True

So if the application's name is Hello.exe open or create the hello.ini file and add

[Hello]
HideRootWindow=True


The first question is a bit unclear. You can move both panel objects like controls, indicators and decorations using the position property. You can also move front panels/windows around. XY coordinates are the inputs, but they are called left (X) and top (Y).
If you are moving the controls to hide/show them it would often be easier to just set the visible property.
Message 2 of 5
(3,338 Views)
Thanks for the window fix.

The first question is just a question about the inital placement of a control/indicator.
I had my application just about finished when I thought about hiding and moving controls. At which point the 'Origin' of the panel
was lost. I just programmatically move a control to 0,0 and took it from there. There is no other way to find the panel origin that
I can see.

Cheers

"Mads" wrote in message news:5065000000050000001F570100-1075935269000@exchange.ni.com...
> To take the second question first; you must add a key to the .ini file
> of the application to get rid of the extra task bar entry:
> HideRootWindow=True
>
> So if the application's name is Hello.exe open or create the hello.ini
> file and add
>
> [Hello]
>
HideRootWindow=True
>
>
> The first question is a bit unclear. You can move both panel objects
> like controls, indicators and decorations using the position property.
> You can also move front panels/windows around. XY coordinates are the
> inputs, but they are called left (X) and top (Y).
> If you are moving the controls to hide/show them it would often be
> easier to just set the visible property.
0 Kudos
Message 3 of 5
(3,338 Views)
Martin,

As far as question 1:

There are 2 different �origins� when speaking about the front panel. There is the 0,0 position that is global to all controls and indicators on it. This origin is a location that does not change. In LabVIEW 7.0 if you have the grids turned on you can see this location as a slightly darker line on the grid and a gray dot. You can reference a controls relative position to this origin by using the "Position" Properties.

There is then the �Origin� property of a front panel. This origin refers to what part of the front panel is viewable. The �Origin� in this sense is what location, referenced to the first position, is at the top left corner of the front panel screen.

Take a look at the attached screen shot.

So if you a
re programmatically moving objects around you need to be aware of both. If you move the scrollbars of the front panel, the �origin� changes. However the positions of all the objects do not.

If you have any questions about this description let me know. The difference between the 2 origins is subtle.

Evan
National Instruments
0 Kudos
Message 4 of 5
(3,338 Views)
> The first question is just a question about the inital placement of a control/indicator.
> I had my application just about finished when I thought about hiding and moving controls. At which point the 'Origin' of the panel
> was lost. I just programmatically move a control to 0,0 and took it from there. There is no other way to find the panel origin that
> I can see.
>

If using LV7, if you show the panel grid, 0,0 is marked by darker lines
and should be pretty obvious. The next question though, is why is 0,0
needed? The most common usage is to place the control relative to
something else. Read the position of a graph for example and put the
other controls ten pixels to the left of the right edge. With this
usage, you don't reall
y need to know any particular screen position.

Greg McKaskle
0 Kudos
Message 5 of 5
(3,338 Views)