flickering effect

flickering effect

Postby Silvio.Falconi » Thu Oct 01, 2020 11:55 am

I'm trying to show customer.dbf on a dialog with folder form at right

Image





at first I don't see the buttonbar
when I scroll through the records I see a flickering effect that is, the display is not linear and clean when I scroll through all the records
is there a solution to improve the visualization?
Thank you






Test (work in progress)

Code: Select all  Expand view  RUN

#include "fivewin.ch"
#include "ttitle.ch"

request dbfcdx
request dbffpt



Function test()
Local oTabella,oFolder,oBrw
Local oFont,oBold
local oBtnClose,oBtnNew
Local nSplit:= 250
Local oTitle
Local oBar,oBut[5]

  USE CUSTOMER NEW SHARED VIA "DBFCDX"


DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-14 BOLD

DEFINE DIALOG oTabella SIZE 880,600 ;
      PIXEL TRUEPIXEL RESIZABLE FONT oFont;
      TITLE "Test customer "

  @ 0000,0000 TITLE oTitle OF oTabella SIZE 1025,0059 NOBORDER //PIXEL
        oTitle:aGrdBack := {{1,nRgb(89,167,229),nRgb(89,167,229)}}
        oTitle:nShadow  := 0

        @ 0010,0020 TITLEIMG OF oTitle BITMAP "contatti.bmp" SIZE 0052,0052
        @ 0015,0120 TITLETEXT OF oTitle TEXT "Agenda Telefonica" COLOR nRGB(255,255,255)
        @ 0040,0120 TITLETEXT OF oTitle TEXT "CONTATTI"          COLOR nRGB(000,000,000)


     DEFINE BUTTONBAR oBar OF oTabella 2015 SIZE 92,44 BOTTOM

 @  20,10 XBROWSE oBrw SIZE -nSplit,oBar:ntop PIXEL OF oTabella ;
          DATASOURCE "CUSTOMER" AUTOCOLS CELL LINES NOBORDER


   oBrw:lColDividerComplete := .f.
   oBrw:lRecordSelector     := .f.
   oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
   oBrw:nHeaderHeight       := 24
   oBrw:nRowHeight          := 20
   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7  // MARQSTYLE_SOLIDCELL
   oBrw:nRowDividerStyle    := LINESTYLE_NOLINES

      WITH OBJECT oBrw
          :nEditTypes    := EDIT_GET
          :SetChecks()
          :bChange  := { || (Record_Show(oFolder)) }
          //
          :CreateFromCode()
       END

       oBrw:SetStyle( 2015 )

  XbrSetupBar( oBrw )









  @ 20, 0 FOLDER oFolder OF oTabella SIZE 100,100 PIXEL  ;
        PROMPT "General","Details"



 /* @ oTabella:nBottom - 40,oTabella:nWidth-120 BUTTONBMP oBtnClose;
    RESOURCE "bitmaps\exit.png" ;
    PROMPT "    Chiudi"    SIZE 90,30 PIXEL OF oTabella;
    TEXTRIGHT FONT oBold ;
    ACTION ( oTabella:end( IDOK ) )
    */





 // this buttons are created from left to right
DEFINE BUTTON oBut[1] OF oBar PROMPT "Stampa"        LEFT FILENAME   ".\BITMAPS\STAMPA.BMP"
DEFINE BUTTON oBut[2] OF oBar PROMPT "Etichette"     LEFT FILENAME   ".\BITMAPS\ETI.BMP"
DEFINE BUTTON oBut[3] OF oBar PROMPT "Allegati"      LEFT FILENAME   ".\BITMAPS\ALLEGA.BMP"
DEFINE BUTTON oBut[4] OF oBar PROMPT "Rit.Acconto"   LEFT FILENAME  ".\BITMAPS\RIT.BMP"
DEFINE BUTTON oBut[5] OF oBar PROMPT "Includi doc. " LEFT FILENAME ".\BITMAPS\GENERA.BMP" GROUP











               * oBrw:nHeight:=  oRect:nBottom - 80  - oBar:nHeight

          oTabella:bResized  := <||
              local oRect    := oTabella:GetCliRect()




               oBrw:nTop:=  oTitle:nBottom+5

                oBrw:nBottom:= oBar:nTop
               oBrw:refresh()

               oFolder:nTop:=  oTitle:nBottom+5
               oFolder:nLeft      := oRect:nRight - nSplit +2
               oFolder:nwidth     := oRect:nRight-60
               oFolder:nHeight    := oRect:nBottom - 80  - oBar:nHeight
               oFolder:refresh()

            Record_Show(oFolder)
              oBar:refresh()
              RETURN nil
         >

         ACTIVATE DIALOG oTabella CENTERED ;
        on INIT  eval(oTabella:bResized)

RELEASE FONT oFont,oBold

    return nil
//--------------------------------------------//

Function Record_Show(oPanelLeft)
                 Local oFont2,oBold2
                 Local nRow:= 12

DEFINE FONT oFont2 NAME "TAHOMA" SIZE 0,-12
DEFINE FONT oBold2 NAME "TAHOMA" SIZE 0,-12 BOLD



  nRow+=10
   @ nRow,10 say "Firstname " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
   nRow+=20
   @ nRow,10 GET CUSTOMER->FIRST size 200,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2
   nRow+=30
   @ nRow,10 say "Lastname" size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
   nRow+=20
   @ nRow,10 GET CUSTOMER->LAST size 200,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2
    nRow+=30
   @ nRow,10 say "Street " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
   nRow+=20
   @ nRow,10 GET CUSTOMER->STREET size 200,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2
    nRow+=30
   @ nRow,10 say "City " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
    nRow+=20
   @ nRow,10 GET CUSTOMER->CITY size 200,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2

    nRow+=30
   @ nRow,10 say "State " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
    nRow+=20
   @ nRow,10 GET CUSTOMER->STATE size 20,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2

   nRow+=30
   @ nRow,10 say "Zip " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
    nRow+=20
   @ nRow,10 GET CUSTOMER->ZIP size 60,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2

   nRow+=30
   @ nRow,10 say "Notes " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
    nRow+=20
   @ nRow,10 GET CUSTOMER->NOTES size 200,120 PIXEL of oPanelLeft:adialogs[1] FONT oFont2


   return nil




function XbrSetupBar( oBrw )

   oBrw:nTopBarHeight := 30
   oBrw:bOnAdjust := <||
      local oBtn
      @ 05,05 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\16X16\new.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
        ACTION oBrw:EditSource( .t. ) TOOLTIP "Add New Record"
      @ 05,45 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\edit.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
        ACTION oBrw:EditSource() TOOLTIP "Edit this record"
      @ 05,85 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\16x16\delete.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
        ACTION If( MsgNoYes( "Delete this row?" ),,oBrw:Delete() ) TOOLTIP "Delete This Record"

      return nil
      >

