Page 1 of 1

Is xBrowse.prg different than FWH*.LIB?

Posted: Fri Nov 07, 2008 1:38 pm
by Horizon
Hi,

I have array xbrowse sample with logical columns. When It runs, Logical values (.t., .f.) is printed with checkon, chechoff bmps.

Image

1) How can I delete .t. or .f. printout?
2) How can i center the bmps in colums?

Thanks,

Code: Select all


#include "FiveWin.ch"
#include "xbrowse.ch"


function Main()

   local oDlg,oBrw1, aData
   
   aData := {{"Aaaaaaaaaa",.T.,.T.,.T.,.T.},;
   					{"Bbbbbbbbbb",.T.,.f.,.T.,.T.},;
   					{"Cccccccccc",.T.,.T.,.T.,.T.},;
   					{"Dddddddddd",.f.,.T.,.f.,.T.},;
 						{"Eeeeeeeeee",.T.,.T.,.T.,.f.}}

   DEFINE DIALOG oDlg TITLE "I am a DialogBox" PIXEL SIZE 600,400
   
  @ 0,0 XBROWSE oBrw1 OF oDlg  ;
       COLUMNS {1, 2, 3, 4, 5} ;
     HEADERS {"Procedure", "Add","Edit","Delete","Monitor"} ;
     ARRAY aData ;
     AUTOSORT SIZE 200,100
     
       if ! Empty( oCol := oBrw1:oCol( "Add" ) )
      oCol:SetCheck( { "ON", "OFF" } )
      oCol:cSortOrder  := nil
      //oCol:lBmpStretch = .T.
      oCol:nWidth := 50
      oCol:SetAlign(2)
   endif
   if ! Empty( oCol := oBrw1:oCol( "Edit" ) )
      oCol:SetCheck( { "ON", "OFF" } )
      oCol:cSortOrder  := nil
      // oCol:lBmpStretch = .T.
   endif
   if ! Empty( oCol := oBrw1:oCol( "Delete" ) )
      oCol:SetCheck( { "ON", "OFF" } )
      oCol:cSortOrder  := nil
      // oCol:lBmpStretch = .T.
   endif
   if ! Empty( oCol := oBrw1:oCol( "Monitor" ) )
      oCol:SetCheck( { "ON", "OFF" } )
      oCol:cSortOrder  := nil
      // oCol:lBmpStretch = .T.
   endif
	oBrw1:nMarqueeStyle := 5

	oBrw1:CreateFromCode()


   ACTIVATE DIALOG oDlg CENTERED 

return nil
test.rc

Code: Select all

ON 	BITMAP "checkon.bmp"
OFF BITMAP "checkoff.bmp"

Posted: Fri Nov 07, 2008 10:30 pm
by miragerr
Comigo tambem acontece a mesma coisa

o que fazer ??

Posted: Fri Nov 07, 2008 11:10 pm
by Daniel Garcia-Gil
http://www.fivetechsoft.com/forums/view ... hp?t=13260

i dont speak english but i`ll try

2) How can i center the bmps in colums?

change method PainData()
find this lines and change only one line

Code: Select all

      if ::bStrData == nil .OR. ::nDataBmpAlign == AL_CENTER   // add .or. instruction to end ( only this )
         nBmpCol  := Max( 0, nCol + nWidth / 2 )
         lStretch := ::lBmpStretch
      elseif ::nDataBmpAlign == AL_LEFT
         nBmpCol := nCol
         nCol    += aBitmap[ BITMAP_WIDTH ] + BMP_EXTRAWIDTH
      else
         nBmpCol := nCol + nWidth
      endif 
now you can use LEFT CENTER RIGHT

1) How can I delete .t. or .f. printout?
oCol:bStrDta:={||NIL}

Posted: Sat Nov 08, 2008 11:49 am
by Horizon
Thank you very much mcfox.

Antonio,

Will you add this fix to original xbrowse.prg? or should i keep it in my prg?

Thanks,

Posted: Mon Nov 10, 2008 12:28 pm
by Horizon
Hi,

I have solved the array problem via your changes in xBrowse.prg. But my normal DBF xbrowses in my app. does not work now.

Code: Select all

tack Calls
===========
   Called from:  => LEN(0)
   Called from: D:\PRG\520\fwhclass\xbrowse.prg => CHECKARRAY(7581)
   Called from: D:\PRG\520\fwhclass\xbrowse.prg => XBROWSENEW(7474)
   Called from: wLib_1.PRG => WYK_LIST(98)
   Called from: wLib_2.PRG => USGRUP(446)
   Called from: DAVAW.PRG => (b)MAIN(271)
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK(0)
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP(0)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT(0)
   Called from: .\source\classes\WINDOW.PRG => _FWH(0)
   Called from:  => WINRUN(0)
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(0)
   Called from: DAVAW.PRG => MAIN(331)

I have installed the fwh 8.10 again. I have not done any changes in xbrowse.prg. But I just added the xbrowse.prg in my project make. (Xbuilder). The same error occured again. If I removed the xbrowse.prg from my project make, It is OK.

I wonder that Is xBrowse.prg different from FWH*.LIB.

Thanks

Posted: Mon Nov 10, 2008 5:00 pm
by anserkk
Did u consider removing xbrowse.obj from your make and link

Regards

Anser

Posted: Mon Nov 10, 2008 11:05 pm
by Daniel Garcia-Gil
how do u make browse?
maybe u have other error... i don't have this problem

Posted: Tue Nov 11, 2008 8:21 am
by Antonio Linares
Please excuse my delay in reviewing these issues but we are quite busy working on the first release of the Visual IDE.