Is xBrowse.prg different than FWH*.LIB?

Post Reply
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Is xBrowse.prg different than FWH*.LIB?

Post 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"
Last edited by Horizon on Mon Nov 10, 2008 3:51 pm, edited 1 time in total.
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
User avatar
miragerr
Posts: 140
Joined: Tue Oct 11, 2005 2:36 am
Location: Brasil

Post by miragerr »

Comigo tambem acontece a mesma coisa

o que fazer ??
Jackson Douglas C. Brito
Boa Vista - RR - Brasil
FWH 12.09 Last Build
xHarbour Free
UESTUDIO
SQLRDD
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Post 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}
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Post 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,
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Post 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
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Post by anserkk »

Did u consider removing xbrowse.obj from your make and link

Regards

Anser
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Post by Daniel Garcia-Gil »

how do u make browse?
maybe u have other error... i don't have this problem
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply