The setfocus xdialog event has been lost. In the example, when Enter or tab is used to move to field 2 or 3, the setfocus event should fire the ui_Beep(). It does not. Use the mouse to move from field 1 to 2 or 3 and the event fires. In my v7,8,9 it works OK. I've tried with 2944 3562 and with 2953 3564 and neither work. Please confirm and I will report.
Code:
'Created By : Ira Perlow 'Updated By : j michael wilson dim dlg_title as c="XDialog Events" dim vF1 as C dim vF2 as C dim vF3 as C dim dlg_body as c dim dlg_code as C dim vLevent as c dim vLevent1 as c dlg_body=<<%dlg% {startup=init}{can_exit=close} {region} Field1:|[.20vF1]; Field2:|[.20vF2!field2evt_*]; Field3:|[.20vF3!field3evt_*]; {endregion}; Dialog Events; {text=40,28vLevent1}; {region} <OK> <Cancel> <Reset List!Reset> {endregion}; %dlg% dlg_code=<<%code% IF a_dlg_button="Cancel" .or. a_dlg_button="OK" ui_modeless_dlg_close(dlg_title) ELSE IF a_dlg_button="Reset" vLevent="" vF1="" vF2="" ui_dlg_ctl_goto(dlg_title,"[.20vF1]") ELSE IF a_dlg_button=="INIT" ' Dialog code initialized vLevent="" ' Generate list of past 20 events vLevent1=word(vLevent,max(1,line_count(vLevent)-20),crlf(),20) vLevent1=vLevent ELSE ' Add event for those variable we want to see vLevent=vLevent+a_dlg_button+Crlf() ' Only show most recent 20 lines of events vLevent1=word(vLevent,max(1,line_count(vLevent)-20),crlf(),20) vLevent1=vLevent END IF 'xxxxxxxxxxxxxxxxx IF left(a_dlg_button,10)="field2evt_" IF a_dlg_button="field2evt_setfocus" ui_beep(UI_CRITICAL_BEEP) END IF a_dlg_button="" END IF IF left(a_dlg_button,10)="field3evt_" IF a_dlg_button="field3evt_setfocus" ui_beep(UI_CRITICAL_BEEP) END IF IF a_dlg_button="field3evt_change" ui_beep(UI_ASTERISK_BEEP) END IF a_dlg_button="" END IF %code% ' Display as modeless, as we can look at it and modify code while open ui_modeless_dlg_box(dlg_title,dlg_body,dlg_code)
Comment