I am trying to use XDialog for data entry. XDialog is new to me, so I started with an Action Script, converted it to XBasic, and tarted it up. It works, but the drop-down list for Name (produced using keylist_build) is only about 5.5 rows high (screenshot atatched). 10 lines or so would be nice.
I have gone through the help files, and have tried several variations of adding %.70,10 in various places, but clearly not in the right place. Please can anyone help ?
Here's the main part of the XDialog:
I have gone through the help files, and have tried several variations of adding %.70,10 in various places, but clearly not in the right place. Please can anyone help ?
Here's the main part of the XDialog:
Code:
DIM SHARED vxdEntryDate as D DIM SHARED vxdDescription as C DIM SHARED vxdName as C DIM SHARED vxdChqName as C DIM SHARED vxdAmount as C dim shared temp as n DIM SHARED vxdPaidIn as C DIM SHARED vxdAccount as C DIM SHARED vxdCategory as C DIM SHARED varC_result as C DELETE expression_result expression_result = eval("date()",form_name) vxdEntryDate = convert_type(expression_result,"D") vxdPaidIn = "No" auto_list_vxdDescription = table.external_record_content_get("e_income_descriptions","Description","Order","") temp_count = w_count(auto_list_vxdDescription,crlf()) DELETE a_vxdDescription DIM a_vxdDescription[temp_count] as c a_vxdDescription.initialize(auto_list_vxdDescription) auto_list_vxdAccount = table.external_record_content_get("e_income_accounts","Account","Order","") temp_count = w_count(auto_list_vxdAccount,crlf()) DELETE a_vxdAccount DIM a_vxdAccount[temp_count] as c a_vxdAccount.initialize(auto_list_vxdAccount) auto_list_vxdCategory = table.external_record_content_get("e_income_categories","Category","Order","") temp_count = w_count(auto_list_vxdCategory,crlf()) DELETE a_vxdCategory DIM a_vxdCategory[temp_count] as c a_vxdCategory.initialize(auto_list_vxdCategory) ok_button_label = "&OK" cancel_button_label = "&Cancel" edit_button_label = "&Edit client record" DIM vxdName_rl_def as C vxdName_rl_def = "k=clients,{keylist_build(\"H=.05,1:30[Name],2:34[Cheque name],3:60[Short notes]\",''+Calcflname,left(''+Calcflname,26),left(''+Cheque_name,30),left(''+Shortnotes,70))}{}" ' It's a new income record, so blank out all fields except those with a default vxdDescription = "" vxdName = "" vxdChqName = "" vxdAmount = "" vxdAccount = "" vxdCategory = "" 'Turn off the hourglass cursor. hourglass_cursor(.f.) varC_result = ui_dlg_box("Income record",<<%dlg% {font=Arial,9} {ysize=2} {region} {tabstops} Entry date:| [%DATE;P=popup.calendar(dtoc(vxdEntryDate));I=popup.calendar%.17vxdEntryDate!vxdEntryDate_*]; Description:| [%v%.41vxdDescription^+a_vxdDescription]; Name:| [%@vxdName_rl_def%.45vxdName!change]|{endtab}{notabstops}<20=edit_button_label!EDIT>; {endtab}{tabstops} Cheque name:| [.45vxdChqName]; Amount:| [%*n%.12vxdAmount!amtchange]; {region}Paid in:{endregion}| {region}(vxdPaidIn:No) (vxdPaidIn:Yes){endregion}; Account:| [%v%.30vxdAccount^=a_vxdAccount]; Category:| [%v%.30vxdCategory^=a_vxdCategory]; {endtab} {endregion}; {ysize=1} {line=1,0}; {region} <15=ok_button_label!OK> <15=cancel_button_label!CANCEL> {endregion} %dlg%,<<%code% if left(a_dlg_button,13) = "vxdEntryDate_" then if a_dlg_button = "vxdEntryDate_killfocus" then vxdEntryDate = ctod(dtoc(vxdEntryDate)) end if a_dlg_button = "" end if ' Each time the Name is changed, look up the cheque name if a_dlg_button = "change" then ... (and so on)
Comment