* Control * Listbox with scroll bar

xiaoxiao2021-03-05  22

Imports System.ComponentModelImports System.Web.UIImports System.Web.UI.WebControlsImports System.WebImports System.Drawing.DesignImports System.Text.RegularExpressions ")> _Public Class XScrollListBox Inherits System.Web.UI.WebControls.WebControl Private WithEvents conFromListBox As ListBox Public Enum ScrollBar none All X Y End Enum # Region" Proton pa te "#Region" pro Kuraray su kara Ji Chengれ 表示 表示 プ パティ "'コ ト ト ー ル i i i p p g g g i i i i (i i i i i (((((((((((((((((((((.com = mID & "_SubFromListBox" Return mID End Get Set (ByVal Value As String) viewstate ( "mID") = Value End Set End Property 'CssClass _ Public Overrides Property CssClass () As String Get Return MyBase.CssClass End Get Set (ByVal Value As String) MyBase.CssClass = Value If Not conFromListBox Is Nothing Then conFromListBox.CssClass = MyBase.CssClass End If End Set End Property 'BackColor _ Public Overrides Property BackColor () As system.drawing.color get return mybase.backcolor end set (byval value as system.drawing.color) mybase.backcolor =

Value If Not conFromListBox Is Nothing Then conFromListBox.BackColor = MyBase.BackColor End If End Set End Property 'ForeColor _ Public Overrides Property ForeColor () As System.Drawing.Color Get Return MyBase.ForeColor End Get Set ( ByVal Value As System.Drawing.Color) MyBase.ForeColor = Value If Not conFromListBox Is Nothing Then conFromListBox.ForeColor = MyBase.ForeColor End If End Set End Property 'Controls Proton pa te Public Overrides ReadOnly Property Controls () As System.Web.UI. ControlCollection Get EnsureChildControls () Return MyBase.Controls End Get End Property # End Region _ Public ReadOnly Property SubFromListBox () As ListBox Get Me.EnsureChildControls ( ) Return conFromListBox End Get End Property _ Public Property ScrollType () As ScrollBar Get Me.EnsureChildControls () Return viewstate ( "scroll") End Get Set (ByVal Value As ScrollBar) viewstate ( "scroll") = Value End Set End Property _ Public Property ScrollBarWidth () As Unit Get Return Iif (ViewState ("MscrollBarwidth"

) Is Nothing, "", viewstate ( "mScrollBarWidth")) End Get Set (ByVal Value As Unit) viewstate ( "mScrollBarWidth") = Value If Not Me.conFromListBox Is Nothing Then Me.conFromListBox.Width = Value End If End Set End Property _ Public Property ScrollBarHeight () As Unit Get Return IIf (viewstate ( "mScrollBarHeight") Is Nothing, "", viewstate ( "mScrollBarHeight")) End Get Set (ByVal Value As Unit) viewstate ( "mScrollBarHeight") = Value If Not Me.conFromListBox Is Nothing Then Me.conFromListBox.Height = Value End If End Set End Property # End Region Public Sub New () Me.scrollbarwidth = unit.pixel (150) me.scrollbarheight = unit.pixel (150) end sub private function isdesignmode () as boolean if (httpContext.current is nothing) THEN Return True Else Return False End If End Function Protected Overrides Sub CreateChildControls () If conFromListBox Is Nothing Then conFromListBox = New ListBox conFromListBox.Height = Unit.Pixel (150) conFromListBox.Width = Unit.Pixel (150) End If Call SetChildLayout () End Sub Private Sub SetChildLayout () Dim htmlTable As Table Dim htmlTableRow As TableRow Dim divPanel As Panel htmlTable = New Table htmlTable.BorderWidth = Unit.Pixel (0) htmlTable.CellSpacing =

转载请注明原文地址:https://www.9cbs.com/read-39197.html

New Post(0)