又急:当客户选中dbcombobox中某一个item时,要使他的选中无效,dbcombobox的text不变,怎么办?

frogshero 2002-07-03 03:02:01
我在ondropdown中记下dbcombobox的原来的dbcombobox.text,在客户选中无效的item后,在onclick中把旧值赋给dbcombobox.text,但是dbcombobox显示的还是选中的item,怎么办?????
...全文
25 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
frogshero 2002-07-03
  • 打赏
  • 举报
回复
再看看吧!
jianling0538 2002-07-03
  • 打赏
  • 举报
回复
让用户不能录入,只能选择。
style=dropdownfixed
frogshero 2002-07-03
  • 打赏
  • 举报
回复
问题在于:当前的dbcombobox.text并不一定在dbcombobox.items中,怎么办?????
seasecond 2002-07-03
  • 打赏
  • 举报
回复
你可以在添加dbcombobox的items时将无效的item过滤掉
My_first 2002-07-03
  • 打赏
  • 举报
回复
在onchange事件里

if dbcombobox.itemindex=1 then 这是你点击的那个item的索引
dbcombobox.itemindex=原来的号。
lwk_hlj 2002-07-03
  • 打赏
  • 举报
回复
在选择之前记住其itemindex
之后再恢复

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