home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase v5.5 / SAMPLES2.PAK / CHANGEQ.WFM < prev    next >
Encoding:
Text File  |  1995-07-18  |  4.6 KB  |  196 lines

  1. ******************************************************************************
  2. *  PROGRAM:      Changeq.wfm
  3. *
  4. *  WRITTEN BY:   Borland Samples Group
  5. *
  6. *  DATE:         5/93
  7. *
  8. *  UPDATED:      3/95
  9. *
  10. *  REVISION:     $Revision:   1.58  $
  11. *
  12. *  VERSION:      Visual dBASE
  13. *
  14. *  DESCRIPTION:  This is a form called from Equipmnt.wfm that brings up a
  15. *                dialog which allows selecting an aircraft to replace the
  16. *                one currently used for a flight.  This form contains
  17. *                a listbox of plane names, and a bitmap displaying the
  18. *                currently selected plane type.  It also has Ok and Cancel
  19. *                buttons that respectively allow the selections to be saved or
  20. *                ignored.
  21. *
  22. *
  23. *  PARAMETERS:   None
  24. *
  25. *  CALLS:        Buttons.cc  (Custom Controls file)
  26. *                Changeq.qbe (View of tables)
  27. *
  28. *  USAGE:        Do Changeq.wfm
  29. *                or
  30. *                (this is how this file is used in the Equipment program)
  31. *
  32. *                set procedure to Changeq.wfm additive
  33. *                local f
  34. *                f = new ChangEq()
  35. *                f.mdi = .F.       && because modal forms cannot be mdi
  36. *                f.ReadModal()
  37. *
  38. *******************************************************************************
  39. create session
  40. set talk off
  41. set ldCheck off
  42.  
  43. ** END HEADER -- do not remove this line*
  44. * Generated on 07/06/95
  45. *
  46. parameter bModal
  47. local f
  48. f = new CHANGEQFORM()
  49. if (bModal)
  50.    f.mdi = .F. && ensure not MDI
  51.    f.ReadModal()
  52. else
  53.    f.Open()
  54. endif
  55. CLASS CHANGEQFORM OF FORM
  56.    Set Procedure To &_dbwinhome.samples\BUTTONS.CC additive
  57.    this.OnOpen = CLASS::ONOPEN
  58.    this.Maximize = .F.
  59.    this.MousePointer = 1
  60.    this.Minimize = .F.
  61.    this.ColorNormal = "N/GB+"
  62.    this.Width = 77.333
  63.    this.OnClose = CLASS::ONCLOSE
  64.    this.Top = 1.0586
  65.    this.Left = 0.666
  66.    this.Text = "Equipment Selection"
  67.    this.OnSelection = CLASS::ONSELECTION
  68.    this.View = "CHANGEQ.QBE"
  69.    this.Height = 15.5879
  70.  
  71.    DEFINE IMAGE LOGOIMAGE OF THIS;
  72.        PROPERTY; 
  73.          Width 77.666,;
  74.          DataSource "FILENAME AIRBRLND.BMP",;
  75.          Alignment 2,;
  76.          Height 8
  77.  
  78.    DEFINE ENTRYFIELD AIRCRAFT OF THIS;
  79.        PROPERTY; 
  80.          ColorNormal "N/GB+",;
  81.          DataLink "AIRCRDB->AIRCRAFT",;
  82.          Width 15.5,;
  83.          Top 7.5,;
  84.          Left 0.5,;
  85.          Enabled .F.,;
  86.          FontSize 10,;
  87.          Border .F.,;
  88.          Height 0.8525
  89.  
  90.    DEFINE TEXT TYPETEXT OF THIS;
  91.        PROPERTY; 
  92.          ColorNormal "N/GB+",;
  93.          Width 14.5,;
  94.          Top 7.5,;
  95.          Left 47.5,;
  96.          Text "Plane",;
  97.          FontSize 10,;
  98.          Height 0.8525
  99.  
  100.    DEFINE LISTBOX PLANETYPE OF THIS;
  101.        PROPERTY; 
  102.          ColorNormal "N/GB+",;
  103.          Width 29.333,;
  104.          Top 8.5,;
  105.          Left 47.5,;
  106.          DataSource "FIELD AIRCRDB->AIRCRAFT",;
  107.          FontSize 11.25,;
  108.          FontName "Arial",;
  109.          ColorHighLight "W+/B",;
  110.          FontItalic .T.,;
  111.          ID 800,;
  112.          Height 4.5
  113.  
  114.    DEFINE OKBUTTON OKCHANGEQ OF THIS;
  115.        PROPERTY; 
  116.          Width 14.333,;
  117.          Top 13.8994,;
  118.          Left 47.5,;
  119.          Text "OK",;
  120.          Group .T.,;
  121.          Default .T.,;
  122.          Height 1.5117
  123.  
  124.    DEFINE CANCELBUTTON CANCELCHANGEQ OF THIS;
  125.        PROPERTY; 
  126.          Width 14.167,;
  127.          Top 13.8994,;
  128.          Left 62.666,;
  129.          Text "Cancel",;
  130.          Group .F.,;
  131.          ID 0,;
  132.          Height 1.5117
  133.  
  134.    DEFINE IMAGE PLANEIMAGE OF THIS;
  135.        PROPERTY; 
  136.          Width 47,;
  137.          Top 8.5,;
  138.          Left 0.5,;
  139.          DataSource "BINARY AIRCRDB->IMAGE",;
  140.          Alignment 1,;
  141.          Height 7.0293
  142.  
  143.    procedure OnOpen
  144.    *******************************************************************************
  145.    
  146.    if type("this.childRec") <> "U"
  147.       this.planeType.curSel = this.childRec
  148.       go this.childRec
  149.    endif
  150.    
  151.    
  152.    *******************************************************************************
  153.  
  154.    procedure OnClose
  155.    *******************************************************************************
  156.    
  157.    close procedure &_dbwinhome.samples\Buttons.cc
  158.    
  159.    
  160.    *******************************************************************************
  161.    
  162.    procedure OnSelection (controlId)
  163.    *******************************************************************************
  164.    
  165.    if controlId <> 0                      && Cancel wasn't selected
  166.       this.value = this.planetype.value   && Return value to calling form
  167.    endif
  168.    
  169.    this.Close()
  170.    
  171. ENDCLASS
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.