xBrowse bLClickHeader

xBrowse bLClickHeader

Postby Detlef » 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: Select all  Expand view
#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
 
User avatar
Detlef
 
Posts: 207
Joined: Mon Feb 07, 2022 9:54 pm

Re: xBrowse bLClickHeader

Postby FranciscoA » Thu Mar 17, 2022 12:15 am

Try
Code: Select all  Expand view
:bLClickHeader := { || msginfo( oBrw:nArrayAt ) }
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: xBrowse bLClickHeader

Postby Detlef » Thu Mar 17, 2022 7: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
User avatar
Detlef
 
Posts: 207
Joined: Mon Feb 07, 2022 9:54 pm

Re: xBrowse bLClickHeader

Postby FranciscoA » Thu Mar 17, 2022 1:54 pm

Do not worry.
We are here to help each other.
Regards.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 45 guests