01-22-2011 03:52 AM
I'm having trouble trying to fit the front panel of my code onto other computer screens. When I build the front panel I'm using a particular monitor size. But when I build an executable file and bring it to another pc with a smaller screen I have to move the sliders around to see anything. Is there anyway to uniformly shrink everything down so that it will resize on smaller screens?Does anyone have any suggestions? I'd appreciate any help you may have.
01-22-2011 10:23 AM
Not that I know of. But I have a similar problem. What I did was to get a second monitor and set it to the resolution of the target machines. I use that monitor for developing the GUI.
01-25-2011 12:51 AM
Hi AbhashKu:
To mitigate the above situation, you can set a minimum height and width of your panels and controls. You can also enable scaling and proportioning of panel objects in a VI, to do so:
File>>VI Properties>>Window Size
The best method though would be, as mentioned above, to use a screen-size that matches your target and deploy your code on that machine
Regards,<AE>Applications EngineerNational InstrumentsEmail: support.india@ni.com | Phone: 91-80-41190099Learn at NI Developer Zone: http://www.ni.com/devzone
01-25-2011 08:13 AM
The easiest way to develop for a smaller screen is to limit the size of your front panel. As has been said, start with the smallest size you need to support and develop for that. Yes, it will mean keeping your front panel smaller than what you can do on your development machine. But that is all you need to do.
The easiest way to set your front panel to a particular size is to go into VI properties and set the minimum size to what you want. Then drag the front panel down to that size. Now remove the restriction.
I have had very mixed results with automatically scaling front panel controls. The problem is that LabVIEW scales based on the current position of the controls, not the original position. Many controls have minimum sizes, and the positions are integer values. These two facts lead to decidedly non-linear behavior in scaling. I usually end up using the resize event in the event structure to rescale things myself. I have documented this here. The example compensates for the font differences between XP and Windows Vista/7.
Note that most controls can have their size changed under your full control (with the notable exception of some system controls), but the methods vary from control to control, since some controls (e.g. graphs) have lots of things you can change the relative sizes of.
If you have further questions, let us know.