return nil



FUNCTION Ut_BrwRowConfig7( oBrw )

   oBrw:nRowSel      := 1
   oBrw:nColSel      := 1
   oBrw:nColOffset   := 1
   oBrw:nFreeze      := 0
   oBrw:nCaptured    := 0
   oBrw:nLastEditCol := 0

   oBrw:l2007                    := .f.
   oBrw:lMultiselect        := .f.
   oBrw:lTransparent        := .f.
   oBrw:nStyle              -= WS_BORDER
   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7
   oBrw:nStretchCol           := -1 // STRETCHCOL_LAST
   oBrw:bClrStd             := {|| { CLR_BLACK, CLR_WHITE } }
   oBrw:lColDividerComplete := .t.
   oBrw:lRecordSelector     := .t.
   oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
   oBrw:nHeaderHeight       := 24
   oBrw:nRowHeight          := 20
   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7  // MARQSTYLE_SOLIDCELL
   oBrw:nRowDividerStyle    := LINESTYLE_NOLINES
   oBrw:lExcelCellWise       := .f.

RETURN nil






 
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: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: flickering effect

Postby Otto » Thu Oct 01, 2020 5:57 pm

Hello Silvio,
I think you should create the says and gets only once and then refresh.
I made a test. This works fine.
Best regards,
Otto
Code: Select all  Expand view  RUN


#include "fivewin.ch"
#include "ttitle.ch"

request dbfcdx
request dbffpt

static oGet

Function test()
   Local oTabella,oFolder,oBrw
   Local oFont,oBold
   local oBtnClose,oBtnNew
   Local nSplit:= 250
   Local oTitle
   Local oBar,oBut[5]


   USE CUSTOMER NEW SHARED VIA "DBFCDX"


   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-14 BOLD

   DEFINE DIALOG oTabella SIZE 880,600 ;
      PIXEL TRUEPIXEL RESIZABLE FONT oFont;
      TITLE "Test customer "

   @ 0000,0000 TITLE oTitle OF oTabella SIZE 1025,0059 NOBORDER //PIXEL
   oTitle:aGrdBack := {{1,nRgb(89,167,229),nRgb(89,167,229)}}
   oTitle:nShadow  := 0

   @ 0010,0020 TITLEIMG OF oTitle BITMAP "contatti.bmp" SIZE 0052,0052
   @ 0015,0120 TITLETEXT OF oTitle TEXT "Agenda Telefonica" COLOR nRGB(255,255,255)
   @ 0040,0120 TITLETEXT OF oTitle TEXT "CONTATTI"          COLOR nRGB(000,000,000)


   DEFINE BUTTONBAR oBar OF oTabella 2015 SIZE 92,44 BOTTOM

   @  20,10 XBROWSE oBrw SIZE -nSplit,oBar:ntop PIXEL OF oTabella ;
      DATASOURCE "CUSTOMER" AUTOCOLS CELL LINES NOBORDER


   oBrw:lColDividerComplete := .f.
   oBrw:lRecordSelector     := .f.
   oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
   oBrw:nHeaderHeight       := 24
   oBrw:nRowHeight          := 20
   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7 // MARQSTYLE_SOLIDCELL
   oBrw:nRowDividerStyle    := LINESTYLE_NOLINES

   WITH OBJECT oBrw
   :nEditTypes    := EDIT_GET
   :SetChecks()
   :bChange  := { || oGet:refresh() }
   //
   :CreateFromCode()
END

oBrw:SetStyle( 2015 )

XbrSetupBar( oBrw )









@ 20, 0 FOLDER oFolder OF oTabella SIZE 100,100 PIXEL  ;
   PROMPT "General","Details"



     /* @ oTabella:nBottom - 40,oTabella:nWidth-120 BUTTONBMP oBtnClose;
        RESOURCE "bitmaps\exit.png" ;
        PROMPT "    Chiudi"    SIZE 90,30 PIXEL OF oTabella;
        TEXTRIGHT FONT oBold ;
        ACTION ( oTabella:end( IDOK ) )
        */





// this buttons are created from left to right
DEFINE BUTTON oBut[1] OF oBar PROMPT "Stampa"        LEFT FILENAME   ".\BITMAPS\STAMPA.BMP"
DEFINE BUTTON oBut[2] OF oBar PROMPT "Etichette"     LEFT FILENAME   ".\BITMAPS\ETI.BMP"
DEFINE BUTTON oBut[3] OF oBar PROMPT "Allegati"      LEFT FILENAME   ".\BITMAPS\ALLEGA.BMP"
DEFINE BUTTON oBut[4] OF oBar PROMPT "Rit.Acconto"   LEFT FILENAME  ".\BITMAPS\RIT.BMP"
DEFINE BUTTON oBut[5] OF oBar PROMPT "Includi doc. " LEFT FILENAME ".\BITMAPS\GENERA.BMP" GROUP


* oBrw:nHeight:=  oRect:nBottom - 80  - oBar:nHeight

oTabella:bResized  := <||
local oRect    := oTabella:GetCliRect()




oBrw:nTop:=  oTitle:nBottom+5

oBrw:nBottom:= oBar:nTop
oBrw:refresh()

oFolder:nTop:=  oTitle:nBottom+5
oFolder:nLeft      := oRect:nRight - nSplit +2
oFolder:nwidth     := oRect:nRight-60
oFolder:nHeight    := oRect:nBottom - 80  - oBar:nHeight
oFolder:refresh()

Record_Show(oFolder)
oBar:refresh()
                  RETURN nil
>

ACTIVATE DIALOG oTabella CENTERED ;
   on INIT  ( eval(oTabella:bResized), testdlg( oFolder ) )

RELEASE FONT oFont,oBold

        return nil
//--------------------------------------------//
Function testdlg( oFolder )
   Local oFont2,oBold2
   Local nRow:= 12


   DEFINE FONT oFont2 NAME "TAHOMA" SIZE 0,-12
   DEFINE FONT oBold2 NAME "TAHOMA" SIZE 0,-12 BOLD
   nRow+=10
   @ nRow,10 say "Firstname " size 80,18 PIXEL of oFolder  font oBold2
   nRow+=20
   @ nRow,10 ;
      GET oGet ;
      VAR CUSTOMER->FIRST ;
      OF oFolder ;
      PIXEL ;
      FONT oFont2 ;
      SIZE 200, 20

