stars on xbrowse

stars on xbrowse

Postby Silvio.Falconi » Thu Feb 16, 2017 10:27 am

I have on archive 3 numeric fields to make a valorization of a Book of school library

design n 1
conten n 1
global n 1

the values are from 0 to 9

I wish show on xbrowse until 5 stars on each columns (or also a graph)

how I must make it ?


if you hear about last year I published a small test to show 5 stars to show enhancement in a dialog. I wanted to create the class but no one then helped me

the test want 3 bmps

Empty_Img:= ".\bitmaps\Empty.bmp"
Full_Img:= ".\bitmaps\Full.bmp"
Half_Img:=".\bitmaps\Half.bmp"

Image

test.prg

Code: Select all  Expand view

#include "Fivewin.ch"
#include "Image.ch"
#include "Constant.ch"

 STATIC count, pressed, aRate, nValue ,cRate
 STATIC Empty_Img,Full_Img,Half_Img,oSay1
  STATIC aClicked[5]




Function test()
   nValore:= RatingBook("c:\work\fwh\bitmaps\007.bmp")
   Msginfo(nValore)
   return nil
//--------------------------------------------------------------------------------//

Function RatingBook(cBook)
Local oDlg

Local oCursorBtn :=TCursor():New(,'HAND')
Local img_name, col
Local i
Local oBook
Local oBtnConfirm


       aRate:= {"10%","20%","30%","40%","50%"}
       pressed := 0
       col := 60
       count := 5
       nRow := 140
       Empty_Img:= ".\bitmaps\Empty.bmp"
       Full_Img:= ".\bitmaps\Full.bmp"
       Half_Img:=".\bitmaps\Half.bmp"
       nValue:= 0
       cRate := "0%"

       DEFINE FONT oFont NAME "Tahoma" SIZE 0, -12

define Dialog oDlg size 400,300  TITLE "Rating a Book"
         @ 1,5 bitmap oBook filename "c:\work\fwh\bitmaps\007.bmp" size 100,120 Noborder OF oDlg
@ nRow, 3 say "My Rating ("  SIZE 59, 10 OF oDlg  PIXEL
@ nRow, 55 say ")"  SIZE 2, 10 OF oDlg  PIXEL

        oReset := TUrlLink():New( nRow+0.2, 39, oDlg, .T., .F., oFont, "", "Reset" )
        oReset:SetColor(  oReset:nClrText, oDlg:nClrPane )
        oReset:nClrOver = CLR_RED
        oReset:bAction =  { || ( pressed := 5, Reset(pressed) ) }
        nCol:= 62

       @ nRow, nCol IMAGE Image_1 SIZE 12, 12 OF oDlg  FILENAME Empty_Img PIXEL  NOBORDER  CURSOR oCursorBtn    ON CLICK ( pressed :=1,OnSelectRate(pressed,count,oSay1))
       nCol += 12
       @ nRow, nCol IMAGE Image_2 SIZE 12, 12 OF oDlg  FILENAME Empty_Img PIXEL  NOBORDER  CURSOR oCursorBtn    ON CLICK ( pressed :=2,OnSelectRate(pressed,count,oSay1))
       nCol += 12
       @ nRow, nCol IMAGE Image_3 SIZE 12, 12 OF oDlg  FILENAME Empty_Img PIXEL  NOBORDER  CURSOR oCursorBtn    ON CLICK ( pressed :=3,OnSelectRate(pressed,count,oSay1))
       nCol += 12
       @ nRow, nCol IMAGE Image_4 SIZE 12, 12 OF oDlg  FILENAME Empty_Img PIXEL  NOBORDER  CURSOR oCursorBtn    ON CLICK ( pressed :=4,OnSelectRate(pressed,count,oSay1))
       nCol += 12
       @ nRow, nCol IMAGE Image_5 SIZE 12, 12 OF oDlg  FILENAME Empty_Img PIXEL  NOBORDER  CURSOR oCursorBtn    ON CLICK ( pressed :=5,OnSelectRate(pressed,count,oSay1))


       @ nRow + 2, 135 SAY oSay1 PROMPT cRate OF oDlg SIZE 30, 12 COLOR CLR_RED PIXEL FONT oFont
                  oSay1:lTransparent := .T.

                      Image_1:bMMoved:= { ||( pressed :=1,OnHoverRate(pressed,count)) }
                      Image_2:bMMoved:= { ||( pressed :=2,OnHoverRate(pressed,count)) }
                      Image_3:bMMoved:= { ||( pressed :=3,OnHoverRate(pressed,count)) }
                      Image_4:bMMoved:= { ||( pressed :=4,OnHoverRate(pressed,count)) }
                      Image_5:bMMoved:= { ||( pressed :=5,OnHoverRate(pressed,count)) }

                      Image_1:bMLeave :={ ||( pressed :=1,OnLeaveRate(pressed,count)) }
                      Image_2:bMLeave :={ ||( pressed :=2,OnLeaveRate(pressed,count)) }
                      Image_3:bMLeave :={ ||( pressed :=3,OnLeaveRate(pressed,count)) }
                      Image_4:bMLeave :={ ||( pressed :=4,OnLeaveRate(pressed,count)) }
                      Image_5:bMLeave :={ ||( pressed :=5,OnLeaveRate(pressed,count)) }

      FOR k:=1 TO count
          img_name := "Image_"+hb_ntos(k)
          &img_name:lTransparent := .T.
      NEXT
                      @ 138, 160 button oBtnConfirm  Prompt "&Exit" SIZE 30, 10 OF oDlg PIXEL  action oDlg:end()

         Activate Dialog oDlg  center
     RETURN  nValue

//-------------------------------------------------------------//
Function OnHoverRate(select,count)
   Local j

Reset(count)

FOR j:=1 TO select
      img_name := "Image_"+hb_ntos(j)
     &img_name:LoadBmp(Full_Img)

  NEXT


  SetHalf(count,  select, aClicked )

   IF select >1
      nValue:=  select-1
   endif

     nValuePressed:= val(aRate[select])-5
     cRate := str(nValuePressed,2)+"%"
     oSay1:Refresh()


Return Nil

//------------------------------------------------------//
Function OnLeaveRate(pressed,count)

   IF pressed == 0
      Reset(count)
   ELSE
      OnSelectRate(pressed,count)
   ENDIF

   Return Nil

//-------------------------------------------------------//
Function OnSelectRate(pressed,count,oSay1)
Local k
Local img_name

IF pressed > 0

   Reset(count)

      FOR k:=1 TO pressed
         img_name := "Image_"+hb_ntos(k)
        &img_name:LoadBmp(Full_Img)

     NEXT

      SetHalf(count, pressed, aClicked )


   ENDIF




  nValue:= aRate[pressed]

   Return Nil

//-----------------------------------------------------//

Static Function Reset(count)
   Local x
    Local img_name
  //

   FOR x:=1 TO count
    img_name := "Image_"+hb_ntos(x)
   &img_name:LoadBmp(Empty_Img)
   NEXT

   Return Nil

//-----------------------------------------------------//

Function SetHalf(select, nPos, aClicked)
Local j

FOR j:=1 TO select
   img_name := "Image_" + hb_ntos(j)
   IF j = nPos // the RIGHT clicked full star
      aClicked[nPos] := 2 // clicked-status for the half star, 1 = full
      &img_name:LoadBmp( Half_Img )
   ENDIF

NEXT

Return Nil
 




someone can help me to show the stars into xbrowse ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: stars on xbrowse

Postby nageswaragunupudi » Thu Feb 16, 2017 2:51 pm

Code: Select all  Expand view

#include "fivewin.ch"

function Main()

   local oDlg, oBrw, oLarge, oFont

   local aData    := { ;
      { "One",   2, 6, 3 }, ;
      { "Two",   1, 4, 2 }, ;
      { "Three", 6, 3, 1 }, ;
      { "Four",  3, 1, 8 }  }


   DEFINE FONT oLarge NAME "VERDANA" SIZE 0,-48 BOLD
   DEFINE FONT oFont  NAME "TAHOMA"  SIZE 0,-15

   DEFINE DIALOG oDlg SIZE 800,400 PIXEL TRUEPIXEL FONT oFont ;
      TITLE "BOOK RATINGS"

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE aData COLUMNS 1, 2, 3, 4 ;
      HEADERS "Book", "Design", "Content", "Global" ;
      LINES NOBORDER

   WITH OBJECT oBrw
      :AddBitmap( { "c:\fwh\bitmaps\fdem5.bmp", "c:\fwh\bitmaps\fdem9.bmp" } )
      :nWidths          := 140
      :nRowHeight       :=  50
      :lAllowSizings    := .f.
      :bPaintTexts      := { |oCol,hDC,cData,aRect| ShowRating( oCol, hDC, cData, aRect, oLarge ) }

      :aCols[ 1 ]:bPaintText  := nil

      WITH OBJECT :AddCol()
         :cHeader       := "Chart"
         :aChartCols    := { 2, 3, 4 }
         :nChartMaxVal  := 9
      END
      :SetGroupHeader( "Rating", 2, 4 )
      //
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oLarge, oFont

return nil

