How do I stop the formatting code being attached to a resulting variable value in a dialog?
produces
example_dialog.jpg
a5_show_variable(local_variables()) gives following results:
varC_Country
varC_C1
is there a way of doing it in the XDialog or do I have to run code to strip the required value from the variable varC_C1?
Code:
'Create an XDialog dialog box to prompt for parameters. DIM varC_Country as C DIM VarC_C1 as C DIM varC_result as C auto_list_VarC_C1 = table.external_record_content_get("c1","c1-\"|\"-Description","C1","") Dim format as p Format.tab_stops="1cm,2cm" Format.odd_row_color="White" Format.even_row_color="White" Format.odd_selected_color="Bright Green" Format.even_selected_color="Bright Green" Format.font="Lucida Sans,8" Format.font_color_unselected="Black" Format.font_color_selected="Black" Format.lastbutton="OK" Format.group_size=1 Format.number_rows=.f. Format.alternating_bands=.f. auto_list_VarC_C1 = a5_owner_draw_list_fmt(auto_list_VarC_C1,Format) temp_count = w_count(auto_list_VarC_C1,crlf()) DELETE a_VarC_C1 DIM a_VarC_C1[temp_count] as c a_VarC_C1.initialize(auto_list_VarC_C1) DIM varC_Country_rl_def as C varC_Country_rl_def = "kl=prefix,{keylist_build(\"H=.05,1:25\",''+Name12,left(''+Country,25))}{usage_c=.t..and. unique_key_value()}" Delete XdialogStyle dim XDialogStyle as p XDialogStyle.AccentColor = "#255+255+0" XDialogStyle.Color = "#101+203+255" varC_result = ui_dlg_box("Country and Folder",<<%dlg% {Windowstyle=Gradient Horizontal Top} {region} | [%@varC_Country_rl_def%.30,10varC_Country]; | [%d;O={@@}%.30,11VarC_C1^$$a_VarC_C1]; {endregion}; {line=1,0}; {region} <*10ok!OK> <10cancel!CANCEL> {endregion}; %dlg%)
example_dialog.jpg
a5_show_variable(local_variables()) gives following results:
varC_Country
UK
{F=Lucida Sans,8}{C=Black,Black}{B=White,Bright Green}W{T=0.393700787401575}Warbird/Museum