以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 菜单距离怎么设置 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=96838) |
||||
-- 作者:神一样的男人 -- 发布时间:2017/2/28 19:17:00 -- 菜单距离怎么设置 怎么设置打开导航窗体菜单控件的距离 此主题相关图片如下:123.png 此主题相关图片如下:222.png
|
||||
-- 作者:神一样的男人 -- 发布时间:2017/2/28 19:18:00 -- 现在是默认打开是没有距离的 要点一下才有距离 |
||||
-- 作者:有点蓝 -- 发布时间: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 |
||||
-- 作者:神一样的男人 -- 发布时间:2017/2/28 21:16:00 -- 不对啊 我要的是和图片的效果一样啊 |
||||
-- 作者:有点蓝 -- 发布时间: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
|