Page 1 of 1

DCBROWSE AND GOTOP PROBLEM

Posted: Sun Oct 17, 2021 3:10 pm
by digitsoft
DCBROWSE AND GOTOP PROBLEM

hello Roger
How can I remove the GoTop when using RefreshAll () in dcbrowse

Re: DCBROWSE AND GOTOP PROBLEM

Posted: Mon Oct 18, 2021 12:23 am
by Tom
Hey, Nolberto.

There is no implicite DbGotop() when calling RefreshAll().

Re: DCBROWSE AND GOTOP PROBLEM

Posted: Mon Oct 18, 2021 5:14 am
by digitsoft
Hello Tom
and because every time I use RefreshAll () the position of the DCBrowse goes to the first line and then it is positioned in the last line which is where I want it to be

Re: DCBROWSE AND GOTOP PROBLEM

Posted: Mon Oct 18, 2021 7:03 am
by rdonnay
oBrowse:refreshAll()
oBrowse:goBottom()
oBrowse:pageUp()
oBrowse:forceStable()

Re: DCBROWSE AND GOTOP PROBLEM

Posted: Mon Oct 18, 2021 8:14 am
by digitsoft
Thanks
Roger

Re: DCBROWSE AND GOTOP PROBLEM

Posted: Fri Oct 22, 2021 12:47 am
by skiman
Hi,

I have a similar problem when ADDING with the insert key in an array browse.
When the insert is started, the browse add a line on the last line on the active row. The above lines are moving up one line.
I would like to show the new line below the existing lines, but I don't succeed.

Code: Select all

 @ 5,1 DCBROWSE oBrowse DATA aDetail SIZE 73,17 FIT  ;
	EDIT xbeBRW_ItemSelected MODE DCGUI_BROWSE_EDITEXIT ;
        INSERT xbeK_ALT_INS EXIT {|o| o:gobottom(),o:forceStable()} INSMODE DCGUI_BROWSE_SUBMODE_2 ;
        APPEND xbeK_INS  ;
        ITEMSELECTED { |uNil0,uNil1,oBrowse| fChkBox(oBrowse,aApp) } ;
	COLOR {|o| zebra(o)}
With the above code, the browse shows all the rows at the moment the user left the cell editing of the first column.
The problem is that a user thinks that the previous row is lost. He added one row, hits the INSERT key, and the previous row disappears, a cell edit on the first row appears.
When he hit ENTER the two rows are visible.

Re: DCBROWSE AND GOTOP PROBLEM

Posted: Fri Oct 22, 2021 1:33 am
by skiman
Hi,

Meanwhile I solved it with a hotkey.

Code: Select all

DCHOTKEY xbeK_INS  ;
	ACTION {|o| aadd(aDetail,{space(15),space(20),0,.F.,cEmptyRef,"",0} ),;
	oBrowse:firstcol(), oBrowse:refreshAll() ,oBrowse:goBottom() , PostAppEvent(xbeP_Keyboard,xbeK_ENTER,,oBrowse)} PARENT oBrowse
This does what I want.