Bob's handy guide to rolling your own popup triggers in tables: I Initialization. You must initialize the table properly. Best is to set the item style as a customTableItem, set the item int to hold the selection (or -1 for no selection), set the item pointer to point to your list, and set a custom draw procedure for the item. You may also set a custom draw procedure for the list if you wish.
II Drawing. To draw the table item, you can fetch the selection from the item int, the list from the item pointer, the value of the selected list item (if any) from the list, and paint the screen as you will. III Events. If you do not wish to pop up the list when the cell is tapped on, catch the table enter event and return "true" for it. If you do wish to pop up the list when the cell is tapped on, return "false" for table enter events (ignore them). To pop up the list when the cell is tapped on, catch table select events (this will allow the user to put the pen down on the cell, then move the pen off and lift it). Call your own PopUp code and return "true" for table select events. IV Popping Up The List. To pop up the list and handle user selections on the list, perform the following steps in response to the table select event: A. call TblUnhighlightSelection B. get the list pointer from the table (TblGetItemPtr) C. get the current selection (TblGetItemInt) from the table. D. if needed (more than one cell uses your list, or the table is scrollable, or etc), get the item bounds for the table item and set the list position (LstSetPosition). E. set the current selection in the list (LstSetSelection). F. set the top item in the list (LstSetTopItem) so that the selected item (if any) will be visible when the list displays. G. display the list and wait for selections by calling LstPopupList. H. save the selection returned by LstPopupList in the table's item int. I. mark the row invalid and redraw the table. -bob mckenzie, palm pdx -----Original Message----- From: Seeley, Steve E [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 06, 2001 12:52 PM To: Palm Developer Forum Subject: list in table cells question Hi everyone, I'm hoping that someone has already found a way around the ugly down arrows and semicolons associated with trigger labels when used in a table cell? I know how to get around these items for a regular trigger because I can create a reference to a individual trigger item. I'm not sure how to reference an individual item in a table cell. or Can anyone explain why a plain list drawn over the top of a cell can never be selected. When a table cell is selected the list is drawn over the cell. So far so good. Then when I try to select the scroll arrows or an item on the list the table still gets the input and another list is drawn. Any ideas would be a great help, Thanks, Steve -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