function ShowRating( oCol, hDC, cData, aRect, oLarge )

   local n, aBmpRect, aBitmap, nRating

   nRating     := oCol:Value
   oCol:oBrw:SayText( nRating, aRect, nil, oLarge, CLR_HGRAY )
   aBmpRect    := { aRect[ 1 ], aRect[ 2 ] + 20, aRect[ 3 ], aRect[ 2 ] + 40 }
   for n := 1 to 5
      aBitmap  := oCol:aBitmap( If( n > nRating, 1, 2 ) )
      oCol:oBrw:SayPalBmp( aBitmap, aBmpRect )
      aBmpRect[ 2 ]  += 20
      aBmpRect[ 4 ]  += 20
   next

return nil
 


Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: stars on xbrowse

Postby ukoenig » Thu Feb 16, 2017 4:32 pm

Mr Rao,

thank You very much for the sample.
I included it in my new xBrowse-tests as a new folderpage

Image

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: stars on xbrowse

Postby Silvio.Falconi » Thu Feb 16, 2017 6:56 pm

Thanks Rao ,
But I have a strange problem
on my application the xbrowse not create the SetGroupHeader

Image

I use
aBrowse := { { { || IN->INCOdice }, i18n("Codice"), 150, },;
{ { || IN->INNOME, i18n("Titolo"),100 ,},;

... 11 columns

then I use to build xbrowse columns

FOR i := 1 TO Len(aBrowse)
oCol := oApp():oGrid:AddCol()
oCol:bEditValue := aBrowse[ i, 1 ]
oCol:cHeader := aBrowse[ i, 2 ]
oCol:nWidth := aBrowse[ i, 3 ]
if !Empty(aBrowse[ i, 4 ])
oCol:cEditPicture:=aBrowse[ i, 4 ]
Endif
NEXT





and I modify only this


WITH OBJECT oApp():oGrid
:AddBitmap( { "c:\work\fwh\bitmaps\fdem5.bmp", "c:\work\fwh\bitmaps\fdem9.bmp" } )
:nWidths := 150
:nRowHeight := 50
* :lAllowSizings := .f.
:bPaintTexts := { |oCol,hDC,cData,aRect| ShowRating( oCol, hDC, cData, aRect, oLarge ) }

:aCols[ 1 ]:bPaintText := nil
:aCols[ 2 ]:bPaintText := nil
:aCols[ 3 ]:bPaintText := nil
:aCols[ 4 ]:bPaintText := nil
:aCols[ 8 ]:bPaintText := nil
:aCols[ 9 ]:bPaintText := nil
:aCols[ 10 ]:bPaintText := nil
:aCols[ 11 ]:bPaintText := nil

WITH OBJECT :AddCol()
:cHeader := "Chart"
:aChartCols := { 5, 6, 7 } <------------------
:nChartMaxVal := 9
END

:SetGroupHeader( "Rating", 5, 7 ) <------------------
//
:CreateFromCode()
END


where is the error ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: stars on xbrowse

Postby nageswaragunupudi » Thu Feb 16, 2017 8:24 pm

We always suggest using command syntax.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: stars on xbrowse

Postby Silvio.Falconi » Thu Feb 16, 2017 8:39 pm

You're right
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: stars on xbrowse

Postby nageswaragunupudi » Thu Feb 16, 2017 8:57 pm

Code: Select all  Expand view


aCols := { ;
{ "FIRST", "FirstName", nil, 80 }, ;
{ "CITY",   "City",          nil, 80 }, ;
{ "AGE",    "Age",       "99", 40 }  }
// { { expression/fieldname,  header, picture, colwidth, ... }}

@ 10,10 XBROWSE oBrw SIZE 400,400 PIXEL OF oDlg DATASOURCE "CUSTOMER" ;
COLUMNS aCols
 

To the extent possible please use fieldnames instead of codeblocks.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: stars on xbrowse

Postby Silvio.Falconi » Thu Feb 16, 2017 9:01 pm

Resolved!!

the error was the oldest state saved because I use this command

oApp():oGrid:RestoreState( cState )

Image





thanks !!!
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: stars on xbrowse

Postby Silvio.Falconi » Thu Feb 16, 2017 9:48 pm

Mr Rao,

Image

I not Know how put the header on the center

I tried with :SetGroupHeader( "Valorizzazione", 5, 7, oFont, AL_CENTER )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: stars on xbrowse

Postby nageswaragunupudi » Thu Feb 16, 2017 9:53 pm

If you make sure that the group header does not have any trailing spaces, it is centered.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: stars on xbrowse

Postby Silvio.Falconi » Fri Feb 17, 2017 11:45 am

Now iti is ok

to print with report class I have a problem

Local aSTAR := { TImage():Define( 'STAREMPTY' ), TImage():Define( 'STARFULL' ) }

COLUMN TITLE "Disegno" DATA INDISENO SIZE 30 IMAGE IMGDATA (................) HEIGHT 1.2 ALPHALEVEL 128


I not Know what I can insert as IMGDATA
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: stars on xbrowse

Postby Silvio.Falconi » Sat Feb 18, 2017 8:59 am

I wish print this

Image

any solution for print the report with stars ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: stars on xbrowse

Postby Otto » Sat Feb 18, 2017 12:34 pm

EasyReport and different bmps.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6313
Joined: Fri Oct 07, 2005 7:07 pm

Re: stars on xbrowse

Postby Silvio.Falconi » Sat Feb 18, 2017 12:58 pm

Otto,
it is possible create a new bitmap ( on esecution) with another bitmaps ?

sample for value := 1

1.bmp := full+empty+empty+empty+empty
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: stars on xbrowse

Postby ukoenig » Sat Feb 18, 2017 3:15 pm

It is no proplem printing from inside FWH

Image

Image

Code: Select all  Expand view

#include "report.ch"

#define PAD_LEFT            0
#define PAD_RIGHT          1
#define PAD_CENTER      2

// Image-path
c_Path := cFilePath(GetModuleFileName( GetInstance() ) )
c_Path1 := c_path + "Images\"
...
...
// ------------

FUNCTION PRINT_QUOT()
LOCAL nImgSize := 20
LOCAL oPRINT, oFont1, oFont2, oPen1, oPen2, nImgTop
LOCAL nLinI, nColI, nLinF, nColF, I := 1, JI := 1
 
PRINTER oPRINT ; // FROM USER  ;
PREVIEW  MODAL ;
NAME "
Print quotation"

TPreview():lListViewHide := .T.

IF EMPTY( oPRINT:hDC )
      MsgStop ( "
Printer not ready !" )
      RETURN(.f.)
ENDIF

DEFINE FONT oFont1 NAME "
Arial" SIZE 0, -10 OF oPRINT
DEFINE FONT oFont2 NAME "
Arial" SIZE 0, -12 OF oPRINT
DEFINE FONT oFont3 NAME "
Arial" SIZE 0, -14 BOLD OF oPRINT

DEFINE PEN oPen1 WIDTH  10  OF oPRINT
DEFINE PEN oPen2 WIDTH  10  OF oPRINT
 
oPRINT:SetPage(9)       //  A4
oPRINT:SetPortrait()        //  Vertical
nMargin     := Int( 0.12 * oPRINT:nHorzRes() )
nWidth      := 8.2 * nMargin
nColWidth := Int( ( nWidth - ( nMargin / 2 ) ) )  

 
    nMenge := 0
    nSeite := 0

    PAGE
    nSeite++

    oPRINT:cmSay(   1.2, 2.8, "
QUOTATION", oFont3,,CLR_BLACK,,PAD_LEFT  )
    oPRINT:cmSay(   1.2, 16.0, "
Date : " + DTOC(DATE()), oFont2,,CLR_BLACK,,PAD_LEFT  )

    nFil := 2.8     // Top
    nCol :=  2.8    // Left
    nTop := 2.8 // Top  
    nBot := 20.0    // Right
    aCoord1 := oPRINT:Cmtr2Pix( @nFil, @nCol )
    aCoord2 := oPRINT:Cmtr2Pix( @nTop, @nBot )
    oPRINT:Line ( nFil, nCol, nTop, nBot, oPen1 )       //  HORIZONTAL

    nFil :=  2.8        // Top
    nCol := 5.0 // Right
    nTop := 14.0    // Bottom
    nBot := 5.0 // Right
    aCoord1 := oPRINT:Cmtr2Pix( @nFil, @nCol )
    aCoord2 := oPRINT:Cmtr2Pix( @nTop, @nBot )
    oPRINT:Line ( nFil, nCol, nTop, nBot, oPen2 )           // 1  VERTICAL

    nFil :=  2.8        // Top
    nCol := 10.2    // Right
    nTop := 14.0    // Bottom
    nBot := 10.2    // Right
    aCoord1 := oPRINT:Cmtr2Pix( @nFil, @nCol )
    aCoord2 := oPRINT:Cmtr2Pix( @nTop, @nBot )
    oPRINT:Line ( nFil, nCol, nTop, nBot, oPen2 )           // 1  VERTICAL
       
    nFil :=  2.8        // Top
    nCol := 15.3    // Right
    nTop := 14.0    // Bottom
    nBot := 15.3    // Right
    aCoord1 := oPRINT:Cmtr2Pix( @nFil, @nCol )
    aCoord2 := oPRINT:Cmtr2Pix( @nTop, @nBot )
    oPRINT:Line ( nFil, nCol, nTop, nBot, oPen2 )           // 1  VERTICAL         

    // ---------------

    nRow := 3.0

    oPRINT:cmSay( nRow, 2.9, "
", oFont3,,CLR_BLACK,,PAD_LEFT  )
    oPRINT:cmSay( nRow, 5.3, "
Disegno", oFont3,,CLR_BLACK,,PAD_LEFT  )
    oPRINT:cmSay( nRow, 10.5, "
Contenuto", oFont3,,CLR_BLACK,,PAD_LEFT  )
    oPRINT:cmSay( nRow, 15.8, "
Globale", oFont3,,CLR_BLACK,,PAD_LEFT  )

    nRow += 0.9

    nFil := nRow    // Top
    nCol :=  2.8    // Left
    nTop := nRow    // Top  
    nBot := 20.0    // Right
    aCoord1 := oPRINT:Cmtr2Pix( @nFil, @nCol )
    aCoord2 := oPRINT:Cmtr2Pix( @nTop, @nBot )
    oPRINT:Line ( nFil, nCol, nTop, nBot, oPen1 )       //  HORIZONTAL

    // -------------

    aData    := { { "
One",   2, 5, 3 }, ;
               { "
Two",   1, 4, 2 }, ;
               { "
Three", 5, 3, 1 }, ;
               { "
Four",  3, 1, 5 } }
 
        //                               nWidth, nHeight
    aImgSize := PRINT_IMG( 20,    20, c_Path1, "
Star1.bmp" )
    aImgSize[1] := aImgSize[1] * 10
    aImgSize[2] := aImgSize[2] * 10
    // PrintImage( nRow, nCol, uImage, nWidth, nHeight, lStretch, nAlpha, lTransp, lGray )
    nSayTop := 4.5
    nImgTop := 950
   
    I := 1
    FOR I := 1 TO 4

        oPRINT:cmSay( nSayTop, 2.8, aData[I][1], oFont3,,CLR_BLACK,,PAD_LEFT  )
       
        // -------------------- 1

        nImgLeft := nMargin + 600      
        J := 1
        FOR J := 1 TO 5
                // MsgAlert( aData[I][2] ,  "
Counter" )
            IF J <= aData[I][2]  
                oPRINT:PrintImage( nImgTop, nImgLeft, c_Path1 + "
Star1.bmp", 200, 200, .T. ) // counter
            ELSE
                oPRINT:PrintImage( nImgTop, nImgLeft, c_Path1 + "
Star0.bmp", 200, 200, .T. ) // unused
            ENDIF
            nImgLeft += 190
        NEXT
        oPRINT:cmSay( nSayTop, 9.5, LTRIM(STR(aData[I][2])), oFont3,,CLR_BLACK,,PAD_LEFT  )

        // -------------------- 2

        nImgLeft := nMargin + 1800     
        J := 1
        FOR J := 1 TO 5
            IF J <= aData[I][3]  
                oPRINT:PrintImage( nImgTop, nImgLeft, c_Path1 + "
Star1.bmp", 200, 200, .T. )
            ELSE
                oPRINT:PrintImage( nImgTop, nImgLeft, c_Path1 + "
Star0.bmp", 200, 200, .T. )
            ENDIF
            nImgLeft += 190
        NEXT
        oPRINT:cmSay( nSayTop, 14.5, LTRIM(STR(aData[I][3])), oFont3,,CLR_BLACK,,PAD_LEFT  )

        // -------------------- 3
       
        nImgLeft := nMargin + 3000     
        J := 1
        FOR J := 1 TO 5
            IF J <= aData[I][4]
                oPRINT:PrintImage( nImgTop, nImgLeft, c_Path1 + "
Star1.bmp", 200, 200, .T. )
            ELSE
                oPRINT:PrintImage( nImgTop, nImgLeft, c_Path1 + "
Star0.bmp", 200, 200, .T. )
            ENDIF
            nImgLeft += 190
        NEXT
        oPRINT:cmSay( nSayTop, 19.6, LTRIM(STR(aData[I][4])), oFont3,,CLR_BLACK,,PAD_LEFT  )
       
        nImgTop += 200
        nSayTop += 0.87

    NEXT I
       
    ENDPAGE

ENDPRINT

oFont1:End()
oFont2:End()
oFont3:End()

oPen1:End()
oPen2:End()

RETURN NIL
 


regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests