LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to move panels without freezing the whole program?

Hello,

I work on a program with a lot of home-made interactive popup panels.
My problem is that when I drag these panels by the title bar, all the program (timers, ...) is freezed.
I have to set these panels not-movable but is not very user-friendly (for example if you want to see how the acquisition is running on the main panel behind).

Is there any solution to that problems (or something i haven't done correctly)?

Thanks

Yop!
DanY
0 Kudos
Message 1 of 7
(3,180 Views)
I did a quick example and I could move that window while the chart was updating...
Maybe your popups need a different behavior?
Or redesign your UI! I dont think that a lot of pop-ups are good style. If the user needs to react immediately, than a popup is adequate, but just to inform him for certain conditions there are better solutions like array of messages or an scrollabel message display on your main window.

Greetings from Germany!
--
Uwe

0 Kudos
Message 2 of 7
(3,163 Views)
Oups, my question was concerning CVI, I send it to the wrong forum. Smiley Indifferent
Do you know how I could move it to the CVI forum?

Perhaps this problem exist also with Labview?

Yop!
DanY
0 Kudos
Message 3 of 7
(3,157 Views)
Hi
I think we can study your problem here...I don't have understood your problem. Can you send a simplified example that shows your problem??


Kamal
NIF
0 Kudos
Message 4 of 7
(3,142 Views)
Hi
Multithreading seems to be the best solution if i have understood correctly your problem???
Indeed if you have only one thread (acquisition + userinterface), if you drag the interface it will cause problems in your code.. So with multithreading you have one thread for userinterface for instance and another for acquisition.

Kamal
NIF
0 Kudos
Message 5 of 7
(3,117 Views)
Thanks for your answers

I've tested it with a timer incrementing and displaying a variable as well as displaying the current time (get by TimeStr() ). When I  dragg a window during several seconds, the current time and the incrementation of my variable are freezed. When I hold off the window, the variable start again to increment and time is updated. That's mean that not only the interface is not refreshed but also that the timer is not running.

So you may be right concerning multithreading, as timers are part of the interface (for the event management), an acquisition cadenced by a timer will be hold when dragging a window, since the events manager seems to be holded too.

Refreshing my interface is not the worst point, timers, not only for acquisition, are doing important things that better not be holded. That is a lot of things to do with multithread processes. Smiley Sad

Yop!
DanY


0 Kudos
Message 6 of 7
(3,091 Views)
Hello

I've made several tests on the different ways it is possible to display a popup  panel with CVI.

1.

panelHandle = LoadPanel (parentpanelHandle, "panel.uir", PanelName);
DisplayPanel(panelHandle);

=> panel "draggable"(panel drawing is not updated since the mouse button is not released) without freezing the main panel, drawback : the main panel is still active on click events. The "popup" panel hasn't got the windows' window style.

2.

panelHandle = LoadPanel (parentpanelHandle, "panel.uir", PanelName);
InstallPopup(panelHandle);

=> freezes the main panel when dragging the window but main panel is inoperable and got the windows style

3.

panelHandle = LoadPanel (0, "panel.uir", PanelName);
DisplayPanel(panelHandle);

=> freezes the main panel when dragging the window and the top position is lost when clicking on the main panel.
got the windows style


In fact the only popup that works and looks correctly (as i would like Smiley Wink) is the FileSelectPopup().

Yop!
DanY

Message Edité par Dany27 le 05-18-2006 04:35 AM

Message Edité par Dany27 le 05-18-2006 04:36 AM

0 Kudos
Message 7 of 7
(3,077 Views)