LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum panel width

Solved!
Go to solution

Hi,

I'm using CVI 2012, and I have a question about the maximum width of a panel.

I have created a panel on the user interface editor of 3840 pixel width, but when I run my application, the displayed width of the panel seem to be 3350 pixel (and the rest is cropped).

Even if I try to enlarge the panel with mouse the limit remaining.

There is a way to pass this limit ?

Thanks for your precious support.

0 Kudos
Message 1 of 15
(3,494 Views)

Hi,

 

in principle the panel width can be much larger, i.e. 32767 pixel wide, according to the help. While I have not used such large panels due to the lack of sufficiently large displays I could imagine that your observation might be caused by memory constraints...

 

Try calling GetPanelAttribute (, ATTR_WIDTH, ) and see what the result is, you may also try calling SetPanelAttribute (, ATTR_WIDTH, ) and see if you receive an error message.

0 Kudos
Message 2 of 15
(3,489 Views)

Hi Wolfgang,

Thanks for your reply.

I did as you suggested:

"GetPanelAttribute" get 3344 pixel width (the portion of panel displayed), and SetPanelAttribute (panel, ATTR_WIDTH, 10000) return 0 (non errors), but the portion of panel displayed remain unchanged.

You do not need a large display to run the test.

Attached the code

Thanks again

0 Kudos
Message 3 of 15
(3,485 Views)

OK, I have tried your code (indeed the widest panel I have seen Smiley Happy): In my case I receive a panel width of 3192, no error. Interestingly this width does not change for panels less high, so it is not the sheer number of pixels causing the problem. But because your and my value are different this seems to point to a graphic driver/memory issue. Sorry that I can't help you further.

 

By the way, if you upload code, you do not need to include the debug information (the cvibuild folder and the *.cdb file) and the executable.

0 Kudos
Message 4 of 15
(3,483 Views)

Hi Wolfgang,

Sorry, but I don't think that this is related to a graphic driver/memory issue.

I have run the same test on my old PC with XP and CVI 7.0 and the maximum width is different (3350) for some pixels.

Probably these small differences depend on the Operative System and the window border (frame) style.

Is it possible that it is a limit derived from CVI run-time?

Thanks again

0 Kudos
Message 5 of 15
(3,475 Views)

@Biccio wrote:

Is it possible that it is a limit derived from CVI run-time?


For this probably an anwer from an NI expert would be needed...

 

The number I mentioned above was obtained using CVI2012 and Win XP64.

 

I feel that the difference between 3344/3350 pixels in your case and 3192 pixels in my case seems too large to be explained only by a different Windows style, but let's wait what the experts say...

0 Kudos
Message 6 of 15
(3,471 Views)

I believe that the CVI run-time enforces a limit that is proportional to the width of the virtual screen. Check to see how the limits that you're seeing compare to the values returned by GetSystemMetrics(SM_CXVIRTUALSCREEN).

 

Luis

0 Kudos
Message 7 of 15
(3,424 Views)

Luis,

 

if this is the case it should be mentioned in the documentation... Smiley Wink  Right now one would assume that panels can be as wide as 32767 pixels.

0 Kudos
Message 8 of 15
(3,413 Views)

Somehow, I knew you were going to say that... Smiley Tongue

 

Notice how I used a weasely, vague term, like "proportional". I don't know myself what the exact limit is, certainly not enough to add it to the documentation with any certitude. But we'll see.

 

Luis

0 Kudos
Message 9 of 15
(3,409 Views)

It's always good to know your friends Smiley Very Happy

0 Kudos
Message 10 of 15
(3,402 Views)