xBrowse blcklicked

xBrowse blcklicked

Postby nebojsa » Mon May 13, 2013 1:24 pm

Hi,

I have a problem...I run xBrowsw, open my database table from MySql ... and my search has 50 lines. The first thing you see are rows 1 to 30 and when I click the left mouse for example 30 row, all move to the top so I was the first to see the 30 row and 31,32,33 ... How do you like that does not happen? So, I want that when I click the left mouse to mark a row and nothing more ...

Thanks a lot
nebojsa
 
Posts: 6
Joined: Mon May 13, 2013 10:03 am

Re: xBrowse blcklicked

Postby FranciscoA » Mon May 13, 2013 2:43 pm

Hi nebojsa, I see it's your first post. Welcome to FiveTech's forums support.

I have some mysql-fwh software and I have not noticed that behavior. You may be able to post your code for help you?
Regards.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: xBrowse blcklicked

Postby nebojsa » Mon May 13, 2013 3:39 pm

REDEFINE xBrowse oBrw ID 101 OF oDlgBrows ALIAS 'Trz'

oBrw:nFreeze := 2
oBrw:nRowDividerStyle = LINESTYLE_NOLINES
oBrw:nColDividerStyle := 2
oBrw:nMarqueeStyle := 4

oCol := oBrw:AddCol()
oCol:bStrData := { || str(RB)}
oCol:cHeader := "RB"
oCol:nDataStrAlign := AL_CENTER
oCol:nHeadStrAlign := AL_CENTER

oCol := oBrw:AddCol()
oCol:bStrData := { || TRZ->POZICIJA}
oCol:cHeader := "POZICIJA"
oCol:nHeadStrAlign := AL_CENTER

oCol := oBrw:AddCol()
oCol:bStrData := { || TRZ->REFERENT}
oCol:cHeader := "REF."
oCol:nDataStrAlign := AL_CENTER
oCol:nWidth :=30

oCol := oBrw:AddCol()
oCol:bStrData := { || dtoc(DATUM)}
oCol:cHeader := "DATUM"
oCol:nDataStrAlign := AL_CENTER
oCol:nHeadStrAlign := AL_CENTER

oCol := oBrw:AddCol()
oCol:bStrData := { || TRZ->UVOZNIK}
oCol:cHeader := "UVOZNIK"
oCol:nWidth :=120
oCol:nHeadStrAlign := AL_CENTER

oCol := oBrw:AddCol()
oCol:bStrData := { || TRZ->PROIZVODJ}
oCol:cHeader := "PROIZVOĐAČ"
oCol:nWidth :=200
oCol:nHeadStrAlign := AL_CENTER

oCol := oBrw:AddCol()
oCol:bStrData := { || TRZ->MESTO5}
oCol:cHeader := "MESTO"
oCol:nDataStrAlign := AL_CENTER
oCol:nWidth :=100
oCol:nHeadStrAlign := AL_CENTER

oCol := oBrw:AddCol()
oCol:bStrData := { || TRZ->NAZPROIZ1}
oCol:cHeader := "NAZIV PROIZVODA"
oCol:nWidth :=350


oBrw:nStretchCol := STRETCHCOL_WIDEST
* oBrw:bLClicked = { | | TraPre(TRZ->RB) }
* oBrw:CreateFromCode()
oFont:End()

oBrw:bLDblClick = { | nRow, nCol | TraPre(TRZ->RB),oDlgBrows:End() }
oBrw:bKeyChar = { | nKey, nFlags | if( nKey==VK_RETURN,(TraPre(TRZ->RB),oDlgBrows:End()),NIL) }
nebojsa
 
Posts: 6
Joined: Mon May 13, 2013 10:03 am

Re: xBrowse blcklicked

Postby nebojsa » Mon May 13, 2013 3:49 pm

When I click some row in middle, that row go to top, but I want only mark that row...
I want send you a picture to see you how that work but I dont now how...
nebojsa
 
Posts: 6
Joined: Mon May 13, 2013 10:03 am

Re: xBrowse blcklicked

Postby FranciscoA » Mon May 13, 2013 11:47 pm

I see no problem in your code. Maybe you want to display the code of the function TraPre ()?
Meanwhile, I leave these parts of code I use. I hope you serve as an example.

oLbx := TXBrowse():New( oDlg )

oLbx:SetMySql(oCatalogo,.f.)

oCol = oLbx:AddCol()
oCol:bEditValue = { || oCatalogo:Codicont }
oCol:cHeader = "Codigo Contable"
oCol:nWidth = 164

oCol = oLbx:AddCol()
oCol:bEditValue = { || oCatalogo:Nombre }
oCol:nDataStrAlign := 3
oCol:cHeader = "Nombre de la Cuenta"
oCol:nWidth = 350

oLbx:CreateFromResource(181)

oLbx:bLDblClick:={|| if(lGrabacion, (cCodic:=oCatalogo:Codicont, if(oCatalogo:nv="S",oDlg:End(),(cCodic:="",MsgStop("Codigo incompleto","Alto")) )),) }

ACTIVATE DIALOG oDlg CENTERED

oCatalogo:End()
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: xBrowse blcklicked

Postby nebojsa » Tue May 14, 2013 1:58 pm

It's nothing help...I tried to run the DBF database and so we work normally ... but when I run the SQL database is not working properly ... I do not know why!

function TraPre(cmm)

DBSelectArea("Trz")
OrdSetFocus("TRZISNO")

oNazPar :Refresh()

if mRat>0

mTxt2=""
mTxt3=""
oTxt3 :refresh()
oTxt4 :refresh()
endif

