Mads Posted October 27, 2005 Report Share Posted October 27, 2005 Controls are scaled "live" in LV8, they do not wait until you have released the window handle (the grab handle is not there anymore by the way...consistent with the OS so that's good). The algorithm behind seems to have a bug though...just widen the attached VI front panel and you'll see that the controls will expand too much to the right and move outside the visible front panel...This did not happen in LV7.1. Download File:post-1777-1130421408.vi Quote Link to comment
rkehn Posted October 28, 2005 Report Share Posted October 28, 2005 I am able to repeat the problem but only after selecting the option in XP to "Show window content while dragging." If you turn this off it seems to work correctly. Not the best work around but it works. Quote Link to comment
Albert-Jan Brouwer Posted October 28, 2005 Report Share Posted October 28, 2005 Part of the problem here is that LabVIEW uses integer calculations when scaling. These round to the nearest pixel. I usually set a dominant control to "scale object with pane", and let the other controls move along with it. However. repeatedly resizing a front panel causes the controls and indicators to slowly creep in random-walk fashion as the rounding errors accumulate, particularly when resizing by small increments so that the nearest-pixel rounding error is large relative to the scaling movement. As you noticed, under LabVIEW 8 the scaling already happens while dragging the window corner or border, before releasing it. Thus, what used to be a single scaling event with typically a large size difference, and thus relatively small rounding errors, has been turned in many small scaling events, with lots of relatively large rounding errors. Thus the problem becomes visually detectable much sooner than before. Obviously, all this could have been avoided by using a (hidden/internal) floating-point representation for the control positions. That this has been plaguing LabVIEW for at least three releases, and has just been made much worse, boggles the mind. Quote Link to comment
Michael Aivaliotis Posted November 2, 2005 Report Share Posted November 2, 2005 This is not a problem specific to LV8. This is a general problem that has been there for many revisions. You have grouped two front panel controls and decided to scale them. You can't do this. You can only enable scaling on a single front panel control. Ungroup the controls and enable scaling on the large top text box. You will see that the scaling works properly without drifting. Here is another thread on some more front panel scaling tips: http://forums.lavausergroup.org/index.php?showtopic=1717 Quote Link to comment
Mike Ashe Posted November 3, 2005 Report Share Posted November 3, 2005 I wonder if this could be solved by storage of the baseline/default control sizes, locations, layout, etc. Then scaling could be done on the fly, but always with the ability to restore to defaults. I would think a nifty subVI with this built in that manages its caller, or a given VI reference would be very useful. I once did something like this just for a subset of the characteristics of booleans about 3-4 versions ago, but never as general as an all purpose FP manager. Has anyone done anything like this? Quote Link to comment
Albert-Jan Brouwer Posted November 5, 2005 Report Share Posted November 5, 2005 I wonder if this could be solved by storage of the baseline/default control sizes, locations, layout, etc. Then scaling could be done on the fly, but always with the ability to restore to defaults. That'd be an even better solution: no rounding errors (not even small ones) can accumulate that way. I would think a nifty subVI with this built in that manages its caller, or a given VI reference would be very useful. I once did something like this just for a subset of the characteristics of booleans about 3-4 versions ago, but never as general as an all purpose FP manager.Has anyone done anything like this? Not that I know of. But really, layout management should be built into LabVIEW. Modern widget toolkits all handle that task for the programmer, and often allow selection of the layout management policy. See for example here . Quote Link to comment
Mads Posted November 9, 2005 Author Report Share Posted November 9, 2005 This is not a problem specific to LV8. This is a general problem that has been there for many revisions. You have grouped two front panel controls and decided to scale them. You can't do this. You can only enable scaling on a single front panel control. Ungroup the controls and enable scaling on the large top text box. You will see that the scaling works properly without drifting. Here is another thread on some more front panel scaling tips:http://forums.lavausergroup.org/index.php?showtopic=1717 Well that's the thing you see - you can (obviously) and you should be able to (off course, it's 2005 after all!). It might be there in LV7 as well. I tried recreating the problem in 7.1.1 and could not get it to happen, maybe it is possible to get the same problem there, but at least it was more difficult...;-) No matter what angle you see it from it is still a bug. I've made the same mistake myself when doing rescaling by code, if you use the original size of the controls and the front panel as fixed references to calculate your scaling factor you can avoid the problem. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.