return nil


Function Record_Show(oPanelLeft)
   Local oFont2,oBold2
   Local nRow:= 12

   sysrefresh()
   //msginfo( procname(1) + "   " + procname() + "   " + str(procline()) + "   " + str( 1 ) )

   DEFINE FONT oFont2 NAME "TAHOMA" SIZE 0,-12
   DEFINE FONT oBold2 NAME "TAHOMA" SIZE 0,-12 BOLD


 /*
      nRow+=10
       @ nRow,10 say "Firstname " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET CUSTOMER->FIRST size 200,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2
      nRow+=30
       @ nRow,10 say "Lastname" size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET CUSTOMER->LAST size 200,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2
        nRow+=30
       @ nRow,10 say "Street " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET CUSTOMER->STREET size 200,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2
        nRow+=30
       @ nRow,10 say "City " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
        nRow+=20
       @ nRow,10 GET CUSTOMER->CITY size 200,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2

        nRow+=30
       @ nRow,10 say "State " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
        nRow+=20
       @ nRow,10 GET CUSTOMER->STATE size 20,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2

       nRow+=30
       @ nRow,10 say "Zip " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
        nRow+=20
       @ nRow,10 GET CUSTOMER->ZIP size 60,20 PIXEL of oPanelLeft:adialogs[1] FONT oFont2

       nRow+=30
       @ nRow,10 say "Notes " size 80,18 PIXEL of oPanelLeft:adialogs[1]  font oBold2
        nRow+=20
       @ nRow,10 GET CUSTOMER->NOTES size 200,120 PIXEL of oPanelLeft:adialogs[1] FONT oFont2
*/


return nil




function XbrSetupBar( oBrw )

   // oBrw:nTopBarHeight := 30
   oBrw:bOnAdjust := <||
   local oBtn
   @ 05,05 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\16X16\new.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
      ACTION oBrw:EditSource( .t. ) TOOLTIP "Add New Record"
   @ 05,45 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\edit.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
      ACTION oBrw:EditSource() TOOLTIP "Edit this record"
   @ 05,85 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\16x16\delete.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
      ACTION If( MsgNoYes( "Delete this row?" ),,oBrw:Delete() ) TOOLTIP "Delete This Record"

return nil
>

    return nil



FUNCTION Ut_BrwRowConfig7( oBrw )

   oBrw:nRowSel      := 1
   oBrw:nColSel      := 1
   oBrw:nColOffset   := 1
   oBrw:nFreeze      := 0
   oBrw:nCaptured    := 0
   oBrw:nLastEditCol := 0

   oBrw:l2007                    := .f.
   oBrw:lMultiselect        := .f.
   oBrw:lTransparent        := .f.
   oBrw:nStyle              -= WS_BORDER
   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7
   oBrw:nStretchCol           := -1             // STRETCHCOL_LAST
   oBrw:bClrStd             := {|| { CLR_BLACK, CLR_WHITE } }
   oBrw:lColDividerComplete := .t.
   oBrw:lRecordSelector     := .t.
   oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
   oBrw:nHeaderHeight       := 24
   oBrw:nRowHeight          := 20
   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7 // MARQSTYLE_SOLIDCELL
   oBrw:nRowDividerStyle    := LINESTYLE_NOLINES
   oBrw:lExcelCellWise       := .f.

RETURN nil







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

Re: flickering effect

Postby Silvio.Falconi » Fri Oct 02, 2020 7:11 am

yes of course, I made it beacuse before I had a Panel

I have one error
I not see the buttonbar (bottom of the dialog) at init , th eprocedure show it only if the final user resize the dialog
then I cannot edit the gets



