LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use SetPanelAttribute to set window position?

I have the following line that should set window left side position. 
 
SetPanelAttribute (auxpanelHandle, AUXPANEL, ATTR_LEFT, 10000);
 
 
However, I get an error ( Too many arguments to variable argument function). 
The range is supposed to be 1 to 32768.  Of course, the documentation is typically useless in this regard.  What does it want?  What is the proper useage of this call?
 
 
0 Kudos
Message 1 of 2
(3,393 Views)

Hi, I haven't an IDE environment here so I can't test if ATTR_LEFT is correct for panels, but I can suggest you to try with this:

SetPanelAttribute (auxpanelHandle, ATTR_LEFT, 10000);
 
With SetPanelAttribute you don't need to pass the "name" (panelID) of the panel since its instance is fully identified by the panel handle.
 
Different is the case for SetCtrlAttribute: you must pass control name (controlID defined in the UIR editor) to identify the individual control onto the panel pointed to by the panel handle, since every panel can have multiple controls.
 
Remember that, if you want to fully set panel position (top and left) you can use SetPanelPos (panelHandle, top, left) function.
 
Finally, on every function you can obtain the corresponding function panel by pressing Ctr+P (or right-clicking and selecting Open function panel or something likethis): in case you had tried with your line the editor would have warned you of the incorrect number of parameters This is an useful tool to help writing code: you don't need to rely only on your memory.
 
Hope this helps
Roberto

Message Edited by Roberto Bozzolo on 11-05-2005 09:40 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 2 of 2
(3,392 Views)