View Single Post
10-06-14, 07:30 AM   #29
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by zork View Post
I would add one exception to the setpoint function though. A function that checks if the plate is shown before you apply the new setpoint. Because otherwise you might show a plate that is not visible.
I originally double checked that the plate was shown, but OnSizeChanged won't fire while the frame is hidden and we're hiding the sizer frame when the plate is hidden, so it shouldn't ever become a problem.

As for scanning for new plates, I'm not suggesting that this is the best way to do it, I just wanted a compact example to demonstrate the positioning method.

If you use the index approach, you may not want to break out of the loop after the first nameplate is found if the code has the potential to ever be run after more than one nameplate has already been created.
  Reply With Quote