Xbrowse refresh question

Xbrowse refresh question

Postby Richard Chidiak » Thu Jun 18, 2009 2:22 pm

Hello

I have a problem with a xbrowse refresh when editing a cell ,

When i dbl click on a cell, the whole browse is refreshed (before any editing or operation) , in a network environment this is very long to display

any idea ?

here is part of the code below,

thanks for help,

Richard
Code: Select all  Expand view


   @ 10,200 XBROWSE oBrwpla OF wndpmain ;
         SIZE wndpmain:nwidth - 200,wndpmain:nHeight - 30 PIXEL ;
         ALIAS TRANS[04]

   oCol := oBrwPLA:AddCol()
   oCol:bStrData := {|| (TRANS[04])->PLAGE}

   AEval( TABVAR[15], { |DLIB,X | CRECOL(x,@TRANS,@OBRWPLA) } )

   oBrwPLA:nMarqueeStyle       := 1
   oBrwpla:nColDividerStyle    := LINESTYLE_INSET
   oBrwPLA:lColDividerComplete := .T.
   oBrwPLA:lRecordSelector     := .T.

   oBrwPLA:bClrStd    := {|| { CLR_BLUE, CLR_WHITE } }
   oBrwPLA:bClrHEADER := {|| { CLR_BLUE, COULDLG("TD") } }

   oBRWPLA:blDblClick := { | nRow, nCol, nKey | EditCel(@TRANS, OBRWPLA,@TPAR,nRow,nCol) }

   FOR I = 1 TO LEN(oBrwPLA:aCols)
       oBrwPLA:aCols[I]:nWidth  := TRANS[10][I]
       oBrwPLA:aCols[i]:bRClickData := {|| Menucopy(@TRANS,OBRWPLA) }
   NEXT

   AEVAL(oBrwPLA:aCols, { |DLIB,X | SETCOLBRW(x,@TRANS,@OBRWPLA) } )

   obrwPLA:nRowHeight    := AGPREF->HCELL
   oBrwPLA:ndatalines    := 4
   oBrwPLA:nHeaderLines  := 2
   OBRWPLA:nFreeze       := 1
   oBrwPLA:nCOLSEL       := 2
   oBrwPLA:nCOLoffset    := 1
   oBrwPLA:nROWSEL       := 1

   oBrwPLA:bGotFocus     := {|| IF( FILE(TRANS[04] + ".DBF"),dbSelectArea(TRANS[04]), )  }

   OBRWPLA:bKeyDown := {|nKey| iif(nKey=VK_DELETE,SUPCEL(@OBRWPLA,@TRANS, .T. ,@TPAR) , ) }

   OBRWPLA:lAllowColHiding    := .F.
   OBRWPLA:lAllowRowSizing    := .F.
   OBRWPLA:lAllowColSwapping  := .F.
   OBRWPLA:l2007              := .T.

   oBrwPLA:CreateFromCODE()

   oBrwPLA:bKeyCount := {|| ( oBrwPLA:cAlias )->( OrdKeyCount() ) }

   oBrwPLA:oDragCursor   := TRANS[12]

   oBrwPLA:bDragBegin    := { |nRow,nCol,nFlags| DragBegin( nRow, nCol, nFlags, @TRANS, @oBrwPLA ) }
   oBrwPLA:bDropOver     := { |uDropInfo, nRow, nCol, nFlags| DropOver( uDropInfo, nRow, nCol, nFlags, @TRANS, @oBrwPLA ) }

 
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Xbrowse refresh question

Postby James Bott » Thu Jun 18, 2009 4:55 pm

Richard,

Why not just use spreadsheet style editing?

oBrw:lFastEdit:=.t. // any alpha-numeric key triggers the edit

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Xbrowse refresh question

Postby Richard Chidiak » Fri Jun 19, 2009 3:40 am

James

I know about cell fast editing, but this does not make a change in background permanent refresh my main concern

Thanks for the help

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Xbrowse refresh question

Postby nageswaragunupudi » Fri Jun 19, 2009 4:58 am

Mr Chidiak

You can be quite sure that double click by itself, does not call Refresh() method.
Possible that some other operation inside the function that is called on double click triggers a refresh() directly or indirectly.

I have tested this by modifying the xbrowse.prg temporarily for this test.

I created a new data nRefresh init 0
I modified method refresh() to increment obrw:nrefresh every time refresh() is called.
I checked the value of nRefresh before and after doubleclick. There is no change in the value by double clicking.
( tested with edittype, assigning function to double click, etc. )

I would suggest you to please check with a dummy EditCell() function without any action inside.
Regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests