04-27-2022 05:08 PM
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?
04-28-2022 08:15 AM - edited 04-28-2022 08:16 AM
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.
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.