Foxtable(狐表)用户栏目专家坐堂 → 菜单距离怎么设置


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

主题:菜单距离怎么设置

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


加好友 发短信
等级:超级版主 帖子:110574 积分:562760 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2017/2/28 20:40:00 [显示全部帖子]

AfterLoad

For i As Integer = 1 To 3
    Dim LblCtl As Windows.Forms.Button = e.Form.Controls("Button" & i).BaseControl
    If i=1 Then
        LblCtl.Image = GetImage("Control-270.png")
    Else
        LblCtl.Image = GetImage("Control.png")
    End If
    LblCtl.ImageAlign = Drawing.ContentAlignment.MiddleCenter
Next

For i As Integer = 2 To 3
    Dim Pnl As WinForm.Panel = e.Form.Controls("Panel" & i)  '获取对应的panel控件
    Dim Lbl = e.Form.Controls("Button" & i)
    pnl.visible = False
    lbl.Top = e.Form.Controls("Panel1").Top  + e.Form.Controls("Panel1").Height  + lbl.height * (i-2)
    pnl.Top = Lbl.Top + Lbl.Height + 3   '根据对应label的纵坐标和高度设置panel控件的 纵坐标
Next

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


加好友 发短信
等级:超级版主 帖子:110574 积分:562760 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2017/2/28 22:45:00 [显示全部帖子]

For i As Integer = 1 To 3
    Dim LblCtl As Windows.Forms.Button = e.Form.Controls("Button" & i).BaseControl
    LblCtl.Image = GetImage("Control-270.png")
    LblCtl.ImageAlign = Drawing.ContentAlignment.MiddleCenter
Next

For i As Integer = 1 To 3
    Dim LblCtl As Windows.Forms.Button = e.Form.Controls("Button" & i).BaseControl
    LblCtl.Image = GetImage("Control.png")
    LblCtl.ImageAlign = Drawing.ContentAlignment.MiddleCenter
    Dim Pnl = e.Form.Controls("Panel" & i)  '获取对应的panel控件
    Dim Lbl = e.Form.Controls("Button" & i)
    pnl.visible = False
    lbl.Top = e.Form.Controls("Button1").Top + (lbl.height+5) * (i-1)
    pnl.Top = Lbl.Top + Lbl.Height + 3   '根据对应label的纵坐标和高度设置panel控件的 纵坐标
Next

 回到顶部