I'm trying to make a shortcut to a button, but the error is occurring in execution.
See the example below:
Code: Select all
/*
* $Id: demo_2.prg 760 2011-10-21 12:01:51Z l3wonsf $
*/
/*
* HMG 4 demo
* (c) 2010 Roberto Lopez <mail.box.hmg@gmail.com>
*/
#include "hmg.ch"
FUNCTION Main
LOCAL oWindow
hbqt_errorsys()
DEFINE MAINWINDOW oWindow
Row 10
Col 10
Width 400
Height 400
Title 'Nice OOP Demo!!!'
OnInit oWindow:Center()
ON KEY ALT+A OF cWndForm ACTION cWndForm.oButton1.OnClick // <- Here
DEFINE TOOLBAR oToolBar1
TOOLBUTTON oButton1 ;
Caption 'new' ;
picture 'new.png' ;
ACTION MsgInfo( 'New!' ) ;
tooltip 'tooltip'
TOOLBUTTON oButton2 ;
Caption 'open' ;
picture 'open.png' ;
ACTION MsgInfo( 'open!' ) ;
tooltip 'tooltip'
END TOOLBAR
END WINDOW
ACTIVATE WINDOW oWindow
RETURN NIL
Best Regards,
Rossine.