07-10-2006 08:37 AM
07-10-2006 08:51 AM
07-10-2006 08:54 AM
The color palette includes some system colors (in the bottom right corner).
Additionally, there is a dialog controls palette, which will give you controls which adapt to the OS and there is the dialog font, which will also adapt to the OS.
Using these will ensure that your application looks "at home" whereever you take it.
Some cons:
1. You can't use property nodes to change the appearance of dialog controls.
2. Some controls (like graphs) don't have an equivalent dialog control and integrating them into your dialog UI is a problem because you can't anticipate exactly what it will look like.
3. The users can play around with this, for example by using large system fonts, and screw around with the way the application looks.
4. You have to do some further testing and make sure that you set everything to use dialog controls and colors or you might find out that your users have black text on a black background and so on.
07-10-2006 09:05 AM
07-10-2006 09:23 AM
07-10-2006 09:24 AM
@Somnatic wrote:
Concerning playing around: Why should someone do this. If they mess it up, they need to call us, which means money. You can almost mis-use any application if you're just willing to, so I don't see why I should pay extra care to that.
The thing is that they might not mess "it" up, but something seemingly unrelated like the system colors or fonts, which might be hard to troubleshoot. I agree that normally users don't play around with this, but you should hope not to run into this in a case where they do. Anyway, as long as you're using only standard dialog controls, colors and fonts you should be alright.
As for the dialog, LV has its own dialog because of its multi platform support and the need to be able to provide the same functionality and configurability in all platforms. You can make a call to a windows API function to get this dialog, as shown in the attached.
Note - you can easily get more functionality out of this (look at the link), but I did not write this, and I haven't had use for it yet, I haven't modified it.
07-10-2006 09:33 AM
07-10-2006 09:42 AM
You can modify your code to call this dialog only on windows. If you're using LV 8, you can use the conditional disable structure to call the DLL if on windows or the file dialog on other platforms. If you're before LV 8, you can using the Application>>OS Name property to recognize the OS and then dynamically load a VI which calls the DLL or a VI which will call the file dialog. The reason for doing this dynamically is because the DLL call would not be compiled on other platforms and so can not be loaded at edit time. If you are planning on only using windows, you can of course call the API function, but I don't think that it gives you all the functionality of the LV file dialog.
@Somnatic wrote:
@tst: Ok, I get that point (remaining platform compatibility). The better way would be to maintain compatibility I think. Probably I'll stick to the built in dialog because of this. Thanks for your reply.
07-10-2006 02:31 PM
07-11-2006 07:44 AM