FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Behaviour of button class in FWH 11.12
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 10:54 AM

Hello,

Since I use FWH 11.12, I experienced another behaviour in the button class.

I often use "&" in a button to make it easier for a user to activate a button by using the ALT-key.

It always used to work fine. For instance, if I put "&Add" in a button, the user presses ALT-A on his keyboard to activate the button after which the action is performed.

But since 11.12, pressing ALT-A is only setting the focus on the button, but the action behind the button is not executed.

Why is that? Can we have the old behaviour back?

Thanks a lot in advance.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 100
Joined: Fri Dec 12, 2008 04:39 PM
Re: Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 01:15 PM

Good day!

The reported problem that also happened with me!

thank you

Contagem/Brazil

FWH/xharbour 15.12/PELLES C, MED, DBF
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 03:23 PM

this is the only change in tbutton class in version 11.12
can you try revert the change and test.

viewtopic.php?p=124275#p124275

salu2
carlos vargas

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 04:13 PM

Michel,

It is a FWH 11.12 bug, we are searching for it, thanks

We apologize for it

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 09:32 PM
Michel,

This example is also failing with FWH 11.11 so it seems as the bug was introduced before 11.11:

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

function Main()

   local oDlg, cTest := "Hello"

   DEFINE DIALOG oDlg
   
   @ 1, 1 GET cTest
   
   @ 3, 10 BUTTON "&Ok" ACTION MsgInfo( "test" )

   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 09:47 PM

In FWH 11.10 is working fine...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 10:01 PM
This is the required fix in Class TButton:

Code (fw): Select all Collapse
   METHOD GetDlgCode( nLastKey ) INLINE ::oWnd:nLastKey := nLastKey, nil // DLGC_WANTALLKEYS


Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 10:50 PM
Antonio Linares wrote:This example is also failing with FWH 11.11


I'm using FWH 11.11 and your sample works fine here. Why?

EMG
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 11:01 PM
Antonio, este metodo en tget, todas las posibilidaes retornan WANTALLKEYS, no tiene sentido
que opinas?

o no le capto. :-)
Code (fw): Select all Collapse
METHOD GetDlgCode( nLastKey ) CLASS TGet

   if Len( ::oWnd:aControls ) == 1
      return DLGC_WANTALLKEYS
   endif

   ::oWnd:nLastKey = nLastKey

   if ::oWnd:IsKindOf( "TXBROWSE" )
      return DLGC_WANTALLKEYS
   else
      if ::oWnd:oWnd != nil .and. ;
         ::oWnd:oWnd:ClassName() $ "TFOLDER,TFOLDEREX,TMDICHILD,TWINDOW,TDIALOG"
         return DLGC_WANTALLKEYS
      endif
   endif

return DLGC_WANTALLKEYS
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 11:04 PM
Enrico Maria Giordano wrote:
Antonio Linares wrote:This example is also failing with FWH 11.11


I'm using FWH 11.11 and your sample works fine here. Why?

EMG


Enrico,

Surely you were using an early 11.11 that got modified little later
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Behaviour of button class in FWH 11.12
Posted: Thu Jan 12, 2012 11:38 PM

Ok, now it's clear, thank you.

EMG

Continue the discussion