iNovi=.f.

mRB =Trz->RB
mPoz =Trz->POZICIJA
mRadJed_Id =Trz->RADJED
mRef_Id =Trz->REFERENT
mDat =Trz->DATUM
mJCI =Trz->JCI
mbr =Trz->BR
mPrelaz =Trz->PRELAZ
mNazProiz1 =Trz->NAZPROIZ1
mNazProiz2 =Trz->NAZPROIZ2
mBtto =Trz->BRUTO
mNeto =Trz->NETO
mBrOmo =Trz->BROMOTA
mPakovanje =Trz->PAKOVANJE
mPartner_Id =Trz->Partner_Id
*mNazPar =Trz->UVOZNIK
mKORISNIK =Trz->KORISNIK
mKorAdresa =Trz->ADRESA7
mKorMesto =Trz->MESTO7
mKorTelefon =Trz->TELEFON7
mKorMaticni =Trz->MATICNI7
mKorPIB =Trz->PIB7
mPROIZVODJAC =Trz->PROIZVODJ
mProMesto =Trz->MESTO5
mProDrzava =Trz->DRZAVA5
mDOBAVLJAC =Trz->INODOBAVLJ
mDobMesto =Trz->MESTO6
mDobDrzava =Trz->DRZAVA6
mStanica =Trz->STANICA
mPoreklo =Trz->POREKLO
mUtovarGrad =Trz->MESTUTOGRA
mUtovarDrzava =Trz->MESTUTODRZ
mIzvoznica =Trz->IZVOZNICA
mPrevozVrsta =Trz->VRSTA
mPrevozBroj =Trz->BROJ
mSmestajNaziv =Trz->SMESTAJ
mSmestajAdresa =Trz->ADRESA13
mSmestajGrad =Trz->MESTO13
mSmestajTelefon =Trz->TELEFON13
mVrednost =Trz->VREDNOST
mValuta =Trz->VALUTA
mRat =Trz->RAT
mGotovinski =Trz->GOTOVIN
mTxt2 =space(20)

if mRat>0

* MsgInfo("POSTOJE TAKSE !!!")
mTxt2="TAKSIRANO!!!"
mTxt3="Ako radite NOVI predmet kliknite na KOPIRAJ!!!"
oTxt3 :refresh()
oTxt4 :refresh()
endif

if mGotovinski>0

* MsgInfo("POSTOJE TAKSE !!!")
mTxt2="TAKSIRANO!!!"
mTxt3="Ako radite NOVI predmet kliknite na KOPIRAJ!!!"
oTxt3 :refresh()
oTxt4 :refresh()
endif

mRef_Id =space(3)
mNazRef =space(40)
mNazJed =space(30)
mNazPar =space(30)

oRB :refresh()
oPoz :refresh()
oRef_Id :refresh()
oRadJed_Id :refresh()
oDat :refresh()
oSifCar :refresh()
oBroj :refresh()
oCIULAZ :refresh()
oNazPos1 :refresh()
oNazPos2 :refresh()
oBtto :refresh()
oNeto :refresh()
oBrOmo :refresh()
oPakovanje :refresh()
oPartner_Id :refresh()
oNazPar :refresh()
oKORISNIK :refresh()
oKorAdresa :refresh()
oKorMesto :refresh()
oKorTelefon :refresh()
oKorMaticni :refresh()
oKorPIB :refresh()
oPROIZVODJAC :refresh()
oProMesto :refresh()
oProDrzava :refresh()
oDOBAVLJAC :refresh()
oDobMesto :refresh()
oDobDrzava :refresh()
oStanica :refresh()
oPoreklo :refresh()
oUtovarGrad :refresh()
oUtovarDrzava :refresh()
oIzvoznica :refresh()
oPrevozVrsta :refresh()
oPrevozBroj :refresh()
oSmestajNaziv :refresh()
oSmestajAdresa :refresh()
oSmestajGrad :refresh()
oSmestajTelefon :refresh()
oVrednost :refresh()
oValuta :refresh()
oRat :refresh()
oGotovinski :refresh()
oRef_Id :refresh()
oNazRef :refresh()
oRadJed_Id :refresh()
oNazJed :refresh()
oTxt3 :refresh()

oPoz:SetFocus()
return .t.
nebojsa
 
Posts: 6
Joined: Mon May 13, 2013 10:03 am

Re: xBrowse blcklicked

Postby nageswaragunupudi » Tue May 14, 2013 10:06 pm

Mr Nebojsa

Are you trying to use SQLRDD with xBrowse?
If so what is the version of FWH you are using?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse blcklicked

Postby nebojsa » Wed May 15, 2013 4:36 pm

Yes, I use SQLRDD but still dont work... FWH is 12.08
nebojsa
 
Posts: 6
Joined: Mon May 13, 2013 10:03 am

Re: xBrowse blcklicked

Postby nageswaragunupudi » Wed May 15, 2013 9:58 pm

XBrowse, by design, works with only such RDDs which support functions OrdKeyNo() and OrdKeyGoTo(x) also in addition to others.

Because SQLRDD does not support these two functions, (ordkeyno() returns 0 always) this RDD is not compatible with xBrowse. If xbrowse is used with SQLRDD, the behaviour is unpredictable.

But there are some users who are using xbrowse with sqlrdd in a limited way by tweaking xbrowse. You may search the forums for their postings.

TWBrowse and TCBrowse work with SQLRDD.

However, FWH is trying to provide limited support to SQLRDD from version 13.04 onwards.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 13 guests