The following script I wrote for a custom find. It has been pared down so it may be run in Alpha Sports from the code tab.
When the xDialog opens, the cursor is visibly flashing in the combo-box field. If I change the radio button choice, I can not get
the cursor to return to the combo-box. If you look carefully, sometimes the combo-box flashes when the radio button is changed,
but no cursor.
What I'm looking for is after the radio button choice is changed, I'd like there to be a flashing cursor in the combo-box control
waiting for the user to start entering letters. For now, when the radio button is changed, the user needs to mouse click in the
combo-box control before they can start typing or click on the drop down control.
Does anyone have any ideas as to what may be happening?
When the xDialog opens, the cursor is visibly flashing in the combo-box field. If I change the radio button choice, I can not get
the cursor to return to the combo-box. If you look carefully, sometimes the combo-box flashes when the radio button is changed,
but no cursor.
What I'm looking for is after the radio button choice is changed, I'd like there to be a flashing cursor in the combo-box control
waiting for the user to start entering letters. For now, when the radio button is changed, the user needs to mouse click in the
combo-box control before they can start typing or click on the drop down control.
Does anyone have any ideas as to what may be happening?
Code:
DIM SHARED vcChoiceF as C = "Lastname" DIM SHARED vFind as C DIM SHARED vcFindWhat as C = "" DIM SHARED varC_result as C dlg="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()}" DIM vcFW as C = vFind varC_result = ui_dlg_box(dlg,<<%dlg% {units=f}{font=calibri,11}{xmargin=2,2}{ysize=.3};; {region} (vcChoiceF:Last Name!change) (vcChoiceF:Company!change) (vcChoiceF:City!change);; {endregion}; {region} Find:|{initial_focus} [%@vcFW%.38vcFindWhat]; {endregion};; {region} {justify=center,center} <8=ok_button_label!OK?vcFindWhat<\>""> <*8=cancel_button_label!CANCEL> {endregion}; %dlg%,<<%code% if a_dlg_button = "change" then a_dlg_button = "" vcFindWhat = "" select case vcChoiceF = "Last Name" vcFW = vFind case vcChoiceF = "Company" vcFW = stritran_multi(vFind,"Lastname","Company") vcFW = stritran(vcFW,"Last Name","Company") case vcChoiceF = "City" vcFW = stritran_multi(vFind,"Lastname","bill_city") vcFW = stritran(vcFW,"Last Name","City") end select end if ui_dlg_ctl_goto(dlg,vcFW) %code%) if varC_result <> "OK" then end end if msgbox(vcFindWhat)
Comment