home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 April B / Pcwk4b98.iso / Borland / Dbase50w / MUSIC1.PAK / CATEGORS.WFM < prev    next >
Text File  |  1994-08-02  |  5KB  |  173 lines

  1. *******************************************************************************
  2. *  PROGRAM:      Categors.wfm
  3. *
  4. *  WRITTEN BY:   Borland Samples Group
  5. *
  6. *  DATE:         1/94
  7. *
  8. *  UPDATED:      6/94
  9. *
  10. *  REVISION:     $Revision:   1.24  $
  11. *
  12. *  VERSION:      dBASE FOR WINDOWS 5.0
  13. *
  14. *  DESCRIPTION:  This form is a view of all the available music and other
  15. *                categories of items sold in the Musical Methods store.  You
  16. *                can view just a list of the available categories, or select
  17. *                to see a view of all the available items that belong to the
  18. *                selected category.
  19. *
  20. *  PARAMETERS:   None
  21. *
  22. *  CALLS:        Categors.qbe  (view of tables)
  23. *                Music.cc      (for custom pushbuttons)
  24. *                View.mnu      (menu file)
  25. *                Music.prg     (procedure file)
  26. *
  27. *  USAGE:        DO Categors.wfm
  28. *
  29. *******************************************************************************
  30. #include "Music.h"
  31. #include <Messdlg.h>
  32. create session
  33. set talk off
  34. set ldcheck off
  35.  
  36. ** END HEADER -- do not remove this line*
  37. * Generated on 06/19/94
  38. *
  39. LOCAL f
  40. f = NEW CATEGORSFORM()
  41. f.Open()
  42.  
  43. CLASS CATEGORSFORM OF FORM
  44.    Set Procedure to Music.cc additive
  45.    this.ReleaseOnClose = .f.
  46.    this.Minimize = .F.
  47.    this.MousePointer =          1
  48.    this.Maximize = .F.
  49.    this.HelpFile = "Music.hlp"
  50.    this.HelpId = "Categories"
  51.    this.Text = "Categories"
  52.    this.Width =         44.54
  53.    this.View = "CATEGORS.QBE"
  54.    this.Top =          1.73
  55.    this.MenuFile = "VIEW.MNU"
  56.    this.Left =         14.79
  57.    this.Height =         14.02
  58.    this.OnOpen = CLASS::ONOPEN
  59.    this.OnClose = CLASS::ONCLOSE
  60.  
  61.    DEFINE RECTANGLE LISTRECT OF THIS;
  62.        PROPERTY;
  63.          Border .T.,;
  64.          BorderStyle          1,;
  65.          Text "",;
  66.          ColorNormal "W*/R",;
  67.          Width         41.82,;
  68.          Top          0.50,;
  69.          Left          1.19,;
  70.          Height          9.15
  71.  
  72.    DEFINE MUSICBUTTON ITEMSBUTTON OF THIS;
  73.        PROPERTY;
  74.          UpBitmap "RESOURCE #108",;
  75.          HelpFile "Music.hlp",;
  76.          HelpID "Items",;
  77.          Text "&Items...",;
  78.          ColorNormal "N/W",;
  79.          StatusMessage "Show available items matching the current selection.  Press F1 for Help.",;
  80.          Width         14.11,;
  81.          Default .T.,;
  82.          Top         11.94,;
  83.          Left         13.94,;
  84.          Height          1.50
  85.  
  86.    DEFINE CLOSEBUTTON CLOSEFORMBUTTON OF THIS;
  87.        PROPERTY;
  88.          ColorNormal "N/W",;
  89.          Width         14.11,;
  90.          Top         11.94,;
  91.          Left         28.73,;
  92.          Height          1.50
  93.  
  94.    DEFINE IMAGE LOGOIMAGE OF THIS;
  95.        PROPERTY;
  96.          DataSource "FILENAME SMLMUSIC.BMP",;
  97.          Width         10.71,;
  98.          Top          9.95,;
  99.          Left          1.19,;
  100.          Height          3.83,;
  101.          Alignment          2
  102.  
  103.    DEFINE LISTBOX DESCRIPTLIST OF THIS;
  104.        PROPERTY;
  105.          Visible .F.,;
  106.          DataSource "FIELD CATEGORS->DESCRIPT",;
  107.          FontSize          9.00,;
  108.          ColorHighLight "W+/R",;
  109.          ColorNormal "N/W*",;
  110.          Width         39.61,;
  111.          Top          1.78,;
  112.          Left          2.21,;
  113.          ID        800,;
  114.          Height          7.54
  115.  
  116.    DEFINE TEXT CATEGORYTEXT OF THIS;
  117.        PROPERTY;
  118.          Border .F.,;
  119.          Text " Music Categories :",;
  120.          ColorNormal "W/R",;
  121.          Width         19.55,;
  122.          Top          0.72,;
  123.          Left          1.87,;
  124.          Height          1.01,;
  125.          Alignment          3
  126.  
  127.    ****************************************************************************
  128.    PROCEDURE OnOpen
  129.    ****************************************************************************
  130.    set procedure to Music.prg additive
  131.    if _app.framewin.text <> "Musical Methods" && If form is running standalone
  132.       public windowCnt,focusForm,speedOnTop
  133.       windowCnt  = 0
  134.       focusForm  = .f.
  135.       speedOnTop = 0.00
  136.       DisableWindowing(this)
  137.    else
  138.       AddWindow(this)
  139.       this.OnGotFocus  = ViewOnGotFocus     && These events must be assigned
  140.       this.OnLostFocus = ViewOnLostFocus    && after AddWindow() executes
  141.    endif
  142.    this.root.viewMenu.organizeView.enabled = .f.
  143.    this.root.viewMenu.browse.enabled = .f.
  144.    do SetEnvironment              && set settings that CREATE SESSION overrides
  145.    set skip to                                && Parent records shown only once
  146.    this.OnSize = SizeForm                     && Procedure in music.prg
  147.  
  148.    * Link listbox to the unSKIPped list of parent records
  149.    this.descriptList.dataSource = "FIELD CATEGORS->DESCRIPT"
  150.    this.descriptList.visible = .t.            && Make it visible here so don't
  151.                                               && see flickering in form
  152.    this.filter = .f.    && no filter is set yet
  153.    this.musicIsOpen = .f.
  154.  
  155.    this.itemsButton.OnClick = CorrespondingItems  && procedure in Music.prg
  156.  
  157.    ****************************************************************************
  158.    PROCEDURE OnClose
  159.  
  160.    * Delete this window from the Windows pulldown.
  161.    ****************************************************************************
  162.    if _app.framewin.text = "Musical Methods" && If form not running standalone
  163.       DeleteWindow(this)
  164.    endif
  165.  
  166.  
  167. ENDCLASS
  168.  
  169.  
  170.  
  171.  
  172.  
  173.