FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse bLClickHeader
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
xBrowse bLClickHeader
Posted: Wed Mar 16, 2022 10:29 PM
Hi all,
I have an issue when double clicking an xBrowse header.
If I run the program below the codeblock bLClickHeader is executeted on start of the dialog. ( no click at all )
But when I click the header the codeblock is not fired.

What could be wrong?
regards, Detlef

Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "xbrowse.ch"

FUNCTION Main()
//-------------
LOCAL oBrw, oDlg
LOCAL aData := {;
                  { "line 1-1", "line 1-2", "line 1-3" },;
                  { "line 2-1", "line 2-2", "line 2-3" },;
                  { "line 3-1", "line 3-2", "line 3-3" },;
                  { "line 4-1", "line 4-2", "line 4-3" },;
                  { "line 5-1", "line 5-2", "line 5-3" },;
                  { "line 6-1", "line 6-2", "line 6-3" },;
                  { "line 7-1", "line 7-2", "line 7-3" },;
                  { "line 8-1", "line 8-2", "line 8-3" },;
                  { "line 9-1", "line 9-2", "line 9-3" } ;
               }

   DEFINE DIALOG oDlg FROM 2,2 TO 18, 62 TITLE "Dialog for Test"

   @ 1, 1 XBROWSE oBrw OF oDlg             ;
      HEADERS "Elem 1", "Elem 2", "Elem 3" ;
      SIZE 220, 100                        ;
      COLSIZES 100, 100, 100               ;
      ARRAY aData AUTOCOLS

   oBrw:CreateFromCode()

   WITH OBJECT oBrw:aCols[ 1 ]
      :cSortOrder    := NIL
      :cOrder        := NIL
      :bLClickHeader := msginfo( oBrw:nArrayAt )
   END

   ACTIVATE DIALOG oDlg ON INIT( oDlg:center() )
RETURN NIL
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: xBrowse bLClickHeader
Posted: Thu Mar 17, 2022 12:15 AM
Try
Code (fw): Select all Collapse
 :bLClickHeader := { || msginfo( oBrw:nArrayAt ) }
Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
Re: xBrowse bLClickHeader
Posted: Thu Mar 17, 2022 07:55 AM

Yes, Francisco... that's working fine now!
Many thanks.
After so many years without FWH coding I make a lot of silly mistakes, sorry.
Detlef

Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: xBrowse bLClickHeader
Posted: Thu Mar 17, 2022 01:54 PM

Do not worry.
We are here to help each other.
Regards.

Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql

Continue the discussion