FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour xBrowse 3 reg por pagina
Posts: 139
Joined: Fri Nov 25, 2005 04:38 PM
xBrowse 3 reg por pagina
Posted: Thu Apr 28, 2011 05:40 PM

Yo pondría en xBrowse para mostrar tres registros por página. ¿es posible?

Por supuesto, cuando se le informó que el xBrowse deberá demostrar que la altura de las células

ronaldo

Ronaldo Minacapelli
Sistemas, Hospedagem e Criação de WebSites
http://www.bazevani.com.br
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse 3 reg por pagina
Posted: Thu Apr 28, 2011 09:55 PM

Yes.
Please set oBrw:nRowHeight equal to 1/3 or the height of browse defined by you.

Regards



G. N. Rao.

Hyderabad, India
Posts: 139
Joined: Fri Nov 25, 2005 04:38 PM
Re: xBrowse 3 reg por pagina
Posted: Fri Apr 29, 2011 06:08 PM

but I need to properly adjust the xbrowse 3 lines at the right height

Ronaldo Minacapelli
Sistemas, Hospedagem e Criação de WebSites
http://www.bazevani.com.br
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse 3 reg por pagina
Posted: Sat Apr 30, 2011 01:52 AM
Please try the logic in this sample:
Code (fw): Select all Collapse
#include "FiveWin.Ch"
#include "ord.ch"
#include "xbrowse.ch"
#include "hbcompat.ch"

REQUEST DBFCDX

#xtranslate <x> [is] between <a> and <b>  => ( <x> >= <a> .and. <x> <= <b> )
#xtranslate <x> [is] not between <a> and <b> => !( <x> between <a> and <b> )
//----------------------------------------------------------------------------//

function Main()

   local oDlg, oBrw

   USE CUSTOMER NEW VIA 'DBFCDX'
   DEFINE DIALOG oDlg SIZE 500,500 PIXEL
   @ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
      AUTOCOLS ALIAS "CUSTOMER" FOOTERS CELL LINES NOBORDER
   oBrw:CreateFromCode()
   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT SetBrwSize( oBrw )

   CLOSE CUSTOMER

return nil

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

static function SetBrwSize( oBrw )

   local oDlg     := oBrw:oWnd
   local aRect    := oBrw:DataRect()
   local nHeight  := aRect[ 3 ] - aRect[ 1 ] + 1
   local nAdjust
   local lFixedRowHeight := .t.   // try with .t. or .f.

   if lFixedRowHeight
      oBrw:nRowHeight:= 40
   else
      oBrw:nRowHeight := Int( nHeight / 3 )
   endif

   nAdjust        := ( oBrw:nRowHeight * 3 - nHeight + 2 )
   oBrw:nHeight   += nAdjust
   oDlg:nHeight   += nAdjust
   oBrw:SetFocus()

return .f.

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


Result with lFixedRowHeight := .t.


With lFixedRowHeight := .f.
Regards



G. N. Rao.

Hyderabad, India
Posts: 139
Joined: Fri Nov 25, 2005 04:38 PM
Re: xBrowse 3 reg por pagina
Posted: Mon May 02, 2011 10:04 PM

Gracias

Ronaldo Minacapelli
Sistemas, Hospedagem e Criação de WebSites
http://www.bazevani.com.br

Continue the discussion