OpenQNX :: The QNX Community Portal

Oct 06, 2008 - 07:26 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 47 unlogged users and 2 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
robert
22 Post subject: How to show just last 11 elements at a list?  PostPosted: Jun 01, 2007 - 03:04 PM
Active Member


Joined: Aug 01, 2002
Posts: 15
Location: Germany
Hello,

i want to get a list widget with 11 entries.
If i got 11 elements at list and put a new one into it i want delete the oldest element at list.

How could i realize that?

Actual i got a PtList and put all elements on top of list
Code:
PtListAddItems(ABW_PtList_Output, (const char**)&pstr, 1, 1);

If i got more than 11 elements at list i delete one
Code:
PtListDeleteItemPos(ABW_PtList_Output, 1, item_num);

But the Problem is that the window and cursor is jittering all the time.

What could is do, any hints?

Thanks,
Robert
Code:
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
micro
Post subject: RE: How to show just last 11 elements at a list?  PostPosted: Jun 03, 2007 - 11:38 AM
Senior Member


Joined: Jul 22, 2004
Posts: 352

Try deleting (if the next item would be 12) then inserting, then setting focus to the right item. And as the last spot, refresh the List.
It will jitter also if you refesh ever half second.
Depending on the speed new items should pop up, try another widget or build one yourself.
For example use single Labels, they should not jitter that much, but you have to set the LabelText on all 11 then.

A good start would be to provide some more information about what you intend to do.
 
 View user's profile Send private message  
Reply with quote Back to top
robert
Post subject: RE: How to show just last 11 elements at a list?  PostPosted: Jun 04, 2007 - 07:27 AM
Active Member


Joined: Aug 01, 2002
Posts: 15
Location: Germany
i want to display last incomming nmea sequences (http://en.wikipedia.org/wiki/NMEA).

May i refresh the list more than 5 times per second.
Because of this i am looking how to avoid a automaticaly refresh of widgets and how to refresh the PtList manualy.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.