Author | Topic: TBrowse :gobottom() prior to :stabilize() | |
---|---|---|
Rodd Graham | TBrowse :gobottom() prior to :stabilize() on Mon, 12 Sep 2005 12:54:07 -0500 Using Tbrowse in a VIO app, I want to position on the bottom database record and the highlight the bottom row of the browse. This is a historical chronological browse where we want to see time ascending as you go down the screen and we want to start viewing the most recent rows In Clipper I used to issue a :goBottom() and set the :RowPos to the :RowCount prior to the start of the :Stabilize loop. In Xbase++, the Tbrowse does not calculate the number of rows consumed by the headings/footings and skips back too far in the database. I have tried :configure() after the :goBottom() and before the :Stabilize() loop without success. I would really like to set record/row position before the stabilize loop as the loop is embedded in library logic. Anyone experienced this? Any solutions or workarounds? Rodd | |
Pascal Boivin | Re: TBrowse :gobottom() prior to :stabilize() on Fri, 16 Sep 2005 13:27:53 -0400 In my derived XbpQuickBrowse:Create, if the current order is a date I do this: GOTO BOTTOM SKIP -5 ::GotoRecord(RecNo()) So when the browse is open, I see the last 5 records. Just a GOTO BOTTOM is not enough because the browse will only show the last record with a lot of empty lines. Maybe something similar can be done with a TBrowse. | |
Rodd Graham | Re: TBrowse :gobottom() prior to :stabilize() on Fri, 16 Sep 2005 14:05:24 -0500 Actually, it was the :gobottom() method of the Tbrowse. What I want is for the Tbrowse to have the last line highlighted with the last row of data within the scope selected when it first starts up. I am going to workaround by issuing the :gobottom() after an initial stabilize all wrapped in a dispbegin()/dispend() to avoid the screen paint of the wrong rows. Rodd "Pascal Boivin" <pboivin@nbautomation.com> wrote in message news:NBTM23D5F697@nbautomation.mailtraq... > In my derived XbpQuickBrowse:Create, if the current order is a date I do > this: > GOTO BOTTOM > SKIP -5 > ::GotoRecord(RecNo()) > > So when the browse is open, I see the last 5 records. Just a GOTO BOTTOM > is not enough because the browse will only show the last record with a lot > of empty lines. Maybe something similar can be done with a TBrowse. > | |
Pascal Boivin | Re: TBrowse :gobottom() prior to :stabilize() on Fri, 16 Sep 2005 16:27:51 -0400 I don't use TBrowse, so I was guessing! With XbpQuickBrowse, the first visible line is the active record before the browse is created. "Rodd Graham" <rodd@tpmco.com> a crit dans le message de news: bZq3mIvuFHA.6160@S15147418... > Actually, it was the :gobottom() method of the Tbrowse. What I want is > for the Tbrowse to have the last line highlighted with the last row of > data within the scope selected when it first starts up. > > I am going to workaround by issuing the :gobottom() after an initial > stabilize all wrapped in a dispbegin()/dispend() to avoid the screen paint > of the wrong rows. Just like the XbpQuickBrowse! I forgot a few lines in my previous post: METHOD MyBrowse:Create(...) IF ... sort by date ... GOTO BOTTOM SKIP -5 ::XbpQuickBrowse():Create(...) //Create the browse with the last 5 records visible ::cursorMode := XBPBRW_CURSOR_NONE ::GotoRecord(RecNo()) //Just to be sure ::Show() //Show the browse, else ForceStable won't do nothing ::ForceStable() //Fill the display :GotoBottom() //Place the cursor on the last record ::CursorMode := XBPBRW_CURSOR_CELL //and show the cursor ELSE .... ENDIF RETURN SELF It's the same logic. |