Click on TGroup

Click on TGroup

Postby Enrico Maria Giordano » Sun Jul 01, 2012 12:11 pm

I'm trying to fire an action when a TGroup is clicked but it doesn't work. Any ideas? This is a sample:

Code: Select all  Expand view
#include "Fivewin.ch"


REQUEST HB_GT_GUI_DEFAULT


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL oGrp

    DEFINE DIALOG oDlg;
           SIZE 800, 600

    @ 1, 1 GROUP oGrp TO 15, 30;
           PROMPT "This is a test";

    oGrp:bLClicked = { || Tone( 880, 1 ) }

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Click on TGroup

Postby ukoenig » Sun Jul 01, 2012 12:57 pm

Enrico,

I think it is the only way how it works.
Check the mouseclick-area ( tested ) :

Code: Select all  Expand view

FUNCTION D_CODE()
LOCAL oDlg, oGrp

DEFINE DIALOG oDlg  SIZE 800, 600

@ 50, 50 GROUP oGrp TO 200, 300 PIXEL ;
PROMPT "This is a test";

oDlg:bLClicked := { |nRow,nCol| ;
IIF( nRow >= oGrp:nTop .and. nRow <= oGrp:nTop + oGrp:nHeight .and. ;
      nCol >= oGrp:nLeft  .and. nCol <= oGrp:nLeft + oGrp:nWidth, ;
      MsgAlert( "INSIDE Group" ), MsgAlert( "OUTSIDE Group" ) ) }

oDlg:bRClicked := { |nRow,nCol| ;
IIF( nRow >= oGrp:nTop .and. nRow <= oGrp:nTop + oGrp:nHeight .and. ;
      nCol >= oGrp:nLeft  .and. nCol <= oGrp:nLeft + oGrp:nWidth, ;
      MsgAlert( "INSIDE Group" ), MsgAlert( "OUTSIDE Group" ) ) }

ACTIVATE DIALOG oDlg CENTER

RETURN NIL
 


Image

Best Regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Click on TGroup

Postby Enrico Maria Giordano » Sun Jul 01, 2012 4:31 pm

Thank you. I will try it.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 107 guests