Please compile this test ( I correct it with your modifies)
Code: Select all  Expand view  RUN


    #include "fivewin.ch"
    #include "ttitle.ch"

    request dbfcdx
    request dbffpt



    Function test()
       Local oTabella,oFolder,oBrw
       Local oFont,oBold
       local oBtnClose,oBtnNew
       Local nSplit:= 250
       Local oTitle
       Local oBar,oBut[5]
       local aGet[10]

       USE CUSTOMER NEW SHARED VIA "DBFCDX"


       DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
       DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-14 BOLD

       DEFINE DIALOG oTabella SIZE 880,600 ;
          PIXEL TRUEPIXEL RESIZABLE FONT oFont;
          TITLE "Test customer "


   ///-----------------------title

       @ 0000,0000 TITLE oTitle OF oTabella SIZE 1025,0059 NOBORDER //PIXEL
       oTitle:aGrdBack := {{1,nRgb(89,167,229),nRgb(89,167,229)}}
       oTitle:nShadow  := 0

       @ 0010,0020 TITLEIMG OF oTitle BITMAP "contatti.bmp" SIZE 0052,0052
       @ 0015,0120 TITLETEXT OF oTitle TEXT "Agenda Telefonica" COLOR nRGB(255,255,255)
       @ 0040,0120 TITLETEXT OF oTitle TEXT "CONTATTI"          COLOR nRGB(000,000,000)




  ///-----------------------bottom buttonbar

    DEFINE BUTTONBAR oBar OF oTabella 2015 SIZE 92,44 BOTTOM
    DEFINE BUTTON oBut[1] OF oBar PROMPT "Stampa"        LEFT FILENAME   ".\BITMAPS\STAMPA.BMP"
    DEFINE BUTTON oBut[2] OF oBar PROMPT "Etichette"     LEFT FILENAME   ".\BITMAPS\ETI.BMP"
    DEFINE BUTTON oBut[3] OF oBar PROMPT "Allegati"      LEFT FILENAME   ".\BITMAPS\ALLEGA.BMP"
    DEFINE BUTTON oBut[4] OF oBar PROMPT "Rit.Acconto"   LEFT FILENAME  ".\BITMAPS\RIT.BMP"
    DEFINE BUTTON oBut[5] OF oBar PROMPT "Includi doc. " LEFT FILENAME ".\BITMAPS\GENERA.BMP" GROUP


    ///-----------------------xbrowse

       @  20,10 XBROWSE oBrw SIZE -nSplit,oBar:ntop PIXEL OF oTabella ;
          DATASOURCE "CUSTOMER" AUTOCOLS CELL LINES NOBORDER


       oBrw:lColDividerComplete := .f.
       oBrw:lRecordSelector     := .f.
       oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
       oBrw:nHeaderHeight       := 24
       oBrw:nRowHeight          := 20
       oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7 // MARQSTYLE_SOLIDCELL
       oBrw:nRowDividerStyle    := LINESTYLE_NOLINES

     WITH OBJECT oBrw
       :nEditTypes    := EDIT_GET
       :SetChecks()
       :bChange  := { ||RefreshGet(aGet)  }
       //
       :CreateFromCode()
    END

    oBrw:SetStyle( 2015 )

   // XbrSetupBar( oBrw )




  ///-----------------------Folder

    @ 20, 0 FOLDER oFolder OF oTabella SIZE 100,100 PIXEL  ;
       PROMPT "General","Details"



 ///-----------------------Dialog bresize

  oTabella:bResized  := <||
    local oRect    := oTabella:GetCliRect()
    oBrw:nTop:=  oTitle:nBottom+5
    oBrw:nBottom:= oBar:nTop
    oBrw:refresh()

    oFolder:nTop:=  oTitle:nBottom+5
    oFolder:nLeft      := oRect:nRight - nSplit +2
    oFolder:nwidth     := oRect:nRight-60
    oFolder:nHeight    := oRect:nBottom - 80  - oBar:nHeight
    oFolder:refresh()
    oBar:refresh()
    RETURN NIL
    >

    ACTIVATE DIALOG oTabella CENTERED ;
       on INIT  ( testdlg( oFolder,aGet ) ,Eval(oTabella:bResized))

    RELEASE FONT oFont,oBold

  RETURN NIL





    //--------------------------------------------//
    Function testdlg( oFolder,aGet )
       Local oFont2,oBold2
       Local nRow:= 12

       DEFINE FONT oFont2 NAME "TAHOMA" SIZE 0,-12
       DEFINE FONT oBold2 NAME "TAHOMA" SIZE 0,-12 BOLD

       nRow+=10
       @ nRow,10 say "Firstname " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET aGet[1] VAR CUSTOMER->FIRST  OF oFolder:adialogs[1] PIXEL FONT oFont2 SIZE 200, 20
       nRow+=30
       @ nRow,10 say "Lastname" size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET aGet[2] VAR CUSTOMER->LAST size 200,20 PIXEL of oFolder:adialogs[1] FONT oFont2
       nRow+=30
       @ nRow,10 say "Street " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET aGet[3] VAR CUSTOMER->STREET size 200,20 PIXEL of oFolder:adialogs[1] FONT oFont2
       nRow+=30
       @ nRow,10 say "City " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET  aGet[4] VAR CUSTOMER->CITY size 200,20 PIXEL of oFolder:adialogs[1]FONT oFont2
       nRow+=30
       @ nRow,10 say "State " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
        nRow+=20
       @ nRow,10 GET  aGet[5] VAR CUSTOMER->STATE size 20,20 PIXEL of oFolder:adialogs[1] FONT oFont2
        nRow+=30
       @ nRow,10 say "Zip " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
        nRow+=20
       @ nRow,10 GET  aGet[6] VAR CUSTOMER->ZIP size 60,20 PIXEL of oFolder:adialogs[1] FONT oFont2
        nRow+=30
       @ nRow,10 say "Notes " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
        nRow+=20
       @ nRow,10 GET  aGet[7] VAR CUSTOMER->NOTES size 200,120 PIXEL of oFolder:adialogs[1] FONT oFont2

    return nil
  //--------------------------------------------//

Function RefreshGet(aGet)
   Local n
   For n= 1 to 7
      aGet[n]:refresh()
   next
return nil

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



    function XbrSetupBar( oBrw )

       oBrw:nTopBarHeight := 30
       oBrw:bOnAdjust := <||
       local oBtn
       @ 05,05 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\16X16\new.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
          ACTION oBrw:EditSource( .t. ) TOOLTIP "Add New Record"
       @ 05,45 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\edit.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
          ACTION oBrw:EditSource() TOOLTIP "Edit this record"
       @ 05,85 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\16x16\delete.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
          ACTION If( MsgNoYes( "Delete this row?" ),,oBrw:Delete() ) TOOLTIP "Delete This Record"

    return nil
    >

 return nil


 //--------------------------------------------//
    FUNCTION Ut_BrwRowConfig7( oBrw )

       oBrw:nRowSel      := 1
       oBrw:nColSel      := 1
       oBrw:nColOffset   := 1
       oBrw:nFreeze      := 0
       oBrw:nCaptured    := 0
       oBrw:nLastEditCol := 0

       oBrw:l2007                    := .f.
       oBrw:lMultiselect        := .f.
       oBrw:lTransparent        := .f.
       oBrw:nStyle              -= WS_BORDER
       oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7
       oBrw:nStretchCol           := -1             // STRETCHCOL_LAST
       oBrw:bClrStd             := {|| { CLR_BLACK, CLR_WHITE } }
       oBrw:lColDividerComplete := .t.
       oBrw:lRecordSelector     := .t.
       oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
       oBrw:nHeaderHeight       := 24
       oBrw:nRowHeight          := 20
       oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7 // MARQSTYLE_SOLIDCELL
       oBrw:nRowDividerStyle    := LINESTYLE_NOLINES
       oBrw:lExcelCellWise       := .f.

    RETURN nil
 //--------------------------------------------//
   



If you click on a get and then return on the xbrowse go out this error

How I can resove it ?


Image
Last edited by Silvio.Falconi on Fri Oct 02, 2020 7:33 am, edited 1 time in total.
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: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: flickering effect

Postby Otto » Fri Oct 02, 2020 7:22 am

Silvio, can you please post back your source which is working now.
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: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: flickering effect

Postby Silvio.Falconi » Fri Oct 02, 2020 7:37 am

I insert above the last source
now another error : when you resize the dialog the xbrowse it hided
Image
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: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: flickering effect

Postby Otto » Fri Oct 02, 2020 8:30 am

Silvio,
for a test that all is working use:
Code: Select all  Expand view  RUN

Function test()
           Local oTabella,oFolder,oBrw
           Local oFont,oBold
           local oBtnClose,oBtnNew
           Local nSplit:= 250
           Local oTitle
           Local oBar,oBut[5]
           local aGet[10]
           
           set exclusive on
           USE CUSTOMER NEW  VIA "DBFCDX"


But if you want it multiuser, you have to change testdlg. You can't edit fields directly.
Which version of FW do you use? I do not have: nTopBarHeight ?

Best regards,
Otto

