want to set a codeblock to the key 'ALT-C' with
- Code: Select all Expand view
- SetKey( K_ALT_C, { || my_function() } )
Any idea?
SetKey( K_ALT_C, { || my_function() } )
frose wrote:seems to be another bug in FWH 11.12
frose wrote:Hi,
want to set a codeblock to the key 'ALT-C' withbut it doesn't work!
- Code: Select all Expand view
SetKey( K_ALT_C, { || my_function() } )
Any idea?
FUNCTION Main()
LOCAL oDlg
LOCAL oCheck1
LOCAL oCheck2
LOCAL lValue := .T.
SetCancel( .F. )
//SetKey( K_ALT_C, { || My_End() } )
SetKey( 302, { || My_End() } )
DEFINE DIALOG oDlg size 400, 400 TITLE "A Dialog Box"
//@ 1, 1 TO 5, 30 LABEL "&This is a LABEL for anything:" OF oDlg
@ 2, 2 CHECKBOX oCheck1 VAR lValue PROMPT "This is the first CHECKBOX" OF oDlg ;
ON CHANGE SAA_Change_dCheck( oCheck1 )
//@ 3, 3 CHECKBOX oCheck2 VAR lValue PROMPT "&ClickMe" SIZE 100, 20 OF oDlg ;
@ 3, 2 CHECKBOX oCheck2 PROMPT "This is a second CHECKBOX" OF oDlg
@ 5, 4 BUTTON "&Confirm" OF oDlg SIZE 40, 12 ACTION oDlg:End()
ACTIVATE DIALOG oDlg
RETURN NIL
FUNCTION SAA_Change_dCheck( oTCheckBox )
oTCheckBox:SetCheck( .F. )
oTCheckBox:SetText( "New Text" )
RETURN NIL
FUNCTION My_End()
nMsgBox( "Here is 'My_End()'!", "My_End()" )
QUIT
RETURN NIL
Antonio wrote: Try to implement a menuitem or a control with such accelerator and assign it an action
@ 5, 4 BUTTON "&Confirm" OF oDlg SIZE 40, 12 ACTION My_End()
frose wrote:Antonio,
now I'm even more confused!
Do you mean, you have the same behavior with FHW 1107 and 1112, when trying my sample code?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 34 guests