I am trying to "dock" one panel to another, which means that when a panel is moved in a way that it almost borders (within 25 pixels) to another panel, that it exactly borders (lines up) to the other panel.
The way I did this was Panel2.left = Panel1.left + Panel1.width
However, this resulted in Panel2 being placed slightly over Panel1 (see the jpg in the attached zip file). I resolved the problem by adding 7 to the value and now it works correctly, but why is this needed?
Exactly how is the panel width calculated?
The plot area of a graph is one pixel off when calculating the XY value (see
this post), is the panel width value a few pixels off as well? And what is the philosophy behind it? What do the returned values mean, why not return the actual values in the first place? There's probably a reason, I don't think NI deliberately changes these values to tease programmers
😉Regards,
Erwin Timmerman