FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour August 2026 setcheck behaviour
Posts: 137
Joined: Sat Oct 08, 2005 09:38 PM

August 2026 setcheck behaviour

Posted: Sun Aug 16, 2026 02:51 PM

After I upgrade from November 2025 to August 2026 the behaviour of setcheck() has changed.
Try the code below and click on the first column other than the current row.
The oBrw:BookMark does not change and the old current row checked not the one that I have clicked.

// Using Windows 7 row selection colors in xbrowse

#include 'fivewin.ch'
#include 'xbrowse.ch'

function Main()

   local oDlg, oBrw, oFont
   local nSelectedRow

   SET DATE ITALIAN
   SET CENTURY ON

   FwNumFormat( 'E', .t. )

   USE CUSTOMER ALIAS CUST

   DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -14

   DEFINE DIALOG oDlg SIZE 640,440 PIXEL ;
      FONT oFont TITLE 'XBrowse Windows 7 Bars' ;
      COLOR CLR_BLACK,RGB(250,250,250)

   @ 10,20 XBROWSE oBrw OF oDlg SIZE -10,-20 PIXEL ;
      COLUMNS "First", "State", "Age", "HireDate", "Salary" ;
      ALIAS 'CUST' NOBORDER

   oBrw:lRecordSelector := .f.
   oBrw:nMarqueeStyle   := MARQSTYLE_HIGHLWIN7
   oBrw:lMultiSelect    := .f.

   WITH OBJECT oBrw:InsCol( 1 )

  :cHeader       := " "
  :bEditValue    := { || If( oBrw:BookMark == nSelectedRow, .t., nil ) }
  :SetCheck()
  :nHeadBmpNo    := { || If( Empty( nSelectedRow ), 2, 1 ) }

   END

   oBrw:bLClicked     := { |r,c,f,oBrw| If( oBrw:MouseColPos( c ) == 1 , ;
                           If( nSelectedRow != oBrw:BookMark, nSelectedRow := oBrw:BookMark, nSelectedRow := nil ), nil ), ;
                           oBrw:RefreshCurrent() }


   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

   RELEASE FONT oFont

return nil

Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 26.08, BCC77

Posts: 44508
Joined: Thu Oct 06, 2005 05:47 PM

Re: August 2026 setcheck behaviour

Posted: Mon Aug 17, 2026 02:45 AM

Dear Birol,

This is the fix. It was a regression on our side:

@@ -5058,15 +5058,17 @@ METHOD LButtonDown( nRow, nCol, nFlags, lTouch ) CLASS TXBrowse
    return 0
    endif

+   // Fire bLClicked once AFTER the row/col change so BookMark is already
+   // the clicked record (Nov 2025 contract). Nil it during the recursive
+   // call so TControl/TWindow do not evaluate it a second time.
    if ( bClick := ::bLClicked ) != nil
       ::bLClicked := nil
+      uRet := ::LButtonDown( nRow, nCol, nFlags, lTouch )
+      ::bLClicked := bClick
       uResult := Eval( bClick, nRow, nCol, nFlags, Self )
       if ValType( uResult ) == "L" .and. uResult
-         ::bLClicked := bClick
          return 0
       endif
-      uRet := ::LButtonDown( nRow, nCol, nFlags, lTouch )
-      ::bLClicked := bClick
       return uRet
    endif

Can you apply it yourself or do you prefer us to send you the modified lib ?
many thanks for your feeback :!:

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 137
Joined: Sat Oct 08, 2005 09:38 PM

Re: August 2026 setcheck behaviour

Posted: Mon Aug 17, 2026 09:29 AM

Yes, It works. Thanks for your support

Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 26.08, BCC77

Continue the discussion