Code: Select all  Expand view  RUN




        #include "fivewin.ch"
        #include "ttitle.ch"

        request dbfcdx
        request dbffpt



        Function test()
           Local oTabella,oFolder,oBrw
           Local oFont,oBold
           local oBtnClose,oBtnNew
           Local nSplit:= 250
           Local oTitle
           Local oBar,oBut[5]
           local aGet[10]
           
              set exclusive on
           USE CUSTOMER NEW  VIA "DBFCDX"


           DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
           DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-14 BOLD

           DEFINE DIALOG oTabella SIZE 880,600 ;
              PIXEL TRUEPIXEL RESIZABLE FONT oFont;
              TITLE "Test customer "


       ///-----------------------title

           @ 0000,0000 TITLE oTitle OF oTabella SIZE 1025,0059 NOBORDER //PIXEL
           oTitle:aGrdBack := {{1,nRgb(89,167,229),nRgb(89,167,229)}}
           oTitle:nShadow  := 0

           @ 0010,0020 TITLEIMG OF oTitle BITMAP "contatti.bmp" SIZE 0052,0052
           @ 0015,0120 TITLETEXT OF oTitle TEXT "Agenda Telefonica" COLOR nRGB(255,255,255)
           @ 0040,0120 TITLETEXT OF oTitle TEXT "CONTATTI"          COLOR nRGB(000,000,000)




      ///-----------------------bottom buttonbar

        DEFINE BUTTONBAR oBar OF oTabella 2015 SIZE 92,44 BOTTOM
        DEFINE BUTTON oBut[1] OF oBar PROMPT "Stampa"        LEFT FILENAME   ".\BITMAPS\STAMPA.BMP"
        DEFINE BUTTON oBut[2] OF oBar PROMPT "Etichette"     LEFT FILENAME   ".\BITMAPS\ETI.BMP"
        DEFINE BUTTON oBut[3] OF oBar PROMPT "Allegati"      LEFT FILENAME   ".\BITMAPS\ALLEGA.BMP"
        DEFINE BUTTON oBut[4] OF oBar PROMPT "Rit.Acconto"   LEFT FILENAME  ".\BITMAPS\RIT.BMP"
        DEFINE BUTTON oBut[5] OF oBar PROMPT "Includi doc. " LEFT FILENAME ".\BITMAPS\GENERA.BMP" GROUP


        ///-----------------------xbrowse

           @  20,10 XBROWSE oBrw SIZE -nSplit,oBar:ntop PIXEL OF oTabella ;
              DATASOURCE "CUSTOMER" AUTOCOLS CELL LINES NOBORDER


           oBrw:lColDividerComplete := .f.
           oBrw:lRecordSelector     := .f.
           oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
           oBrw:nHeaderHeight       := 24
           oBrw:nRowHeight          := 20
           oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7 // MARQSTYLE_SOLIDCELL
           oBrw:nRowDividerStyle    := LINESTYLE_NOLINES

         WITH OBJECT oBrw
           :nEditTypes    := EDIT_GET
           :SetChecks()
           :bChange  := { ||    RefreshGet(aGet)    }
           //
           :CreateFromCode()
        END

        oBrw:SetStyle( 2015 )

       // XbrSetupBar( oBrw )




      ///-----------------------Folder

        @ 20, 0 FOLDER oFolder OF oTabella SIZE 100,100 PIXEL  ;
           PROMPT "General","Details"



 







     ///-----------------------Dialog bresize

      oTabella:bResized  := <||
        local oRect    := oTabella:GetCliRect()
        oBrw:nTop:=  oTitle:nBottom+5
        oBrw:nBottom:= oBar:nTop
        oBrw:refresh()

        oFolder:nTop:=  oTitle:nBottom+5
        oFolder:nLeft      := oRect:nRight - nSplit +2
        oFolder:nwidth     := oRect:nRight-60
        oFolder:nHeight    := oRect:nBottom - 80  - oBar:nHeight
        oFolder:refresh()
        oBar:refresh()
        RETURN NIL
        >

        ACTIVATE DIALOG oTabella CENTERED ;
           on INIT  ( testdlg( oFolder,aGet ), Eval(oTabella:bResized)   )

        RELEASE FONT oFont,oBold

      RETURN NIL





        //--------------------------------------------//
        Function testdlg( oFolder,aGet )
           Local oFont2,oBold2
           Local nRow:= 12

           DEFINE FONT oFont2 NAME "TAHOMA" SIZE 0,-12
           DEFINE FONT oBold2 NAME "TAHOMA" SIZE 0,-12 BOLD
 
         
           nRow+=10
           @ nRow,10 say "Firstname " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
           nRow+=20
           @ nRow,10 GET aGet[1] VAR CUSTOMER->FIRST  OF oFolder:adialogs[1] PIXEL FONT oFont2 SIZE 200, 20
           nRow+=30
           @ nRow,10 say "Lastname" size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
           nRow+=20
           @ nRow,10 GET aGet[2] VAR CUSTOMER->LAST size 200,20 PIXEL of oFolder:adialogs[1] FONT oFont2
           nRow+=30
           @ nRow,10 say "Street " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
           nRow+=20
           @ nRow,10 GET aGet[3] VAR CUSTOMER->STREET size 200,20 PIXEL of oFolder:adialogs[1] FONT oFont2
           nRow+=30
           @ nRow,10 say "City " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
           nRow+=20
           @ nRow,10 GET  aGet[4] VAR CUSTOMER->CITY size 200,20 PIXEL of oFolder:adialogs[1]FONT oFont2
           nRow+=30
           @ nRow,10 say "State " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
            nRow+=20
           @ nRow,10 GET  aGet[5] VAR CUSTOMER->STATE size 20,20 PIXEL of oFolder:adialogs[1] FONT oFont2
            nRow+=30
           @ nRow,10 say "Zip " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
            nRow+=20
           @ nRow,10 GET  aGet[6] VAR CUSTOMER->ZIP size 60,20 PIXEL of oFolder:adialogs[1] FONT oFont2
            nRow+=30
           @ nRow,10 say "Notes " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
            nRow+=20
           @ nRow,10 GET  aGet[7] VAR CUSTOMER->NOTES size 200,120 PIXEL of oFolder:adialogs[1] FONT oFont2
 
        return nil
      //--------------------------------------------//

    Function RefreshGet(aGet)
       Local n
       
             
       For n= 1 to 7
          aGet[n]:refresh()
       next
     
    return nil

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



        function XbrSetupBar( oBrw )

     //      oBrw:nTopBarHeight := 30
           oBrw:bOnAdjust := <||
           local oBtn
           @ 05,05 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\16X16\new.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
              ACTION oBrw:EditSource( .t. ) TOOLTIP "Add New Record"
           @ 05,45 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\edit.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
              ACTION oBrw:EditSource() TOOLTIP "Edit this record"
           @ 05,85 BTNBMP oBtn FILE "c:\work\fwh\bitmaps\16x16\delete.bmp" SIZE 30,20 PIXEL OF oBrw NOBORDER ;
              ACTION If( MsgNoYes( "Delete this row?" ),,oBrw:Delete() ) TOOLTIP "Delete This Record"

        return nil
        >

     return nil


     //--------------------------------------------//
        FUNCTION Ut_BrwRowConfig7( oBrw )

           oBrw:nRowSel      := 1
           oBrw:nColSel      := 1
           oBrw:nColOffset   := 1
           oBrw:nFreeze      := 0
           oBrw:nCaptured    := 0
           oBrw:nLastEditCol := 0

           oBrw:l2007                    := .f.
           oBrw:lMultiselect        := .f.
           oBrw:lTransparent        := .f.
           oBrw:nStyle              -= WS_BORDER
           oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7
           oBrw:nStretchCol           := -1             // STRETCHCOL_LAST
           oBrw:bClrStd             := {|| { CLR_BLACK, CLR_WHITE } }
           oBrw:lColDividerComplete := .t.
           oBrw:lRecordSelector     := .t.
           oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
           oBrw:nHeaderHeight       := 24
           oBrw:nRowHeight          := 20
           oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7 // MARQSTYLE_SOLIDCELL
           oBrw:nRowDividerStyle    := LINESTYLE_NOLINES
           oBrw:lExcelCellWise       := .f.

        RETURN nil
     //--------------------------------------------//
       

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

Re: flickering effect

Postby Silvio.Falconi » Fri Oct 02, 2020 8:58 am

>Which version of FW do you use? I do not have: nTopBarHeight ?
see here http://forums.fivetechsupport.com/viewtopic.php?f=3&t=39178&p=233760&hilit=nTopBarHeight#p233760
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: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: flickering effect

Postby Silvio.Falconi » Fri Oct 02, 2020 9:20 am

Otto,
if you resize the dialog to the left and then reopen it you will see that the xbrowse is hidden, why?
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: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: flickering effect

Postby Silvio.Falconi » Fri Oct 02, 2020 9:38 am

last res
Image





Otto,
if you resize the dialog to the left and then reopen it you will see that the xbrowse is hidden, why?







Code: Select all  Expand view  RUN


    #include "fivewin.ch"
    #include "ttitle.ch"

    request dbfcdx
    request dbffpt



    Function test()
       Local oTabella,oFolder,oBrw
       Local oFont,oBold
       local oBtnClose,oBtnNew
       Local nSplit:= 250
       Local oTitle
       Local oBar,oBut[5]
       local aGet[10]
       local oBmp


     // USE CUSTOMER NEW SHARED VIA "DBFCDX"
       USE CUSTOMER ALIAS CUSTOMER

       DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
       DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-14 BOLD

       DEFINE DIALOG oTabella SIZE 880,600 ;
          PIXEL TRUEPIXEL RESIZABLE FONT oFont;
          TITLE "Test customer "


   ///-----------------------title

       @ 0000,0000 TITLE oTitle OF oTabella SIZE 1025,0059 NOBORDER //PIXEL
       oTitle:aGrdBack := {{1,nRgb(89,167,229),nRgb(89,167,229)}}
       oTitle:nShadow  := 0

       @ 0010,0020 TITLEIMG OF oTitle BITMAP "contatti.bmp" SIZE 0052,0052
       @ 0015,0120 TITLETEXT OF oTitle TEXT "Agenda Telefonica" COLOR nRGB(255,255,255)
       @ 0040,0120 TITLETEXT OF oTitle TEXT "CONTATTI"          COLOR nRGB(000,000,000)




  ///-----------------------bottom buttonbar

    DEFINE BUTTONBAR oBar OF oTabella 2015 SIZE 92,44 BOTTOM
    DEFINE BUTTON oBut[1] OF oBar PROMPT "Stampa"        LEFT FILENAME   ".\BITMAPS\STAMPA.BMP"
    DEFINE BUTTON oBut[2] OF oBar PROMPT "Etichette"     LEFT FILENAME   ".\BITMAPS\ETI.BMP"
    DEFINE BUTTON oBut[3] OF oBar PROMPT "Allegati"      LEFT FILENAME   ".\BITMAPS\ALLEGA.BMP"
    DEFINE BUTTON oBut[4] OF oBar PROMPT "Rit.Acconto"   LEFT FILENAME  ".\BITMAPS\RIT.BMP"
    DEFINE BUTTON oBut[5] OF oBar PROMPT "Includi doc. " LEFT FILENAME ".\BITMAPS\GENERA.BMP" GROUP


    ///-----------------------xbrowse

       @  20,10 XBROWSE oBrw SIZE -nSplit,oBar:ntop PIXEL OF oTabella ;
          DATASOURCE "CUSTOMER" AUTOCOLS CELL LINES NOBORDER


       oBrw:lColDividerComplete := .f.
       oBrw:lRecordSelector     := .f.
       oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
       oBrw:nHeaderHeight       := 24
       oBrw:nRowHeight          := 20
       oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7 // MARQSTYLE_SOLIDCELL
       oBrw:nRowDividerStyle    := LINESTYLE_NOLINES

     WITH OBJECT oBrw
       :nEditTypes    := EDIT_GET
       :SetChecks()
       :bChange  := { ||RefreshGet(aGet)  }
       //
       :CreateFromCode()
    END

    oBrw:SetStyle( 2015 )


  ///-----------------------Folder

    @ 20, 0 FOLDER oFolder OF oTabella SIZE 100,100 PIXEL  ;
       PROMPT "General","Details"



 ///-----------------------Dialog bresize

  oTabella:bResized  := <||
    local oRect    := oTabella:GetCliRect()
    oBrw:nTop:=  oTitle:nBottom+5
    oBrw:nBottom:= oBar:nTop
    oBrw:refresh()

    oFolder:nTop:=  oTitle:nBottom+5
    oFolder:nLeft      := oRect:nRight - nSplit +2
    oFolder:nwidth     := oRect:nRight-80
    oFolder:nHeight    := oRect:nBottom - 80  - oBar:nHeight
    oFolder:refresh()
    oBar:refresh()
    oBrw:refresh()
    RETURN NIL
    >

    ACTIVATE DIALOG oTabella CENTERED ;
       on INIT  ( testdlg( oFolder,aGet,oBmp ) ,;
                  Refresh_modificato(aGet,oBmp), ;
       Eval(oTabella:bResized),oBrw:refresh())

    RELEASE FONT oFont,oBold

  RETURN NIL





    //--------------------------------------------//
    Function testdlg( oFolder,aGet,oBmp )
       Local oFont2,oBold2
       Local nRow:= 12

       DEFINE FONT oFont2 NAME "TAHOMA" SIZE 0,-12
       DEFINE FONT oBold2 NAME "TAHOMA" SIZE 0,-12 BOLD

        nRow+=2

     ///----------------------- a bmp to see if the record is changed
                @ nRow-8,180 BITMAP  oBmp   RESOURCE "CLIP_OFF" NOBORDER  OF oFolder:adialogs[1]   SIZE 40, 40 PIXEL TRANSPARENT ADJUST


         nRow+=10

 ///----------------------- all the gets
       @ nRow,10 say "Firstname " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET aGet[1] VAR CUSTOMER->FIRST  OF oFolder:adialogs[1] PIXEL FONT oFont2 SIZE 200, 20
       nRow+=30
       @ nRow,10 say "Lastname" size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET aGet[2] VAR CUSTOMER->LAST size 200,20 PIXEL of oFolder:adialogs[1] FONT oFont2
       nRow+=30
       @ nRow,10 say "Street " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET aGet[3] VAR CUSTOMER->STREET size 200,20 PIXEL of oFolder:adialogs[1] FONT oFont2
       nRow+=30
       @ nRow,10 say "City " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
       nRow+=20
       @ nRow,10 GET  aGet[4] VAR CUSTOMER->CITY size 200,20 PIXEL of oFolder:adialogs[1]FONT oFont2
       nRow+=30
       @ nRow,10 say "State " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
        nRow+=20
       @ nRow,10 GET  aGet[5] VAR CUSTOMER->STATE size 20,20 PIXEL of oFolder:adialogs[1] FONT oFont2
        nRow+=30
       @ nRow,10 say "Zip " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
        nRow+=20
       @ nRow,10 GET  aGet[6] VAR CUSTOMER->ZIP size 60,20 PIXEL of oFolder:adialogs[1] FONT oFont2
        nRow+=30
       @ nRow,10 say "Notes " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
        nRow+=20
       @ nRow,10 GET  aGet[7] VAR CUSTOMER->NOTES size 200,120 PIXEL of oFolder:adialogs[1] FONT oFont2



       nRow+=140




    return nil
  //--------------------------------------------//
// If the record is modified show another image

  static Function Refresh_modificato(aGet,oBmp)
     For n=1 to 7
    aGet[n]:bChange:={||(oBmp:RELOAD('CLIP_ON',) ,oBmp:refresh())}
  Next
 return nil

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


Function RefreshGet(aGet)
   Local n
   For n= 1 to 7
      aGet[n]:refresh()
   next
return nil

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





 //--------------------------------------------//
    FUNCTION Ut_BrwRowConfig7( oBrw )

       oBrw:nRowSel      := 1
       oBrw:nColSel      := 1
       oBrw:nColOffset   := 1
       oBrw:nFreeze      := 0
       oBrw:nCaptured    := 0
       oBrw:nLastEditCol := 0

       oBrw:l2007                    := .f.
       oBrw:lMultiselect        := .f.
       oBrw:lTransparent        := .f.
       oBrw:nStyle              -= WS_BORDER
       oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7
       oBrw:nStretchCol           := -1             // STRETCHCOL_LAST
       oBrw:bClrStd             := {|| { CLR_BLACK, CLR_WHITE } }
       oBrw:lColDividerComplete := .t.
       oBrw:lRecordSelector     := .t.
       oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
       oBrw:nHeaderHeight       := 24
       oBrw:nRowHeight          := 20
       oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7 // MARQSTYLE_SOLIDCELL
       oBrw:nRowDividerStyle    := LINESTYLE_NOLINES
       oBrw:lExcelCellWise       := .f.

    RETURN nil
 //--------------------------------------------//






 
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: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: flickering effect

Postby Otto » Fri Oct 02, 2020 10:02 am

Hello Silvio,
try this:

Code: Select all  Expand view  RUN

 
           ACTIVATE DIALOG oTabella ;
          CENTERED ;
           ON INIT ( testdlg( oFolder,aGet,oBmp ), Refresh_modificato(aGet,oBmp), Eval(oTabella:bResized),oBrw:refresh()) ;
          ON PAINT (  iif( oTabella:nwidth > 350, , (oTabella:nwidth := 350, oTabella:refresh() ) ) )

 


Regards,
Otto


Code: Select all  Expand view  RUN



        #include "fivewin.ch"
        #include "ttitle.ch"

        request dbfcdx
        request dbffpt



        Function test()
           Local oTabella,oFolder,oBrw
           Local oFont,oBold
           local oBtnClose,oBtnNew
           Local nSplit:= 250
           Local oTitle
           Local oBar,oBut[5]
           local aGet[10]
           local oBmp


         // USE CUSTOMER NEW SHARED VIA "DBFCDX"
           USE CUSTOMER ALIAS CUSTOMER

           DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
           DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-14 BOLD

           DEFINE DIALOG oTabella SIZE 880,600 ;
              PIXEL TRUEPIXEL RESIZABLE FONT oFont;
              TITLE "Test customer "


       ///-----------------------title

           @ 0000,0000 TITLE oTitle OF oTabella SIZE 1025,0059 NOBORDER //PIXEL
           oTitle:aGrdBack := {{1,nRgb(89,167,229),nRgb(89,167,229)}}
           oTitle:nShadow  := 0

           @ 0010,0020 TITLEIMG OF oTitle BITMAP "contatti.bmp" SIZE 0052,0052
           @ 0015,0120 TITLETEXT OF oTitle TEXT "Agenda Telefonica" COLOR nRGB(255,255,255)
           @ 0040,0120 TITLETEXT OF oTitle TEXT "CONTATTI"          COLOR nRGB(000,000,000)




      ///-----------------------bottom buttonbar

        DEFINE BUTTONBAR oBar OF oTabella 2015 SIZE 92,44 BOTTOM
        DEFINE BUTTON oBut[1] OF oBar PROMPT "Stampa"        LEFT FILENAME   ".\BITMAPS\STAMPA.BMP"
        DEFINE BUTTON oBut[2] OF oBar PROMPT "Etichette"     LEFT FILENAME   ".\BITMAPS\ETI.BMP"
        DEFINE BUTTON oBut[3] OF oBar PROMPT "Allegati"      LEFT FILENAME   ".\BITMAPS\ALLEGA.BMP"
        DEFINE BUTTON oBut[4] OF oBar PROMPT "Rit.Acconto"   LEFT FILENAME  ".\BITMAPS\RIT.BMP"
        DEFINE BUTTON oBut[5] OF oBar PROMPT "Includi doc. " LEFT FILENAME ".\BITMAPS\GENERA.BMP" GROUP


        ///-----------------------xbrowse

           @  20,10 XBROWSE oBrw SIZE -nSplit,oBar:ntop PIXEL OF oTabella ;
              DATASOURCE "CUSTOMER" AUTOCOLS CELL LINES NOBORDER


           oBrw:lColDividerComplete := .f.
           oBrw:lRecordSelector     := .f.
           oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
           oBrw:nHeaderHeight       := 24
           oBrw:nRowHeight          := 20
           oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7 // MARQSTYLE_SOLIDCELL
           oBrw:nRowDividerStyle    := LINESTYLE_NOLINES

         WITH OBJECT oBrw
           :nEditTypes    := EDIT_GET
           :SetChecks()
           :bChange  := { ||RefreshGet(aGet)  }
           //
           :CreateFromCode()
        END

        oBrw:SetStyle( 2015 )


      ///-----------------------Folder

        @ 20, 0 FOLDER oFolder OF oTabella SIZE 100,100 PIXEL  ;
           PROMPT "General","Details"



     ///-----------------------Dialog bresize

      oTabella:bResized  := <||
        local oRect    := oTabella:GetCliRect()
       
        oBrw:nTop:=  oTitle:nBottom+5
        oBrw:nBottom:= oBar:nTop
        oBrw:refresh()

        oFolder:nTop        := oTitle:nBottom+5
     
       oFolder:nLeft      := oRect:nRight - nSplit +2
       
       
       
        oFolder:nwidth     := oRect:nRight-80
        oFolder:nHeight    := oRect:nBottom - 80  - oBar:nHeight
        oFolder:refresh()
        oBar:refresh()
        oBrw:refresh()
        RETURN NIL
        >
