有一个窗体,上有Edit输入项,在按下button按钮后,检查该项是否为空,如果为空,给出提示:
if (messagedlg('Input the item!',mtWarning,[mbYes],0)=mrYes) then
edit.setfocus
但当点击yes后,以前的窗体也没有了,想请教这是什么原因,谢谢!
if (messagedlg('Input the item!',mtWarning,[mbYes],0)=mrYes) then
edit.setfocus
但当点击yes后,以前的窗体也没有了,想请教这是什么原因,谢谢!
可能我没说清楚,是这样的 请输入:_____(是edit) 确定(bitbutton,kind:bkok) 取消(bitbutton)
确定的代码:
if edit.text='' then
if (messagedlg('Input the item!',mtWarning,[mbYes],0)=mrYes) then
edit.setfocus
我是想在判断了edit 是空以后,弹出对话框,点了确定后,把焦点放到edit上,可是现在运行的情况是点完确定,原先的那个窗体也没有了.不知这回我说清楚了没有? 谢谢!