home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Mobile / Chip_Mobile_2001.iso / palm / business / printcar / printcar.exe / src / UI / PopupList.cc < prev    next >
C/C++ Source or Header  |  2000-06-06  |  656b  |  32 lines

  1. //
  2. //  $Id: PopupList.cc,v 1.2 2000/06/06 09:31:14 sergey Exp $
  3. //
  4.  
  5. #include <Pilot.h>
  6. #include "PopupList.h"
  7. #include "Util/Assert.h"
  8.  
  9.  
  10. namespace UI
  11. {
  12.     PopupList::PopupList(Form& parent, Word triggerID, Word listID):
  13.         List(parent, listID),
  14.         _trigger(parent, triggerID)
  15.     {}
  16.  
  17.     PopupList::~PopupList()
  18.     {}
  19.  
  20.     // operations
  21.  
  22.     void PopupList::setSelection(int index)
  23.     {
  24.         List::setSelection(index);
  25.  
  26.         char* selectionText = LstGetSelectionText(objectPtr(), index);
  27.         if (selectionText != 0)
  28.             CtlSetLabel(_trigger.objectPtr(), selectionText);
  29.     }
  30. }
  31. // namespace UI
  32.