以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  PictureViewer控件管理栏隐藏  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=117907)

--  作者:cd_tdh
--  发布时间:2018/4/20 17:26:00
--  PictureViewer控件管理栏隐藏

PictureViewer控件后面的管理栏能否隐藏,只显示红色框内部分?

 


图片点击可在新窗口打开查看此主题相关图片如下:0098.gif
图片点击可在新窗口打开查看

 

或是PictureBox能否显示多张图片?

[此贴子已经被作者于2018/4/20 17:30:24编辑过]

--  作者:有点甜
--  发布时间:2018/4/20 18:17:00
--  

方法一:你可以把控件放在一个panel里面,然后控制panal的高度,不就行了?

 

方法二:你可以隐藏按钮 http://www.foxtable.com/webhelp/scr/2286.htm

 

方式三:

 

Dim obj1 As object = e.Form.Controls("PictureViewer1").basecontrol.Controls(0)
obj1.panel2.controls("FlowLayoutPanel2").visible = False


--  作者:cd_tdh
--  发布时间:2018/5/14 8:50:00
--  

有多张的图片,做个上一张,下一张的按钮,怎么去判断上一张,下一张呢?


--  作者:有点甜
--  发布时间:2018/5/14 9:20:00
--  

上一行的代码,参考

 

Dim obj As object = Forms("窗口2").Controls("PictureViewer1").basecontrol.Controls(0)
Dim pic As Object = obj.panel1.controls("PictureSplitContainer").Panel1.controls("panel2").controls("C1PictureBox1")
Dim r As Row = Tables("表A").current
Dim ls As List(Of String) = r.DataRow.Lines("第一列")
Dim piv As WinForm.PictureViewer = Forms("窗口2").Controls("PictureViewer1")
Dim str As String = FileSys.GetName(piv.SelectedItem)
If vars("str") <> str Then
    vars("str") = str
    vars("idx") = -1
End If
If vars("idx") = -1 Then
    For i As Integer = 0 To ls.count-1
        If ls(i).Contains(vars("str")) Then
            If i = ls.count-1 Then
                pic.image = getimage(ProjectPath & "attachments/" & ls(0))
                vars("idx") = 0
            Else
                pic.image = getimage(ProjectPath & "attachments/" & ls(i+1))
                vars("idx") = i+1
            End If
        End If
    Next
ElseIf vars("idx") = ls.count-1
    pic.image = getimage(ProjectPath & "attachments/" & ls(0))
    vars("idx") = 0
Else
    pic.image = getimage(ProjectPath & "attachments/" & ls(vars("idx")+1))
    vars("idx") += 1
End If


--  作者:zhy400137
--  发布时间:2018/5/14 22:23:00
--  
mark