以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  拜托袍哥将革命进行到底  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=70267)

--  作者:hbhb
--  发布时间:2015/6/18 10:01:00
--  拜托袍哥将革命进行到底
请问:袍哥!如何在命令窗口中的字段页面的选表控件中显示表名及表的标题,因为表较多,大脑字母细胞板块反应较慢。固又劳驾袍哥为劳苦大众分忧,彻底解放全人类!!
--  作者:大红袍
--  发布时间:2015/6/18 10:58:00
--  

全局代码

 

Public Sub cmb_TextChanged(sender As Object,e As EventArgs)
Dim lbox = sender.parent.parent.panel2.Controls("lstFields")
lbox.Items.Clear
Dim tname = sender.Text.Split(" ")(0)
If DataTables.contains(tname) Then
    lbox.Items.Add(tname)
    For i As Integer = 1 To DataTables(tname).DataCols.Count
        Dim dc = DataTables(tname).DataCols(i - 1)
        lbox.Items.Add(dc.Name)
    Next
    lbox.Items.Add("----------------")
    lbox.Items.Add(tname & " " & DataTables(tname).Caption)
    For i As Integer = 1 To DataTables(tname).DataCols.Count
        Dim dc = DataTables(tname).DataCols(i - 1)
        lbox.Items.Add(dc.Name & " " & dc.Caption)
    Next
End If
End Sub

 

------------------------

 

计划管理

 

Dim frm = Windows.Forms.Form.ActiveForm
If frm IsNot Nothing Then
    If frm.Name = "Class197" OrElse frm.name = "Class260" Then
        Dim cmb
        If frm.name = "Class197" Then
            cmb = frm.Controls("SplitContainer1").Panel1.Controls("MyCodeEditor21").Controls("SplitContainer1").Panel2.Controls("C1DockingTab1").Controls("FieldsPage").Controls("SplitContainer4").panel1.controls("cmbDataTables")
        Else
            cmb = frm.Controls("MyCodeEditor1").Controls("SplitContainer1").Panel2.Controls("C1DockingTab1").Controls("FieldsPage").Controls("SplitContainer4").panel1.controls("cmbDataTables")
        End If
        cmb.Visible = False
       
        Dim ncmb As Windows.Forms.ComboBox
        If cmb.parent.Controls.count > 1 Then
            ncmb = cmb.parent.Controls(1)
output.show(2)
        Else
output.show(3)
            ncmb = new Windows.Forms.ComboBox
            ncmb.Dock = 5
            ncmb.Visible = True
            cmb.parent.Controls.Add(ncmb)
            ncmb.Items.Clear
            For Each dt As DataTable In DataTables
                ncmb.items.Add(dt.Name & " " & dt.Caption)
            Next
            addhandler ncmb.TextChanged, addressof cmb_TextChanged
        End If
    End If
End If


--  作者:hbhb
--  发布时间:2015/6/18 11:20:00
--  
全民福祉,
胜过涨停!