You can try "Int16 LstGetVisibleItems (const ListType *listP)" . The sdk doc says it will return the number of visible items.
Azrul www.mobile-coder.com resource/code snippets for pda/smartphone developer "Vesselin Bontchev" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello folks, > > What is the best way of determining how many text lines would fit on the > visible part of a list control *before* the list is filled? > > LstGetNumberOfItems returns the total number of items on the list, > including the ones that would be off-screen. That's clearly not what I > want - I want only the number of visible items and *before* the list is > filled with items. > > LstGetVisibleItems returns the number of items in the visible part of the > list - but only if any of them are actually visible; i.e., the list is > filled with items and drawn on the screen. Before the list is filled, this > function returns 0. > > Currently I do > > RectangleType bounds; > Int8 numLines; > > FrmGetObjectBounds (frmP, FrmGetObjectIndex (frmP, kMyFormList), &bounds); > numLines = bounds.extent.y / FntCharHeight (); > > and it works - but is it the proper way of doing what I want - or is there > a better way? > > Regards, > Vesselin > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
