home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4611 / fw16d.ins / SAMPLES / TESTPIE.PRG < prev    next >
Text File  |  1994-06-11  |  2KB  |  50 lines

  1. #include "FiveWin.ch"
  2.  
  3. //----------------------------------------------------------------------------//
  4.  
  5. function Main()
  6.  
  7.    local oWnd, oSbr1, oSbr2, oSbr3, oSbr4
  8.    local nStartRow := 0, nStartCol := 0
  9.    local nEndRow   := 0, nEndCol   := 0
  10.  
  11.    DEFINE WINDOW oWnd TITLE "Testing Pie function parameters" COLOR "W+/G"
  12.  
  13.    @ 1, 20 SAY " 1 " COLOR "GR+/B"
  14.    @ 1, 25 SAY " 2 " COLOR "GR+/B"
  15.    @ 1, 30 SAY " 3 " COLOR "GR+/B"
  16.    @ 1, 35 SAY " 4 " COLOR "GR+/B"
  17.  
  18.    @ 1, 50 SAY "1.- nStartRow"
  19.    @ 2, 50 SAY "2.- nStartCol"
  20.    @ 3, 50 SAY "3.- nEndRow  "
  21.    @ 4, 50 SAY "4.- nEndCol  "
  22.  
  23.    @ 3, 20 SCROLLBAR oSbr1 OF oWnd VERTICAL RANGE 1, 100 ;
  24.       ON UP   ( nStartRow--, oWnd:Refresh() ) ;
  25.       ON DOWN ( nStartRow++, oWnd:Refresh() ) ;
  26.       ON THUMBPOS ( nStartRow := nPos, oSbr1:SetPos( nPos ), oWnd:Refresh() )
  27.  
  28.    @ 3, 25 SCROLLBAR oSbr2 OF oWnd VERTICAL RANGE 1, 100 ;
  29.       ON UP   ( nStartCol--, oWnd:Refresh() ) ;
  30.       ON DOWN ( nStartCol++, oWnd:Refresh() ) ;
  31.       ON THUMBPOS ( nStartCol := nPos, oSbr2:SetPos( nPos ), oWnd:Refresh() )
  32.  
  33.    @ 3, 30 SCROLLBAR oSbr3 OF oWnd VERTICAL RANGE 1, 100 ;
  34.       ON UP   ( nEndRow--, oWnd:Refresh() ) ;
  35.       ON DOWN ( nEndRow++, oWnd:Refresh() ) ;
  36.       ON THUMBPOS ( nEndRow := nPos, oSbr3:SetPos( nPos ), oWnd:Refresh() )
  37.  
  38.    @ 3, 35 SCROLLBAR oSbr4 OF oWnd VERTICAL RANGE 1, 100 ;
  39.       ON UP   ( nEndCol--, oWnd:Refresh() ) ;
  40.       ON DOWN ( nEndCol++, oWnd:Refresh() ) ;
  41.       ON THUMBPOS ( nEndCol := nPos, oSbr4:SetPos( nPos ), oWnd:Refresh() )
  42.  
  43.    ACTIVATE WINDOW oWnd ;
  44.       ON PAINT Pie( oWnd:hDC, 10, 10, 100, 100,;
  45.                     nStartRow, nStartCol, nEndRow, nEndCol )
  46.  
  47. return nil
  48.  
  49. //----------------------------------------------------------------------------//
  50.