Page 1 of 1

FWH 7.12 xBrowse - 2007 style

Posted: Sat Dec 01, 2007 5:06 pm
by nageswaragunupudi
The new look of xBrowse is very attractive.

But there is no option for setting this 2007 style on / off. I have problems with 256 color monitors where it gives a very bad look, rendering it unacceptable for release versions.

I request that 2007 style be made optional.

Posted: Sun Dec 02, 2007 8:09 am
by Antonio Linares
Nageswararao,

We have just published a new FWH 7.12 build with the transparent bitmaps painting and optional 2007 look for XBrowse.

Please download it again, thanks

Posted: Sun Dec 02, 2007 2:18 pm
by Rollerskate
Antonio Linares wrote: Please download it again, thanks
Antonio

I've downloaded 7.12 version of FWH.
My application hang-up at CreateFromCode()
Program working at 50% of CPU but browser doesn't start

The same code work correctly on FWH 7.11.

I make few test of this browser, in my opinion problem exist if I use more then 2 DataLines.
example:
oBrw:nDataLines:=4
....
sCRLF:=Chr(13)+Chr(10)
....
oCol:bStrData :={|| 'A'+sCRLF+'B'+sCRLF+'C'+sCRLF+'D' }
....


Any suggestion?
Robert

Posted: Sun Dec 02, 2007 6:13 pm
by Antonio Linares
Robert,

Please try samples/TestXBrw.prg and check if it works ok for you.

Here it is working fine.

Have you downloaded and installed the new Harbour/xharbour build for FWH 7.12 ?

Posted: Sun Dec 02, 2007 6:24 pm
by Otto
Robert,
sure you have noticed that the setup for testxbrw is for ADS.

Regards,
Otto

Posted: Sun Dec 02, 2007 6:26 pm
by Robert Frank
Antonio Linares wrote:Have you downloaded and installed the new Harbour/xharbour build for FWH 7.12 ?
Of course, I've instaled all attached files.

The point is that this kind of deffinitions doesn't work:

oCol:= oBRWR:AddCol()
oCol:bStrData := {|| AllTrim(RR->OPERATOR)+sCRLF+DToC(RR->DATA)+sCRLF+RR->GODZINA }
oCol:cHeader := "Operator"+sCRLF+"Data"+sCRLF+"Godzina"
oCol:blDClickData := {|| R_EDYCJA('S') }

When I cut it to two lines (instead three in example) browser works correctly

R.

Posted: Sun Dec 02, 2007 7:03 pm
by Antonio Linares
Robert,

Are you using Harbour or xHarbour or xHB ?

Posted: Sun Dec 02, 2007 7:55 pm
by Robert Frank
Antonio Linares wrote:Are you using Harbour or xHarbour
xHarbour attached with 7.12 now.

Code:
oBRWR := TXBrowse():New( oWNDR )
oBRWR:nMarqueeStyle := MARQSTYLE_HIGHLROW //podkreslony wiersz
oBRWR:nColDividerStyle := LINESTYLE_DARKGRAY
oBRWR:nRowDividerStyle := LINESTYLE_DARKGRAY
oBRWR:lColDividerComplete := .t.
oBRWR:nHeaderLines := 3
oBRWR:nDataLines := 3
oBRWR:lFooter := .t.
oBRWR:nFreeze := 2
oBRWR:l2007 := .t.

ErrorSys()

oCol:= oBRWR:AddCol()
oCol:bStrData := {|| sCRLF+Str(RR->RECNO,8,0)+sCRLF }
oCol:cHeader := "L.p."
oCol:blDClickData := {|| R_EDYCJA('S') }

oCol:= oBRWR:AddCol()
oCol:bStrData := {|| sCRLF+Str(RR->BARCODE,8,0)+sCRLF }
oCol:cHeader := "Zlecenie"
oCol:blDClickData := {|| R_EDYCJA('S') }

oCol:= oBRWR:AddCol()

oCol:AddBmpFile("BMP\B_REJ_ON.BMP")
oCol:AddBmpFile("BMP\B_REJ_OF.BMP")
oCol:AddBmpFile("BMP\B_REJ_WI.BMP")
oCol:bBmpData := {|| IIF(RR->WFISK=0,IIF(RR->FFISK=0,2,3),1) }
oCol:bStrData := {|| IIF(RR->WFISK=0,IIF(RR->FFISK=0,'2','3'),'1') }
oCol:cHeader := "Druk"
oCol:blDClickData := {|| R_EDYCJA('S') }
oCol:nDataStrAlign := AL_CENTER

