以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- chechedcombobox 的确定按钮事件 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=79758) |
||||
-- 作者:文道古月 -- 发布时间:2016/1/8 14:09:00 -- chechedcombobox 的确定按钮事件 请问,
代码:Dim ccb As WinForm.CheckedComboBox = e.Form.Controls("移动单元CheckedComboBox1")
checkedcombobox,点击确定按钮即将写入值时,我想对值自定义,这个代码应该写在哪里呢? |
||||
-- 作者:大红袍 -- 发布时间:2016/1/8 14:12:00 -- TextChanged 或 SelectedIndexChanged
Dim ccb As WinForm.CheckedComboBox = e.Form.Controls("移动单元CheckedComboBox1") |
||||
-- 作者:文道古月 -- 发布时间:2016/1/8 14:21:00 -- txtchanged事件,只能选择一个,选中多个的话就不行了,只能取第一个勾选的值 selsetedindexchanged事件,一勾选就报错(如下),加了if判断也不行
能不能在点击确定按钮的时候赋值?
.NET Framework 版本:2.0.50727.5485 [此贴子已经被作者于2016/1/8 14:20:59编辑过]
|
||||
-- 作者:大红袍 -- 发布时间:2016/1/8 14:53:00 -- 做例子上来。 |
||||
-- 作者:文道古月 -- 发布时间:2016/1/8 14:59:00 -- 如附件:
|
||||
-- 作者:大红袍 -- 发布时间:2016/1/8 15:07:00 -- Dim ccb As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox1") Dim str As String = "" For Each s As String In ccb.text.split(",") str &= s.SubString(0,2) & "," Next Systemready = False ccb.text = str.trim(",") Systemready = True |