FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Refresh an array
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Refresh an array
Posted: Tue Apr 02, 2013 01:15 PM

I need to refresh an array allready opened into a xbrowse

for load the arrays from another archive dbf I use at init

DO WHILE ! MA->(EoF())
AAdd( aMatBmp,( TRIM(MA->Image)))
AAdd( aMatItems,( TRIM(MA->Descri)))
MA->(DbSkip())
ENDDO

Looking the picture....I use this to show on xbrowse big the bitmaps

If I open the dialog to change a record / on Materia.dbf) I wish refresh the arrays aMatBmp and aMatItems

Now I must close and open the xbrowse big to recreate the arrays because then xbrowse not found if there is a new record on arrays or a record on arrays is modified

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Refresh an array
Posted: Wed Apr 03, 2013 07:28 PM

Any solution please ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Refresh an array
Posted: Thu Apr 04, 2013 04:30 AM
Code (fw): Select all Collapse
oBrw:aArrayData:=aModifiedData
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Refresh an array
Posted: Thu Apr 04, 2013 02:28 PM

Try:

oBrw:setArray( aNewArray )

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: Refresh an array
Posted: Thu Apr 04, 2013 04:19 PM

all of the above, aslo; you could just change the array element and then refresh() the current xbrowse row.

oBrw:Columnx:Value( nNewvalue )
oBrw:refreshcurrent()

Reinaldo.

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Refresh an array
Posted: Thu Apr 04, 2013 06:44 PM

Perhaps I not explain good

At init I save on two array the text and the bitmaps from another dbf ( materia.dbf)

SELECT MA
MA->(DbSetOrder(1))
MA->(DbGoTop())
DO WHILE ! MA->(EoF())
AAdd( aMatBmp,( TRIM(MA->Image)))
AAdd( aMatItems,( TRIM(MA->Descri)))
MA->(DbSkip())
ENDDO

ON the main xbrowse open and on this on a column (4) I use this command :

:AddBitmap( aMatBmp )
:bBmpData := { || AScan( aMatItems, Trim(CL->CLMATERIA ))+2 }

At left on explorerBar I can open the materia.dbf ( small xbrowse)

I use a blur effect to open the small xbrowse with materia.dbf

Function BlurEffect( oBrw )
local hBmp
local hBlur

oBrw:GetDC()

hBmp := MakeBkBmp( oBrw:hWnd, oBrw:hDC )
hBlur := Blur( hBmp, 3 )

PalBmpDraw( oBrw:hDC, 0, 0, hBlur )

Materia() <------ small xbrowse

DeleteObject( hBmp )
DeleteObject( hBlur )

oBrw:ReleaseDC()
oBrw:refresh()

return nil

If I change a bitmap or a Item then it not refresh the column (4) on the big xbrowse

How I can resolve it ?

now I resolved to close the big xbrowse and reopen the big xbrowse but this is wrong

if you have time you can download the app at

http://www.eoeo.it/wp-content/plugins/d ... d.php?id=1
and see the error

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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

Continue the discussion