Row Refresh in a BROWSE
Moderator: Rathinagiri
-
- Posts: 273
- Joined: Sat May 18, 2019 2:11 pm
- DBs Used: Visual FoxPro, FoxPro
- Location: United States of America
Re: Row Refresh in a BROWSE
Hi Gabor,
SUCCESS! Thank you so much for sharing your HMG expertise. Your solution works great. I can live with the browse "flickering".
Again, thanks for your help. It is really appreciated!
Best Regards,
Red2
SUCCESS! Thank you so much for sharing your HMG expertise. Your solution works great. I can live with the browse "flickering".
Again, thanks for your help. It is really appreciated!
Best Regards,
Red2
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Row Refresh in a BROWSE
hi,
still flicker so try this
you are right
Code: Select all
DoMethod(cBroMacro, "BrowserView","Refresh",.T.)
Code: Select all
RefreshCurrent(cBroMacro, "BrowserView")
PROCEDURE RefreshCurrent(cForm,cBrowse)
LOCAL hBrowse := GetControlHandle(cBrowse, cForm )
LOCAL nRecord := GetProperty( cForm, cBrowse, "VALUE" )
ListView_RedrawItems( hBrowse, nRecord, nRecord )
RETURN
have fun
Jimmy
Jimmy
Re: Row Refresh in a BROWSE
It's not working with BROWSE in my opinion
-
- Posts: 273
- Joined: Sat May 18, 2019 2:11 pm
- DBs Used: Visual FoxPro, FoxPro
- Location: United States of America
Re: Row Refresh in a BROWSE
Hi Jimmy,
Thank you for your reply and suggestion. I added your code. My form's name is "DataBrowse" and the BROWSE's name is "BrowseStates".
Unfortunately it produced no refresh at all. (Perhaps my calling parameters are not correct):
It would be very nice if HMG could refresh only the BROWSE's altered record.
If you have any further suggestions I would really appreciate hearing them.
Regards
Red2
Thank you for your reply and suggestion. I added your code. My form's name is "DataBrowse" and the BROWSE's name is "BrowseStates".
Unfortunately it produced no refresh at all. (Perhaps my calling parameters are not correct):
Code: Select all
RefreshCurrent( "DataBrowse", "BrowseStates" )
If you have any further suggestions I would really appreciate hearing them.
Regards
Red2
-
- Posts: 273
- Joined: Sat May 18, 2019 2:11 pm
- DBs Used: Visual FoxPro, FoxPro
- Location: United States of America
Re: Row Refresh in a BROWSE
Hi Jimmy,
Thank you for your quick reply, I really appreciate it! Am I understanding your question correctly? I:
1) Replace the field value
2) Set flag llRefresh
3) Then, if TRUE, call function RefreshCurrent()
My code follows:
QUESTION: What am I missing here?
Thanks again,
Red2
Thank you for your quick reply, I really appreciate it! Am I understanding your question correctly? I:
1) Replace the field value
2) Set flag llRefresh
3) Then, if TRUE, call function RefreshCurrent()
My code follows:
Code: Select all
function ToPrintToggle( p_lPrint)
select "By_State"
local llRefresh := .F.
if ( p_lPrint ) // TRUE
if ( upper( By_State->MergeState ) != "Y" )
replace By_State->MergeState with "Y" // <--- REPLACEMENT
llRefresh := .T.
endif
else // FALSE
if ( By_State->MergeState != " " )
replace By_State->MergeState with " " // <--- REPLACEMENT
llRefresh := .T.
endif
endif
if ( llRefresh )
RefreshCurrent( "DataBrowse", "BrowseStates" )
endif
return Nil
Thanks again,
Red2
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Row Refresh in a BROWSE
hi,
i use DBF with virtual GRID which display faster while it must not read DBF -> Array -> Refresh
so here Code for Array or DBF using GRID or BROWSE
your are right, Code was for GRID and does not refresh with BROWSE
i use DBF with virtual GRID which display faster while it must not read DBF -> Array -> Refresh
so here Code for Array or DBF using GRID or BROWSE
Code: Select all
ACTIVATE WINDOW &oBroEdit
DoFindWin( cDBF )
#IFDEF Use_DataBrowse
Refreshline(cBroMacro,"BrowserView",aStruc)
#ELSE
RefreshCurrent(cBroMacro, "BrowserView")
#ENDIF
RETURN
Code: Select all
STATIC PROCEDURE Refreshline(cForm,cBrowse,aStruc)
LOCAL ii, iMax := LEN(aStruc)
LOCAL nRow := GetProperty( cForm,cBrowse,"VALUE")
LOCAL cField,nPosi,xValue
FOR ii := 1 TO iMax
cField := aStruc[ ii ] [ DBS_NAME ]
nPosi := FIELDPOS( cField )
xValue := FIELDGET(nPosi)
SetProperty( cForm, cBrowse, "CELL", nRow, ii, xValue )
NEXT
RETURN
Code: Select all
STATIC PROCEDURE RefreshCurrent(cForm,cBrowse)
LOCAL hBrowse := GetControlHandle(cBrowse, cForm )
LOCAL nRecord := GetProperty( cForm, cBrowse, "VALUE" )
ListView_RedrawItems( hBrowse, nRecord, nRecord )
RETURN
have fun
Jimmy
Jimmy
Re: Row Refresh in a BROWSE
Hi Jimmy!
Your sample for BROWSE control is not correct.
"VALUE" property of BROWSE return record number in database, not row numer of BROWSE.
So, it can work only if your database is not indexed and you don't have deleted rows or you use SET DELETED OFF.
I don't know property which shows line number of browse.
Your sample for BROWSE control is not correct.
"VALUE" property of BROWSE return record number in database, not row numer of BROWSE.
So, it can work only if your database is not indexed and you don't have deleted rows or you use SET DELETED OFF.
I don't know property which shows line number of browse.
-
- Posts: 273
- Joined: Sat May 18, 2019 2:11 pm
- DBs Used: Visual FoxPro, FoxPro
- Location: United States of America
Re: Row Refresh in a BROWSE
Hi,
An interesting observation: In HMG-Extended when I execute
I detect zero REFRESH "flickering" in my BROWSE.
At this moment I am still using "Harbour MiniGUI Extended Edition 20.05 (Update 2)".
Nevertheless it would still be nice if there was a HMG "flickering" solution.
Regards,
Red2
An interesting observation: In HMG-Extended when I execute
Code: Select all
DoMethod( "DataBrowse", "BrowseStates", "Refresh" )
At this moment I am still using "Harbour MiniGUI Extended Edition 20.05 (Update 2)".
Nevertheless it would still be nice if there was a HMG "flickering" solution.
Regards,
Red2
Re: Row Refresh in a BROWSE
Mol, I use for grid line number
formname.gridname.recno for grid record
formname.gridname.recno() for table record
not sure if it works for browse.
formname.gridname.recno for grid record
formname.gridname.recno() for table record
not sure if it works for browse.
All The Best,
Franco
Canada
Franco
Canada