FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Xbrowse - Ultima fila visible no permite click
Posts: 592
Joined: Tue Mar 14, 2006 11:34 PM
Xbrowse - Ultima fila visible no permite click
Posted: Thu Jul 15, 2010 05:37 PM
Antonio/Daniel,

Cosa rara y curiosa, en algunos xbrowse no me permite ni seleccionar ni doble click a la ultima linea visible de datos, no lo hace con todos.

Asi es como tengo definidos mis browses :
Code (fw): Select all Collapse
redefine xbrowse lbCapVta id 101 of oFldrCptSrc:adialogs[1] ;
    columns 9,3,4,5,6,7,8 ;
    headers "NUM. PARTE","UNITARIO","UNS","D %","D $","UNITARIO","IMPORTE" ;
    pictures nil,"99,999.99","9,999.99","99.99","999.99","99,999.99","99,999.99" ;
    colsizes 100,80,50,50,60,80,90 ;
    array { { "","",0,0,0,0,0,0,"",0,0,0,0,"",0,"","","","",0,0,0 } } ;
    font aSysFnts[1]

AdjRStXBrws( lbCapVta, .f., {0,1,1,1,1,1,1} )
lbCapVta:nStretchCol   := 1
lbCapVta:lFastEdit     := .t.
lbCapVta:lKineticBrw   := .f.


Voy checar que diferencia pueda tener entre ellos, pero de entrada lo que mas me afecta es el no poder dar doble click.


Saludos
FWH 10.6 + xHarbour + Borland 582
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xbrowse - Ultima fila visible no permite click
Posted: Fri Jul 16, 2010 01:58 AM

Can you please post a sample code that can be compiled and tested?

Regards



G. N. Rao.

Hyderabad, India
Posts: 592
Joined: Tue Mar 14, 2006 11:34 PM
Re: Xbrowse - Ultima fila visible no permite click
Posted: Fri Jul 16, 2010 02:34 AM

Mr. Rao

Posting code and rc ain't a problem.

But I have no idea on getting the data, because I get it from several tables using some query.

I'll try to fill up the array using another source ( for .. next ) or something to see what happends.

I will let you know the results asap !

Best Regards

FWH 10.6 + xHarbour + Borland 582
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xbrowse - Ultima fila visible no permite click
Posted: Fri Jul 16, 2010 05:15 AM
Please insert this line after REDEFINING xbrowse
Code (fw): Select all Collapse
   AEval( lbCapVta:aCols, { |o| o:nEditType := EDIT_GET } )
Regards



G. N. Rao.

Hyderabad, India
Posts: 592
Joined: Tue Mar 14, 2006 11:34 PM
Re: Xbrowse - Ultima fila visible no permite click
Posted: Fri Jul 16, 2010 03:47 PM
Mr. Rao

My mistake, I did't paste last time these lines from my Xbrowse :
Code (fw): Select all Collapse
// Unidades
lbCapVta:aCols[3]:bEditValid := { | oGet, oCol | VldCaptVta( oGet, oCol, 1 ) }
lbCapVta:aCols[3]:nEditType  := EDIT_GET
lbCapVta:aCols[3]:bEditWhen  := { || !empty( lbCapVta:aRow[9] ) }
// Descto %
lbCapVta:aCols[4]:bEditValid := { | oGet, oCol | VldCaptVta( oGet, oCol, 2 ) }
lbCapVta:aCols[4]:nEditType  := EDIT_GET
lbCapVta:aCols[4]:bEditWhen  := { || !empty( lbCapVta:aRow[9] ) .and. ;
    lbCapVta:aRow[22] == 0 .and. lbCapVta:aRow[3] > 0 }


However, I was doing some tests by filling the xbrowse's data using code and the results are the same.
Code (fw): Select all Collapse
redefine xbrowse lbItmRsl id 115 of oFldDRet:adialogs[1] ;
    columns 2,3,4 ;
    headers 'NUM. PARTE','DESCRIPCION','REFERENCIAS' ;
    colsizes 120,400,500 ;
    on change ShwItmRsDts(0) ;
    on dblclick SetItm2Vta(0) ;
    array { {"","","","",0,0,0} } ;
    font aSysFnts[1]

AdjRStXBrws( lbItmRsl, .f., {0,0,0} )
lbItmRsl:nStretchCol := 2
lbItmRsl:bKeyDown    := { | nKey | RslItmKey( nKey ) }

PPFLDRSLTS DIALOG 156, 130, 430, 290
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "TAHOMA"
{
 GROUPBOX " Items del Sistema ", 501, 7, 4, 413, 200, BS_GROUPBOX | WS_DISABLED
 GROUPBOX " Equivalentes ", 502, 7, 208, 413, 75, BS_GROUPBOX | WS_DISABLED
 CONTROL " Mostrar Todos", 108, "BUTTON", BS_AUTORADIOBUTTON, 15, 186, 75, 9
 CONTROL " Solo con Existencia", 109, "BUTTON", BS_AUTORADIOBUTTON, 15, 194, 75, 9
 RTEXT "Ordenar Por :", -1, 283, 190, 45, 8
 COMBOBOX 110, 332, 188, 80, 50, CBS_DROPDOWNLIST | WS_TABSTOP
 CONTROL "", 130, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 15, 217, 396, 59
 CONTROL "", 115, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL, 15, 14, 396, 170
}

static function ChecarDts()
local nQ, aDtsDmy, aDts2Shw := {}

for nQ := 1 to 25
    aDtsDmy := {"idx","Num. Parte","Descripcion","Referencia",0,0,0}
    aDtsDmy[2] += str(nQ,4)
    aDtsDmy[3] += str(nQ,4)
    aDtsDmy[4] += str(nQ,4)
    aadd( aDts2Shw, aDtsDmy )
next

lbItmRsl:setarray( aDts2Shw )
lbItmRsl:ReFresh()

return nil
*-----*




But still I just can't click over the last line in the browse.

Regards
FWH 10.6 + xHarbour + Borland 582

Continue the discussion