LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

AUto Scaling User Interface

System: Windows XP, LabWindows CVI 7.1

I'm new to Lab Windows CVI (ok C,C++ programmer). I have a .UIR, .c that was passed on to me developed in 7.1, I'm trying to do 2 things
1. Have a minimize and a maximize buttons in the application next to the exit [X] on top right corner. (sill learning the CVI lingo)
I cannot find a way to put them on the UI. The exit [X] was already there I just had to link the close control for it to work.
Although when I right click the application in the windows task bar the application shows a Minimize and Restore option and both work, the maximize
on the other hand is not there.
2. If this is done does it automatically allow the user to resize the window to any possible size or does it have to be implemented seperately.

I have played with every option in the Edit Panel and Other attributes in the Edit Panel, to no use. In the Other Attributes in Edit Panel there is a scale contents on resize but that does not seem to make any difference when checked. It does have the Min Panel Height and Width option at "0", would that make a difference? I set it to different numbers but that didn't work either.

On a side note does the Scroll Bars option in Edit Panel have any working connection to the Min Panel Height and width option under Other Attributes in Edit Panel.

but I checked the forums and Knowledge Base and found this
http://digital.ni.com/public.nsf/allkb/984235E94A558999862565FA0074922A

they have a manual programming option in here, where would I insert that .c, .h, or userint.h file ? I thought it was my .c but that didn't make any difference.

http://digital.ni.com/public.nsf/allkb/F6302447AE5B3B1B862565FA0074D747

Any Help would be greatly appreciated.

SS
0 Kudos
Message 1 of 6
(3,799 Views)
1. Maximizing and minimizing are determined by the corresponding options in the Other attributes of the panel. If the corresponding controls don't show when running the program, you may have in the source code some SetPanelAttribute (panel, ATTR_CAN_MAXIMIZE, 0); and ATTR_CAN_MINIMIZE statements that override the options made in the UIR editor.

2. The same applies for rescaling: you may have somewhere in the code a SetPanelAttribute (.., ATTR_SCALE_CONTENTS_ON_RESIZE, 0); statement that impede that behaviour.

Take a look at the simple project attached.

Hope this helps
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 6
(3,792 Views)
Sorry, attachment missing...

For the very last of your question: these statements are always to be inserted in the .c files: userint.h file is not to be modified since it's part of the standard CVI distribution and could be overwritten when installing an update, the same as the .h files with the same name as the UIR files: they are overwritten every time you save your UIR.

Since you have altready tried to add these commands, check in the source code if there are some other istances of those statements, perhaps executed after your addition. Consider that the program executes sequentially the main function up to RunUserInterface statement, that enables user interface events management: you may have those statements in the source code, maybe placed in a subroutine called after the place where you added your own statements.

Message Edited by Roberto Bozzolo on 04-21-2005 05:49 PM

Message Edited by Roberto Bozzolo on 04-21-2005 05:49 PM



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 6
(3,791 Views)
Thanks Roberto

But I found out something else, that since the person who created said that he used Easy tab control. I didn't realize that having multiple tabs makes this different.


SS
0 Kudos
Message 4 of 6
(3,782 Views)
This is what I found, it doesn't have any replies that solve my problem, can anyone update.It looks like LabWindows CVI has a come a long way since then from what I found reading this site.

http://forums.ni.com/ni/board/message?board.id=180&message.id=8777&requireLogin=False

so I guess to rephrase my question Easy Tab control used to create the UI, need to be able to auto scale and resize it.

Roberto/Everyone Else,

The discussion posted above says that the tab process has nothing to do with the UI resizing would that be true?
I've already tried to check that resize box in the Edit panel for all the Child and Parent Panels. Didn't really help though.

Thanks again

SS
0 Kudos
Message 5 of 6
(3,779 Views)
I tried modifying the tabdemo sample to see if it scales: simply enabling the Scale contents on resize on ALL panels and subpanels I was able to resize the application (resizing the main panel all tabbed panels were updated accordingly to new dimensions: it takes a while due to the large numbers of panels involved and to my old and slow machine but it works),

This made with CVI 6.0: I haven't 7.1 at home...

I suggest you try the same n your machine with 7.1: if it works the problem you have is not related to easytab instrument. Sorry for not being able to help you more...

Message Edited by Roberto Bozzolo on 04-23-2005 08:13 AM



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 6 of 6
(3,753 Views)