LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why Is My PopUp In The Wrong Place?

I'm making an XControl that's a Picture Ring with dynamically loadable images.

Of course I had to make a Picture Menu thingy; but it doesn't work right: It should pop up near the instance of the XControl, but it doesn't.

The XControl's Facade.vi, event structure case [3] "Picture": Mouse Down, calls "Picture Menu.vi" (which seems to be working OK).

Can anyone figure out why my coordinates are out of whack?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 1 of 2
(926 Views)

Within Picture Menu.vi, You are trying to set the FP.WindowBounds before opening the front panel, which the Help says will not work. That was the first thing I noticed.

 

Your other, far greater problem, is in your Mouse Down event case. The VI ref you are pulling using the implicit "This VI" is the VI ref of the Facade VI itself, when what you need is the VI Ref of the VI containing the XControl. Apologies for the quick and dirty, but after those changes it works for me.

 

Spoiler
FireFistRedhawk_0-1651151680265.png  FireFistRedhawk_1-1651151707894.png

 

 

 

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

Message 2 of 2
(868 Views)