/*
        ACTIVATE DIALOG oTabella CENTERED ;
           on INIT  ( testdlg( oFolder,aGet,oBmp ),                      Refresh_modificato(aGet,oBmp),                       Eval(oTabella:bResized),oBrw:refresh()),;
           VALID(  iif( oTabella:nwidth > 250, .t., .f. ) )
  */
     
       
           
       
       
           ACTIVATE DIALOG oTabella ;
          CENTERED ;
           ON INIT ( testdlg( oFolder,aGet,oBmp ), Refresh_modificato(aGet,oBmp), Eval(oTabella:bResized),oBrw:refresh()) ;
          ON PAINT (  iif( oTabella:nwidth > 350, , (oTabella:nwidth := 350, oTabella:refresh() ) ) )

       
       
       
       
       
       
        RELEASE FONT oFont,oBold

      RETURN NIL





        //--------------------------------------------//
        Function testdlg( oFolder,aGet,oBmp )
           Local oFont2,oBold2
           Local nRow:= 12

           DEFINE FONT oFont2 NAME "TAHOMA" SIZE 0,-12
           DEFINE FONT oBold2 NAME "TAHOMA" SIZE 0,-12 BOLD

            nRow+=2

         ///----------------------- a bmp to see if the record is changed
                    @ nRow-8,180 BITMAP  oBmp   RESOURCE "CLIP_OFF" NOBORDER  OF oFolder:adialogs[1]   SIZE 40, 40 PIXEL TRANSPARENT ADJUST


             nRow+=10

     ///----------------------- all the gets
           @ nRow,10 say "Firstname " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
           nRow+=20
           @ nRow,10 GET aGet[1] VAR CUSTOMER->FIRST  OF oFolder:adialogs[1] PIXEL FONT oFont2 SIZE 200, 20
           nRow+=30
           @ nRow,10 say "Lastname" size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
           nRow+=20
           @ nRow,10 GET aGet[2] VAR CUSTOMER->LAST size 200,20 PIXEL of oFolder:adialogs[1] FONT oFont2
           nRow+=30
           @ nRow,10 say "Street " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
           nRow+=20
           @ nRow,10 GET aGet[3] VAR CUSTOMER->STREET size 200,20 PIXEL of oFolder:adialogs[1] FONT oFont2
           nRow+=30
           @ nRow,10 say "City " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
           nRow+=20
           @ nRow,10 GET  aGet[4] VAR CUSTOMER->CITY size 200,20 PIXEL of oFolder:adialogs[1]FONT oFont2
           nRow+=30
           @ nRow,10 say "State " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
            nRow+=20
           @ nRow,10 GET  aGet[5] VAR CUSTOMER->STATE size 20,20 PIXEL of oFolder:adialogs[1] FONT oFont2
            nRow+=30
           @ nRow,10 say "Zip " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
            nRow+=20
           @ nRow,10 GET  aGet[6] VAR CUSTOMER->ZIP size 60,20 PIXEL of oFolder:adialogs[1] FONT oFont2
            nRow+=30
           @ nRow,10 say "Notes " size 80,18 PIXEL of oFolder:adialogs[1]  font oBold2
            nRow+=20
           @ nRow,10 GET  aGet[7] VAR CUSTOMER->NOTES size 200,120 PIXEL of oFolder:adialogs[1] FONT oFont2



           nRow+=140




        return nil
      //--------------------------------------------//
    // If the record is modified show another image

      static Function Refresh_modificato(aGet,oBmp)
         For n=1 to 7
        aGet[n]:bChange:={||(oBmp:RELOAD('CLIP_ON',) ,oBmp:refresh())}
      Next
     return nil

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


    Function RefreshGet(aGet)
       Local n
       For n= 1 to 7
          aGet[n]:refresh()
       next
    return nil

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





     //--------------------------------------------//
        FUNCTION Ut_BrwRowConfig7( oBrw )

           oBrw:nRowSel      := 1
           oBrw:nColSel      := 1
           oBrw:nColOffset   := 1
           oBrw:nFreeze      := 0
           oBrw:nCaptured    := 0
           oBrw:nLastEditCol := 0

           oBrw:l2007                    := .f.
           oBrw:lMultiselect        := .f.
           oBrw:lTransparent        := .f.
           oBrw:nStyle              -= WS_BORDER
           oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7
           oBrw:nStretchCol           := -1             // STRETCHCOL_LAST
           oBrw:bClrStd             := {|| { CLR_BLACK, CLR_WHITE } }
           oBrw:lColDividerComplete := .t.
           oBrw:lRecordSelector     := .t.
           oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
           oBrw:nHeaderHeight       := 24
           oBrw:nRowHeight          := 20
           oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLWIN7 // MARQSTYLE_SOLIDCELL
           oBrw:nRowDividerStyle    := LINESTYLE_NOLINES
           oBrw:lExcelCellWise       := .f.

        RETURN nil
     //--------------------------------------------//






     

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 17 guests