LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Controls missing/hidden on Tab control first displaying

Hi,

 

I have a tab control as a major part of my program, and I've run into the issue that the first time I open the panel containing my tab control, many of the controls on the tab are not visible. They are not set to not-visible (code or UI control) I know this for certain. Sometimes the tab is empty, while other times it is a few of the controls which are missing. The items can be made visible by dragging the panel containing the tab control off of the display (like off the side of the computer monitor) and bringing it back, or switching to a different tab and back. Is there a known solution to this problem? It used to be fairly rare, but has begun occurring more regularly, which means it is a concern for me.

 

I'm using LabWindows/CVI 2010 on a Windows 7 computer.

 

Thanks,

 

Chris

0 Kudos
Message 1 of 18
(3,783 Views)

Hello ckcook,

 

It would be helpful to know more about your program in order to determine the cause. Does this occur in multiple tabs in multiple program, or just a specific tab in a this program? Do all of the controls in the tab disappear, or just some of them? Does this occur under specific circumstances, or in a regular pattern? What type of controls are on the tab, and what ones are disappearing?

 

Regards,

 

Jason D

Applications Engineer

National Instruments

0 Kudos
Message 2 of 18
(3,758 Views)

Hi Jason,

 

Sometimes the tab is completely empty, while other times it is a few of the controls which are missing. Most commonly it is either everything, or the LEDs that are missing. The LEDs are the most recent addition to the panel, if this provides any insight.

 

I've only used the tab control in 1 program. It is the tab which opens when I first open the panel containing the tab control. Once you switch tabs, the issue goes away, and thus I've only seen it on 1 tab. The occurance of this seems completely random, however it has increased in frequency recently, which the only reason I can think of is that I added more controls to the tab.

 

The tab mostly consists of Command buttons, text entries and check boxes. I've attached a screenshot of the panel to give you a better idea of what is present.

 

Chris

0 Kudos
Message 3 of 18
(3,750 Views)

Hi Chris,

 

Are these controls visible on other tabs? It may be helpful to insert ProcessDrawEvents() or ProcessesSystemEvents() in order to force items to be processed. If this does not resolve the issue, it would be helpful if you could post a simplified version of your code that still reproduces the error.

 

Regards,

 

Jason D

Applications Engineer

National Instruments

0 Kudos
Message 4 of 18
(3,725 Views)

Hi Jason,

 

These controls are not visible on other tabs. Adding ProcessDrawEvents and ProcessSystemEvents both before and after the call to DisplayPanel did nothing.

 

I'll see what I can do about a hacked together version of my code that has the issue, but it may be a while before I can do it.

 

Chris

0 Kudos
Message 5 of 18
(3,712 Views)

Hi Chris,

 

I was also wondering if you could let me know if you had any UI timers or asynchronous timers. Also, does this only occur on startup? Posting your code will still be very helpful, so I would still definitely recommend posting that when you have the time.

 

Regards,

 

Jason D

Applications Engineer

National Instruments

0 Kudos
Message 6 of 18
(3,693 Views)

Hi Jason,

 

I do have some UI timers, but they are not on the panel that has the issue. This issue has only been observed the first time the tab is displayed after program startup.

 

Is there an issue with the timer that could cause this problem?

 

Chris

0 Kudos
Message 7 of 18
(3,691 Views)

Hi Chris,

 

The reason I asked about timers is because a colleague had seen one issue where the UI was being written to at two points at the same time due to timers and this caused some issues. Although this is still possible, it does not look to be the issue.

 

It sounds like the issue is occurring at some point in the startup portion of your code. This should narrow down the area of code needed to reproduce your issue, so that you can post it.

 

Regards,

 

Jason D

Applications Engineer

National Instruments

0 Kudos
Message 8 of 18
(3,685 Views)

Hi Jason,

 

The issue has started appearing on another tab. It is a new control I added that is having the issue. The control is a List Box.

 

I've attached 3 screenshots. The first has the list box missing its border and scroll bar. The second is after an entry is placed on the list. This one has the scroll bar back but the border is still missing. The 3rd and final is after I've dragged the panel off of the screen, which makes the border come back.

 

Let me know if this provides any more insight to the issue,

 

Chris

Download All
0 Kudos
Message 9 of 18
(3,653 Views)

As an additional note, hiding the control and making it visible again in code makes it display properly when it comes back.

0 Kudos
Message 10 of 18
(3,650 Views)