LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you tell which parameter is in error when -15 is returned from a EasyTab_GetBounds() call?

All the parms have the correct type and are valid. Is there a way to find out which parm is causing the error?
0 Kudos
Message 1 of 4
(3,125 Views)
EasyTab_GetBounds ( ) returns standard User Interface errors, that are defined in userint.h and can be decoded by GetUILErrorString ( ) function.
 
Error -15 recitates: "File is not a User Interface file or has been corrupted". This is not an error that is likely to appear with this function, you could expect it in LoadPanel or similar functions. In any case, it does not seem to be related to any individual control on the tab.
 
To be sure that there are no problems in your UIR file I suggest you run Simpdemo project in <cvidir>\samples\userint\custctrl\easytab directory adding EasyTab_GetBounds ( ) statement  immediately after child panels have been added and check for return code.


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 4
(3,107 Views)
The error code is -45 not -15. My bad typing. I replaced the single GetBounds with four calls to GetCtrlAttribute with no errors. The error moved tp the SetBounds function call using the parameter just set using the GetCtrlAttribute functions.
 
Paul
0 Kudos
Message 3 of 4
(3,102 Views)
Seems there is a basic misunderstandment: GetBounds obtains the boundaries of the TAB control itself, i.e. the dimensions of the rectangle sorrounding it (or internal dimensions of the control: I assume they refere to the usable part inside the tabs). It has no relation with the input range of numeric controls, which is to be tested in another way. If you have used GetBounds on controls other than a tab control you are very likely to obtain error -45 (invalid type of control passed to the function).
 
To check if all control on a panel are inside the input range specified, control mode must be set to Validate and a range is to be specified with minimum and maximum limit for all controls to be checked. Given these conditions, a single call to ValidatePanel function will return a flag indicating whether all controls in the panel are in-range or not.


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 4 of 4
(3,092 Views)