Foxtable(狐表)用户栏目专家坐堂 → 一个内部通讯多值字段的问题


  共有2363人关注过本帖平板打印复制链接

主题:一个内部通讯多值字段的问题

帅哥哟,离线,有人找我吗?
douglas738888
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:五尾狐 帖子:1172 积分:8772 威望:0 精华:0 注册:2012/4/18 16:28:00
一个内部通讯多值字段的问题  发帖心情 Post By:2015/6/17 14:19:00 [只看该作者]

请教如下图的问题:如何在CheckedComboBox中多选后,在“用户名”的Label中同样出现多选的人名

 以下是在CheckedComboBox1的事件中的Click中设置的代码,感觉代码有问题,只能选择1人,不能选择多人到“用户名”的Label中,但不知怎样改

 

If e.Form.Controls("TextBox1").Value = Nothing Then
    Dim lst As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox1")
    If lst.SelectedIndex >=0 Then
        Dim s As String = lst.SelectedItem
        e.Form.Controls("用户名").Text = s.Remove(s.IndexOf("("))  '删除"("之后的字符
    End If
Else
    Dim lst As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox1")
    If lst.SelectedIndex >=0 Then
        Dim s As String = lst.SelectedItem
        If s.Remove(s.IndexOf("("))  <> e.Form.Controls("用户名").Text Then
            If MessageBox.Show("该操作会清空记录,是否继续?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question) = DialogResult.Yes Then
                e.Form.Controls("TextBox1").Value = Nothing
                e.Form.Controls("TextBox3").Value = Nothing
                e.Form.Controls("用户名").Text = s.Remove(s.IndexOf("("))  '删除"("之后的字符
            End If
        End If
    End If
End If


图片点击可在新窗口打开查看此主题相关图片如下:未标题-1.jpg
图片点击可在新窗口打开查看

 回到顶部