oCol:= oBRWR:AddCol()
oCol:bStrData := {|| AllTrim(OemToAnsi(RR->NAZW))+' '+AllTrim(OemToAnsi(RR->IMIE))+sCRLF+AllTrim(OemToAnsi(RR->MIASTO))+' '+AllTrim(OemToAnsi(RR->ADRES))+sCRLF+GET_xTABKON(RR->NR_K,7) }
oCol:cHeader := "Nazwisko i imie pacjenta"+sCRLF+"Adres"+sCRLF+"Zleceniodawca"
oCol:blDClickData := {|| R_EDYCJA('S') }

oCol:= oBRWR:AddCol()
oCol:bStrData := {|| AllTrim(RR->PESEL)+sCRLF+DToC(RR->DATA_U)+sCRLF+RR->PLEC }
oCol:cHeader := "PESEL"+sCRLF+"Data urodzenia"+sCRLF+Ptxt("P~le~c")
oCol:blDClickData := {|| R_EDYCJA('S') }

oCol:= oBRWR:AddCol()
oCol:bStrData := {|| OemToANSI(RR->OPIS_IN)+sCRLF+OemToAnsi(RR->OPIS_OUT)+sCRLF+OemToAnsi(RR->CITO) }
oCol:cHeader := "Opisy"+sCRLF+sCRLF+"Cito"
oCol:blDClickData := {|| R_EDYCJA('S') }

oCol:= oBRWR:AddCol()
oCol:bStrData := {|| AllTrim(RR->OPERATOR)+sCRLF+DToC(RR->DATA)+sCRLF+RR->GODZINA }
oCol:cHeader := "Operator"+sCRLF+"Data"+sCRLF+"Godzina"
oCol:blDClickData := {|| R_EDYCJA('S') }

oCol:= oBRWR:AddCol()
oCol:bStrData := {|| AllTrim(RR->N_OPER)+sCRLF+DToC(RR->N_DATA)+sCRLF+RR->N_TIME }
oCol:cHeader := Ptxt("Zmieni~l")+sCRLF+"Data"+sCRLF+"Godzina"
oCol:blDClickData := {|| R_EDYCJA('S') }

oCol:= oBRWR:AddCol()
oCol:bStrData := {|| Str(RR->LEKARZ,3,0)+sCRLF+sCRLF+Str(RR->NR_K,3,0) }
oCol:cHeader := "Lekarz"+sCRLF+sCRLF+"Nr K"
oCol:blDClickData := {|| R_EDYCJA('S') }

oCol:= oBRWR:AddCol()
oCol:bStrData := {|| AllTrim(RR->A_OPER)+sCRLF+DToC(RR->A_DATA)+sCRLF+RR->A_TIME }
oCol:cHeader := Ptxt("Odprawi~l")+sCRLF+"Data"+sCRLF+"Godzina"
oCol:blDClickData := {|| R_EDYCJA('S') }

oBRWR:bClrHeader := {|| { nRGB(0,0,0), nRGB(222,227,247) } }
oBRWR:bClrFooter := oBRWR:bClrHeader
oBRWR:bClrStd := oBRWR:bClrHeader
oBRWR:SetRDD()
oBRWR:CreateFromCode()
oBRWR:cToolTip = "Zarejestrowani pacjenci"
oBRWR:bKeyDown:={|nKEY| JAKIRRDOWN(nKEY) }
oWNDR:oClient := oBRWR

Posted: Sun Dec 02, 2007 11:41 pm
by Antonio Linares
Robert,

It seems as there is a bug in Class TXBrowse function ExtractLine().

We have modified it and now this little sample works fine:

Code: Select all

#include "FiveWin.ch"

function Main()

   local cText := "One" + CRLF + "Two" + CRLF + "Three"
   local nFrom := 1
   local nLen  := Len( cText ), cLine
   
   while nFrom <= nLen
      cLine = ExtractLine( cText, @nFrom )
      MsgInfo( cLine )
   end

return nil

function ExtractLine( cText, nFrom )

  local cLine, nAt

  nAt := At( CRLF, SubStr( cText, nFrom ) )

  if nAt > 0
    cLine := Substr( cText, nFrom, nAt - 1 )
    nFrom += nAt + 1
  else
    cLine := Substr( cText, nFrom )
    nFrom := Len( cText ) + 1
  endif

return cLine
Please replace the function ExtractLine() in Class TXBrowse and try your application again, thanks!

Posted: Mon Dec 03, 2007 12:28 am
by Antonio Linares
Robert,

Just download FWH 7.12 again and your app should work fine :-)

Posted: Mon Dec 03, 2007 7:07 am
by Robert Frank
Antonio Linares wrote:and your app should work fine :-)
It works:)
Thanks

R.