Is xBrowse.prg different than FWH*.LIB?

Is xBrowse.prg different than FWH*.LIB?

Postby Horizon » Fri Nov 07, 2008 1:38 pm

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  Expand view

#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  Expand view
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 & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Postby miragerr » Fri Nov 07, 2008 10:30 pm

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
miragerr
 
Posts: 140
Joined: Tue Oct 11, 2005 2:36 am
Location: Brasil

Postby Daniel Garcia-Gil » Fri Nov 07, 2008 11:10 pm

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  Expand view
      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}
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Postby Horizon » Sat Nov 08, 2008 11:49 am

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 & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Postby Horizon » Mon Nov 10, 2008 12:28 pm

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  Expand view
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 & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Postby anserkk » Mon Nov 10, 2008 5:00 pm

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

Regards

Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Postby Daniel Garcia-Gil » Mon Nov 10, 2008 11:05 pm

how do u make browse?
maybe u have other error... i don't have this problem
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Postby Antonio Linares » Tue Nov 11, 2008 8:21 am

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests