LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

redraw GUI

Hi
In my program Im creating new panels in a seprate Thread. my problem is, that it seems that draw events aren't full executed. for example if a command botton is pressed it seems that it is still pressed after releasing it. process_system_events or process_draw_events aren't helping. Is there any way to Redraw Gui on monitor ("update" or "refresh" GUI display)?
thank U
0 Kudos
Message 1 of 4
(4,367 Views)
Hi mordillo,

Where in your code did you actually try and call ProcessSystemEvents and ProcessDrawEvents?  You need to make sure that you call these functions (i.e. or others like RunUserInterface, GetUserEvent, etc) in the other thread in order for that thread to process messages and update its UI.  If you didn't try putting these functions in the other thread, try that.  If that doesn't work still, its probably best if you post a small example that demonstrates the problem. 

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 2 of 4
(4,346 Views)
my program go like this:
 
Creating a seperate thread. In that thread I creates new panels:
//outside the thread :
MakeNewPanel=True; //global
while (MakeNewPanel==True) {}
creating new commandbotton ctrl
//Thread:
while(1)
{
 processsystemevents()
 processdrawevents()
 if (MakeNewPanel == True){
 creating new panel ()
MakeNewPanel=False}
//other actions on the panels
}
now, when im pressing the cmd botton it remain pressed when it actually not, it the "draw on the screen" that havn't updated, or when the cmd botton is transparent (and its label )when im pressing it a little frame around the label remain in the screen. I tried to put
 processsystemevents()
 processdrawevents()
almost every where, now its like the above.
Thank u Very much.
0 Kudos
Message 3 of 4
(4,333 Views)
Hi mordillo,

Its probably best if you post a small example that demonstrates the behavior. This way I can reproduce your issue and look into it.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 4 of 4
(4,297 Views)