我正在使用 IUP.GetParm 对话框进行搜索和替换提示。该对话框支持 3 个按钮,前两个 OK 和 Cancel 关闭提示并返回主程序流程。
第三个按钮可以在 parm_action 函数中跟踪,我想要做的是使用第三个按钮跳过项目并关闭对话框,但如果可以,我无法解决。
我已经在 IUP 邮件列表上问过这个问题,但还没有得到答复。
function param_action(dialog,index)
if index == -4 then
bSkip = true
return 1
end
end
bSkip = false
bConfirm,strFromString,strToString,bSkip =
iup.GetParam("Search and Replace",
param_action,
fhGetTag(ptrRecord)..'-'..fhGetTag(ptr)..
' '..fhGetDisplayText(ptrRecord).." %t\n"..
"Replace: "..strBoxType.."\n"..
"With: "..strBoxType.."\n"..
"btn: %u[Ok,Cancel,Skip] \n"
, strFromString,strToString)
if bConfirm and not(bSkip) then
-- replace string
end
要在当前启用此功能,您必须按“跳过”按钮,然后按“确定”按钮。