home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4611 / fw16d.ins / SAMPLES / TESTCOMB.PRG < prev    next >
Text File  |  1994-05-22  |  887b  |  33 lines

  1. #include "FiveWin.ch"
  2.  
  3. //----------------------------------------------------------------------------//
  4.  
  5. function Main()
  6.  
  7.    local oDlg, oCbx, oSayItem, oSayAt
  8.    local cItem
  9.  
  10.    SET 3DLOOK ON
  11.  
  12.    DEFINE DIALOg oDlg RESOURCE "TestCombo"
  13.  
  14.    REDEFINE COMBOBOX oCbx VAR cItem ITEMS { "Testing", "this", "ComboBox" } ;
  15.       ID 110 OF oDlg ;
  16.       ON CHANGE ( oSayItem:cTitle := cItem,;   // We should use also :SetText()
  17.                   oSayAt:cTitle   := ":nAt = " + Str( oCbx:nAt, 2 ) )
  18.  
  19.    REDEFINE SAY oSayItem ID 120 OF oDlg
  20.  
  21.    REDEFINE BUTTON ID 130 OF oDlg ACTION oCbx:Reset()
  22.  
  23.    REDEFINE BUTTON ID 140 OF oDlg ;
  24.       ACTION oCbx:SetItems( { "Let's", "Set", "a new", "List" } )
  25.  
  26.    REDEFINE SAY oSayAt ID 150 OF oDlg
  27.  
  28.    ACTIVATE DIALOG oDlg CENTERED
  29.  
  30. return nil
  31.  
  32. //----------------------------------------------------------------------------//
  33.