咨询一个问题:我用了一个Palette,然后在Palette中加入两个combobox,一个名称CBHG,另外一个CBJT。然后设计了一个CBHG_SelectedIndexChanged事件,主要目的时当CBHG变化的时候,CBJT的内容跟着变化。可是我发现程序运行后CBHG变了,而CBJT内容没变。 界面和代码如下:求大神帮忙!!() Private Sub CBHG_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CBHG.SelectedIndexChanged Dim ni As Int16 Dim nj As Int16 nj = Val(CBHG.Text) - 1 CBJT.Items.Clear() For ni = 1 To mttainf.leg_num(nj, 0) If mttainf.leg_num(nj, ni) > 0 Then CBJT.Items.Add(mttainf.leg_num(0, ni)) End If Next CBJT.SelectedIndex = 0 End Sub 另外我设置ps.keepfocus也没办法,控件refresh也不行。请求大牛帮忙 |