Foxtable(狐表)用户栏目专家坐堂 → 在分区面板1中生成导航


  共有4228人关注过本帖树形打印复制链接

主题:在分区面板1中生成导航

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


加好友 发短信
等级:狐精 帖子:3082 积分:20596 威望:0 精华:0 注册:2016/3/28 16:57:00
在分区面板1中生成导航  发帖心情 Post By:2019/3/26 10:10:00 [显示全部帖子]

老师,我想在分区面板1中生成导航,下面代码怎么改?

'生成左侧导航
Dim frm As WinForm.SplitPanel = Forms("主窗口").Controls("SplitContainer1").panel1
'For Each kj As WinForm.Control In frm.Controls
    'frm.RemoveControl(kj.Name)
'Next
Dim o As new C1.Win.C1Command.C1OutBar
o.name = "o"
o.dock = 5 '锚定
o.VisualStyle = 5 'VisualStyle.Office2007Blue '页面主题
o.pagetitleheight = 30 '页面高度
Dim zaj As List(of String) = DataTables("子系统导航").GetValues("分组","","序号")
For Each za As String In zaj
    Dim p1 As new C1.Win.C1Command.C1OutPage '新建页面
    p1.name=za
    p1.text=za
    o.Pages.add(p1)
    Dim ajm As List(of DataRow) = DataTables("子系统导航").Select("分组='" & za & "'","序号 Desc")
    For Each aj2 As DataRow In ajm
        Dim aj As String = aj2("名称")
        Dim jpg As String = aj2("图标")
        Dim hsmc As String =aj2("名称")
        Dim abc As WinForm.Button
        abc=frm.CreateControl(hsmc,ControlTypeEnum.button)
        abc.Text=aj
        abc.Dock= 1 '锚定
        abc.Height= 30 '页面高度
        abc.Image=GetImage(jpg)  '图标
        abc.ImageAlign= ContentAlignment.MiddleLeft '图标位置,靠左居中
        abc.TextAlign = ContentAlignment.MiddleLeft '名称位置,靠左居中
        abc.TextImageRelation = TextImageRelation.ImageBeforeText '图标在文本之前   Automatic  '图标相对位置'自动
        abc.VisualStyle= IVisualStyle.Office2010Black  '按钮主题
        frm.AddControl(abc)
        o.Pages(za).controls.add(Forms("主窗口").Controls(hsmc).basecontrol)
    Next
Next

[此贴子已经被作者于2019/3/26 10:10:23编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
cd_tdh
  2楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3082 积分:20596 威望:0 精华:0 注册:2016/3/28 16:57:00
  发帖心情 Post By:2019/3/26 12:46:00 [显示全部帖子]

 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:实名制系统.rar


 回到顶部
帅哥哟,离线,有人找我吗?
cd_tdh
  3楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3082 积分:20596 威望:0 精华:0 注册:2016/3/28 16:57:00
  发帖心情 Post By:2019/3/26 13:34:00 [显示全部帖子]

老师,我需要根据子系统导航,在主窗口的分区面板1的panel1中自动生成导航栏。

 回到顶部