FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour TXBrowse: error al hacer clic en el 煤ltimo registro.
Posts: 28
Joined: Sun Jan 08, 2012 06:17 PM
TXBrowse: error al hacer clic en el 煤ltimo registro.
Posted: Tue Mar 05, 2013 12:40 PM

Amigos, tengo un problema en el uso de TXBrowse. Puedo insertar una tabla con 2 columnas (c贸digo y descripci贸n) la TXBrowse me muestra todos los datos, pero el 煤ltimo registro, cuando trato de hacer clic en 茅l, se cambia la informaci贸n de resgistro anteriormente. A continuaci贸n se presenta el c贸digo:
local CbRWTELA
cmd:="SELECT * FROM CADFAB_GESTAO ORDER by CODIGO LIMIT 20"
if (select("fabricante")= 0)
use sql (cmd) new shared alias fabricante
fabricante->(dbgotop())
endif

dbselectarea('fabricante') //SETA O ARQUIVO
define dialog frmtelacad resource ("TELACAD") of frmcadproduto color nRgb(0,0,0),RGB(102,153,255) Font Afont[16]
redefine say oSayPesTelaCad id 4004; oSayPesTelaCad:ltransparent:=.t.

CbRWTELA := TXBrowse():New(frmtelacad)
CbRWTELA:CreateFromResource( 4001 )
CbRWTELA:nMarqueeStyle := MARQSTYLE_HIGHLROW //MARQSTYLE_HIGHLCELL
CbRWTELA:bClrSelFocus := {|| { CLR_WHITE, nRGB( 000, 100, 255 ) } }
CbRWTELA:nHeaderLines := 1
CbRWTELA:nColDividerStyle := 1 //LINESTYLE_BLACK
CbRWTELA:nRowDividerStyle := 1 //LINESTYLE_BLACK
CbRWTELA:lAllowColSwapping := .T.
CbRWTELA:lAllowRowSizing := .T.
CbRWTELA:lHScroll := .T.
CbRWTELA:lColDividerComplete := .t.
CbRWTELA:lRecordSelector := .f.
//CbRWTELA:bClrSel:= {CLR_RED,CLR_BLACK}
CbRWTELA:SetRDD(.F.)
CbRWTELA:cAlias := ("fabricante")
CbRWTELA:l2007 = .T.
CbRWTELA:lFooter := .f.
//CbRWTELA:bKeyDown :={|nKey| iif(nKey=13,(lnew:='2',novoproduto()),nil)}
oCol:= CbRWTELA:AddCol()
oCol:bStrData := { || fabricante->codigo }
oCol:cHeader := 'C贸digo'
oCol:nWidth := 110
oCol:= CbRWTELA:AddCol()
oCol:bStrData := { || fabricante->Descricao }
oCol:cHeader := 'Raz茫o Social'
oCol:nWidth := 435
for nFor := 1 to 2
CbRWTELA:aCols[ nFor ]:blDClickData := {|r,c,f,o| (odbf:Fabric:=fabricante->codigo,mDescFabric:=fabricante->descricao, oCodFab:refresh(), oSayTextFabric:refresh(), oCodForn:setfocus(),oCodForn:refresh(), frmtelacad:end()) }
next
CbRWTELA:refresh()
CbRWTELA:gotop()
CbRWTELA:refresh()

activate dialog frmtelacad

!Gracias

Germano Solter

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TXBrowse: error al hacer clic en el 煤ltimo registro.
Posted: Tue Mar 05, 2013 04:18 PM

SQLRDD is not fully compatible with XBrowse. Still we shall try to help.
Please indicate the version of FWH you are using.

Regards



G. N. Rao.

Hyderabad, India
Posts: 28
Joined: Sun Jan 08, 2012 06:17 PM
Re: TXBrowse: error al hacer clic en el 煤ltimo registro.
Posted: Mon Mar 11, 2013 12:36 PM
nageswaragunupudi wrote:SQLRDD is not fully compatible with XBrowse. Still we shall try to help.
Please indicate the version of FWH you are using.



Version: FWH/FWHX 11.12 29/December/2011
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TXBrowse: error al hacer clic en el 煤ltimo registro.
Posted: Mon Mar 11, 2013 02:21 PM
Please try adding this line towards the end:
Code (fw): Select all Collapse
CbRWTELA:bKeyCount := { (CbRWTELA:cAlias)->(OrdKeyCount()) }

Please also remove these lines
Code (fw): Select all Collapse
CbRWTELA:refresh()
CbRWTELA:gotop()
CbRWTELA:refresh()

I am not sure, but let us know if this works.
Regards



G. N. Rao.

Hyderabad, India
Posts: 28
Joined: Sun Jan 08, 2012 06:17 PM
Re: TXBrowse: error al hacer clic en el 煤ltimo registro.
Posted: Mon Mar 11, 2013 05:10 PM
nageswaragunupudi wrote:Please try adding this line towards the end:
Code (fw): Select all Collapse
CbRWTELA:bKeyCount := { (CbRWTELA:cAlias)->(OrdKeyCount()) }

Please also remove these lines
Code (fw): Select all Collapse
CbRWTELA:refresh()
CbRWTELA:gotop()
CbRWTELA:refresh()

I am not sure, but let us know if this works.


ver el error: cuando hago clic en el 煤ltimo registro se cambia a la pen煤ltima. esto s贸lo ocurre si hace clic con el rat贸n. si el teclado vai normal.

http://imageshack.us/clip/my-videos/51/6l3yijtufdmswwkkzlxzlx.mp4/
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TXBrowse: error al hacer clic en el 煤ltimo registro.
Posted: Mon Mar 11, 2013 06:17 PM

Thanks. I see it.

Please see this posting in the English forums:

viewtopic.php?f=3t=24327p=141279#p141279

Please use this derived TQBrowse class and let me have your feedback.
I have tested myself and is working well.
Please feel free to ask for any support.

&&

Regards



G. N. Rao.

Hyderabad, India
Posts: 28
Joined: Sun Jan 08, 2012 06:17 PM
Re: TXBrowse: error al hacer clic en el 煤ltimo registro.
Posted: Tue Mar 12, 2013 01:56 PM
nageswaragunupudi wrote:Please try adding this line towards the end:
Code (fw): Select all Collapse
CbRWTELA:bKeyCount := { (CbRWTELA:cAlias)->(OrdKeyCount()) }

Please also remove these lines
Code (fw): Select all Collapse
CbRWTELA:refresh()
CbRWTELA:gotop()
CbRWTELA:refresh()

I am not sure, but let us know if this works.


cuando trato de abrir el TXBrowse aparece este error:

Continue the discussion