Re: ui_dlg_ctl_goto() doesn't goto
Here is the code:
The glitch is, only on the first change of the radio button the cursor will not go to the find box, beyond that it works as desired with no problems.
I am sure it's all a timing issue, I have to pin point where and see if it can be remedied.
Here is the code:
Code:
DIM SHARED vcChoiceF as C = "Lastname" DIM SHARED vFind as C DIM SHARED vcFindWhat as C = "" DIM SHARED varC_result as C dlg_title="Find What" ok_button_label = "&OK" cancel_button_label = "&Cancel" vfind = "k=customer,{keylist_build(\"H=.05,1:25[Last Name]\",''+Lastname,left(''+Lastname,40))}{.t. .and. unique_key_value()}" varC_result = ui_dlg_box(dlg_title,<<%dlg% {units=f}{font=calibri,11}{xmargin=2,2}{ysize=.3};; {region} (vcChoiceF:Last Name!x_*) (vcChoiceF:Company!x_*) (vcChoiceF:City!x_*);; {endregion}; {region} Find:|{initial_focus} [%@vfind%.38vcFindWhat];{lf}; | {font=arial,12,b}You chose the following: {text=vcfindwhat}; {endregion};; {region} {justify=center,center} <8=ok_button_label!OK?vcFindWhat<\>""> <*8=cancel_button_label!CANCEL> {endregion}; %dlg%,<<%code% if a_dlg_button="cancel" end end if if a_dlg_button="ok" msgbox(vcFindWhat) end if select case vcChoiceF = "Company" vfind = stritran_multi(vFind,"Lastname","Company") vfind = stritran(vfind,"Last Name","Company") case vcChoiceF = "City" vfind = stritran_multi(vFind,"Lastname","bill_city") vfind = stritran(vfind,"Last Name","City") end select if a_dlg_button="x_change" vcFindWhat="" ui_dlg_refresh_targeted(dlg_title,vcFindWhat) ui_dlg_ctl_goto(dlg_title,"vcFindWhat") end if a_dlg_button = "" %code%)
I am sure it's all a timing issue, I have to pin point where and see if it can be remedied.
Comment