Skip navigation.
Home
The QNX Community Portal

View topic - blinking widgets in GUI

blinking widgets in GUI

Isn't the name clear?

blinking widgets in GUI

Postby raohansikarao » Sat Mar 27, 2010 4:56 am

Hi every one,
i am developing GUI screen in qnx by using c graphics. Actually my requirement is to print the data in text boxes for every 50ms, for this i have created a multi text box and using sprintf command i am printing the data in that text box, my problem is to refresh the data for every 50ms i am rerealizing the widget which will kill and reinvoke the textbox widget due to this we will have flickering(blinking) of the widgets in the GUI screen.

can any one please tell me is there any other way which will update the only data in the same widget without rerealizing that widget
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

RE: blinking widgets in GUI

Postby juanplacco » Sat Mar 27, 2010 5:04 am

Why are you rerealizing the widget every scan? It should be enough setting the text resource. Even more, you sould only set text argument only if the data changes...
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm

RE: blinking widgets in GUI

Postby raohansikarao » Sat Mar 27, 2010 6:08 am

thank you for your quick reply, i am new to GUI programming can you please explain me how can we set text argument if the data changes,
thanks in advance
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

RE: blinking widgets in GUI

Postby maschoen » Sat Mar 27, 2010 4:08 pm

PtSetResource() or PtSetResources().
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

RE: blinking widgets in GUI

Postby juanplacco » Mon Mar 29, 2010 2:14 am

something easy like...

if (prev_value != this_value)
{
PtSetResource(...);
prev_value=this_value;
}

:D

JM
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron