FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveLinux / FiveDroid (Android) Function of Vertical ScrollBar of Browse object
Posts: 464
Joined: Tue May 16, 2006 07:47 AM
Function of Vertical ScrollBar of Browse object
Posted: Fri Aug 03, 2007 07:00 AM

The vertical scroll bar of the Browse object in my code and in testbrow.prg doesn't behave as I think it should in that you can drag the slider? bit up and down and nothing happens except if you go right to the bottom you disable the down arrow and the up arrow if you go right to the top. You can still move around OK with mouse clicks on rows and on the up and down arrows (provided the slider isn't right at the top or the bottom) and any of these seems to update the slider accordingly, but the slider doesn't update the browse. It's not really a major issue but some end users are a bit fussy.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Function of Vertical ScrollBar of Browse object
Posted: Fri Aug 03, 2007 11:44 AM

Doug,

We email you new FiveLinux libraries with the right thumb behavior :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 464
Joined: Tue May 16, 2006 07:47 AM
Thanks yet again - And some advice needed please
Posted: Fri Aug 03, 2007 12:42 PM

Thanks Antonio

What is the best way of determining which row of a browse the user has selected. oBrw:nRowPos gives which visible row (as per your documentation) but to process selection we need to know which overall row. Do we need to do that by supplying appropriate skip blocks updating a known variable or is there some easier way?

Thanks

Doug (xProgrammer)

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Function of Vertical ScrollBar of Browse object
Posted: Fri Aug 03, 2007 01:20 PM

Doug,

RecNo()

is that what you mean ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 464
Joined: Tue May 16, 2006 07:47 AM
Thanks
Posted: Sat Aug 04, 2007 01:46 AM

In FiveWin I used oBrw:GetPos() as an index into an array which worked for browsing arrays. I hadn't worked out that the record pointer for a file browse was positioned at the highlighted record. Now I know.

Onto browsing arrays.

Thanks.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Function of Vertical ScrollBar of Browse object
Posted: Sat Aug 04, 2007 06:46 AM

Doug,

Or OrdKeyNo() if you are using an index

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Function of Vertical ScrollBar of Browse object
Posted: Sat Aug 04, 2007 06:58 AM
Doug,

If it is a single dimensioned array then you can use a standard listbox instead of a browse. Here you have a sample for the Clipper classic AChoice():
// Using ListBoxes to perform simple selections
#include "FiveLinux.ch"

//----------------------------------------------------------------//

function Main()

   MsgInfo( MsgSelect( { "one", "two", "three" }, "two" ) )

return nil

//----------------------------------------------------------------//

function MsgSelect( aItems, cValue, cTitle )

   local oDlg

   DEFAULT cTitle := "Please, select"

   DEFINE DIALOG oDlg TITLE cTitle SIZE 220, 150

   @  1, 2 LISTBOX cValue ITEMS aItems SIZE 180, 95 OF oDlg

   @ 12, 2 BUTTON "_OK" OF oDlg SIZE 80, 25 ;
       ACTION oDlg:End()

   @ 12, 12 BUTTON "_Cancel" OF oDlg SIZE 80, 25 ;
       ACTION ( cValue := nil, oDlg:End() )

   ACTIVATE DIALOG oDlg CENTERED

return cValue

//----------------------------------------------------------------//

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 464
Joined: Tue May 16, 2006 07:47 AM
Getting There!
Posted: Sun Aug 05, 2007 02:17 AM

Thanks Antonio

Then I can use oLB:nAt - and I can use LISTBOX frequently by combining what would have been separate columns into a single dimension array, for example

LINARES, Antonio

rather than 2 columns.

I can browse arrays fine by writing appropriate code blocks but it appears that if you have more than 1 browse on a window then the vertical scroller only works for the first one.

That shouldn't be a big problem as if I use LISTBOXes wherever posible I will probably only need one BROSE on any dialog.

I note that LISTBOX seems to defaults to item 1 selected but doesn't show that on the screen. I can change the default setting with

oLB:Change(5)

but that isn't shown either.

How can I get it to paint with default selection shown?

Ideally I would like a LISTBOX that initially returned 0 for oLB:nAT - ie no selection has been made.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Function of Vertical ScrollBar of Browse object
Posted: Sun Aug 05, 2007 06:06 PM

Doug,

> it appears that if you have more than 1 browse on a window then the vertical scroller only works for the first one.

Fixed. We send you new libs

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion