Pequeno BUG na classe TCONTROL

Post Reply
User avatar
miragerr
Posts: 140
Joined: Tue Oct 11, 2005 2:36 am
Location: Brasil

Pequeno BUG na classe TCONTROL

Post by miragerr »

Ola Antonio

portugues
Encontrei um pequeno BUG na classe TControl, no qual quando o botao da BTNBMP esta DISABLED o mesmo ainda funcionava quando precionado ALT + a letra sublinhada
vai logo abaixo

English
Found a small BUG in TControl class, in which when the button of the BTNBMP this DISABLED the same still worked when precionado ALT the underlined letter
will just below

Code: Select all

Static function CallClick( nKey, aControls, Self )

   local n, cPrompt, nAt, oControl
   for n = 1 to Len( aControls )
      oControl = aControls[ n ]
      if oControl:Classname() == "TBTNBMP" .OR. oControl:Classname() == "TRBTN"
        cPrompt := aControls[ n ]:cCaption
         nAt = At( "&", cPrompt )
         if nAt != 0                                                        //> JACKSON 10/01/2012                    <//
            if Upper( SubStr( cPrompt, nAt + 1, 1 ) ) == Upper( Chr( nKey ) ) .and. IsWindowEnabled( aControls[ n ]:hWnd )
               SetFocus( aControls[ n ]:hWnd )
               aControls[ n ]:Click()
               return 0 // msg processed
            endif
         endif
      endif
   next

return nil
 
Espero ter ajudado
Jackson Douglas C. Brito
Boa Vista - RR - Brasil
FWH 12.09 Last Build
xHarbour Free
UESTUDIO
SQLRDD
Post Reply