FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Tbrowse
Posts: 7
Joined: Fri Feb 01, 2013 08:06 AM
Tbrowse
Posted: Sun Feb 03, 2013 04:14 PM

Hi,

I want to use tbrowse, how to use it with fivewin?

Regards,
Julian

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Tbrowse
Posted: Sun Feb 03, 2013 05:23 PM
Julian,

FIveWin originally implemented a Class TWBrowse, that you can use this way:

Code (fw): Select all Collapse
   @ 1, 1 LISTBOX oLbx FIELDS Clientes->Nombre, AllTrim( Clientes->Direccion ),;
                              Clientes->Telefono,;
                              Str( Clientes->Edad, 3 ) ;
          HEADERS    "Name", "Address", "Phone", "Age" ;
          FIELDSIZES 222, 213, 58, 24 ;
          SIZE 284, 137 OF oDlg


the intention was to make it very fast (iy was designed to work efficiently with Clipper). Later on, as computers were gaining more power, we decided to implement more complex browses with more features and two more classes were implemented: TCBrowse and TXBrowse. Nowdays we do recommend to use Class TXBrowse as it is the most powerful browser for FiveWin. Here you have a working example of use:

Code (fw): Select all Collapse
// Using Windows 7 row selection colors in xbrowse

#include 'fivewin.ch'
#include 'xbrowse.ch'

function Main()

   local oDlg, oBrw, oFont

   USE CUSTOMER ALIAS CUST

   DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -14

   DEFINE DIALOG oDlg SIZE 640,440 PIXEL ;
      FONT oFont TITLE 'XBrowse Gradient Rows'

   @ 10, 10 XBROWSE oBrw OF oDlg SIZE 300, 200 PIXEL ;
      AUTOCOLS ALIAS 'CUST' NOBORDER

   oBrw:nMarqueeStyle    = MARQSTYLE_HIGHLWIN7
   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

   RELEASE FONT oFont

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Tbrowse
Posted: Sun Feb 03, 2013 05:32 PM
Julian,

You can implement a filter on a browse based on a current index in use:

Code (fw): Select all Collapse
#xcommand @ <nRow>, <nCol> [ COLUMN ] XBROWSE  <oBrw>  ;
               [ [ FIELDS ] <Flds,...>] ;
               [ SELECT <cField> FOR <uValue1> [ TO <uValue2> ] ] ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7
Joined: Fri Feb 01, 2013 08:06 AM
Re: Tbrowse
Posted: Tue Feb 05, 2013 03:56 PM

Hi Antonio,

Can I get a sample xbrowse with select command?

Regards,
Julian

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Tbrowse
Posted: Tue Feb 05, 2013 05:33 PM
Julian,

I was wrong. The SELECT ... clause is only available for TWBrowse (the initial FIveWin browse) and not for XBrowse.

If you just want to show some records from the DBF, you may use SET SCOPE TO ... or SET FILTER on a non indexed DBF.

SET SCOPE docs:
http://www.ousob.com/ng/53guide/ngeffb2.php

SET FILTER docs:
http://www.ousob.com/ng/53guide/nge78b0.php
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7
Joined: Fri Feb 01, 2013 08:06 AM
Re: Tbrowse
Posted: Wed Feb 06, 2013 09:47 AM

Hi Antonio,

Could you share xbrowse documentation? I search in fivewin help but not found.

Regards,
Julian

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Tbrowse
Posted: Wed Feb 06, 2013 02:03 PM

Julian

There is a wealth of information contained in the \samples folder .. some good xBrowse examples are :

any sample that starts with "xb"

TestXbrw.prg
TestXbr3.prg

You can compile any of the above using Build.bat ( harbour ) or BuildX.bat ( xharbour ) from the command prompt .. all found in the \samples folder.

Rick Lipkin

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Tbrowse
Posted: Wed Feb 06, 2013 03:22 PM
Julian,

FiveWin's XBrowse online docs are available from:

http://wiki.fivetechsoft.com/doku.php?id=fivewin_class_txbrowse
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion