I want nChoice in the code below to be '0' if the user makes a choice on the radio button and then decides to close the window with the 'X'.
It does it when the user presses Cancel, but not when the window is closed with 'X'.
It does it when the user presses Cancel, but not when the window is closed with 'X'.
DEFINE DIALOG oDlg OF Win_main TITLE "Move Record" SIZE 300, 150
@ 1, 1 SAY 'Move this record to :'
@ 3, 5 BUTTON but_move PROMPT "Move" SIZE 30, 10 DEFAULT ;
ACTION ( oDlg:END() ) // MSGSTOP( "Incorrect username or password", "Error" ) )
@ 1, 9 RADIO nChoice PROMPT "&Prospective Database", "&Free Database" OF oDlg
@ 3, 15 BUTTON but_cancel PROMPT "Cancel" SIZE 30, 10 ACTION (nChoice:=0, oDlg:END())
ACTIVATE DIALOG oDlg CENTER VALID ( .T. )
MSGINFO(STR(nChoice))Many thanks
Ollie.
Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
Ollie.
Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)