Tbrowse

Tbrowse

Postby julian » Sun Feb 03, 2013 4:14 pm

Hi,

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

Regards,
Julian
julian
 
Posts: 7
Joined: Fri Feb 01, 2013 8:06 am

Re: Tbrowse

Postby Antonio Linares » Sun Feb 03, 2013 5:23 pm

Julian,

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

Code: Select all  Expand view
  @ 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: Select all  Expand view
// 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Tbrowse

Postby Antonio Linares » Sun Feb 03, 2013 5:32 pm

Julian,

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

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Tbrowse

Postby julian » Tue Feb 05, 2013 3:56 pm

Hi Antonio,

Can I get a sample xbrowse with select command?

Regards,
Julian
julian
 
Posts: 7
Joined: Fri Feb 01, 2013 8:06 am

Re: Tbrowse

Postby Antonio Linares » Tue Feb 05, 2013 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Tbrowse

Postby julian » Wed Feb 06, 2013 9:47 am

Hi Antonio,

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

Regards,
Julian
julian
 
Posts: 7
Joined: Fri Feb 01, 2013 8:06 am

Re: Tbrowse

Postby Rick Lipkin » Wed Feb 06, 2013 2: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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Tbrowse

Postby Antonio Linares » Wed Feb 06, 2013 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 116 guests