Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
360
Scroll bar not showing on ultradropdown
posted

I have a ultramaskededit control with an editbutton set to a ultradrop the displaylayout.scrollsbars property is set to automatic but the scroll bar never shows.  Another question is there a sample app that shows how to use the ulltradropdown with a textbox or maskededitbox?

 

thanks

john

 

 

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.UltraDropDown1.DataSource = filltest()

Me.UltraDropDown1.DisplayMember = "Time"

Me.UltraDropDown1.ValueMember = "Time"

End Sub

Function filltest() As DataTable

Dim _AMPM As String = "AM"

Dim _endHour As Integer

Dim _hour As Integer = 8

Dim _counter As Integer

Dim _dc As DataColumn

Dim _row As DataRow

Dim _dtValueList As DataTable

Dim _quarterCounter As Integer

If _hour = 0 Then _hour = 8

_endHour = 6

If _endHour = -12 Then _endHour = 5

_dtValueList = New DataTable("Vehicle")

_dc = New DataColumn("Time")_dc.DataType = System.Type.GetType("System.String")

_dtValueList.Columns.Add(_dc)

If _hour <> 0 And _endHour <> 0 Then

_counter = 1

Do While (_hour <> _endHour Or _AMPM = "AM")For _quarterCounter = 0 To 30 Step 30

_row = _dtValueList.NewRow

_row.Item("Time") = _hour.ToString + ":" + Format(_quarterCounter, "00") + " " + _AMPM

Debug.Print(_hour.ToString + ":" + Format(_quarterCounter, "00") + " " + _AMPM)

_dtValueList.Rows.Add(_row)

Next

_hour = _hour + 1

If _hour = 12 Then _AMPM = "PM"

If _hour = 13 Then _hour = 1

_counter = _counter + 1

If _counter = 300 Then Exit Do

Loop

End If

_row = _dtValueList.NewRow

_row.Item("Time") = _hour.ToString + ":00 PM"

_dtValueList.Rows.Add(_row)

Return _dtValueList

End Function

Private Sub UltraMaskedEdit1_BeforeEditorButtonDropDown(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinEditors.BeforeEditorButtonDropDownEventArgs) Handles UltraMaskedEdit1.BeforeEditorButtonDropDown

CType(e.Button, Infragistics.Win.UltraWinEditors.DropDownEditorButton).Control.Width = DirectCast(sender, Control).Width

End Sub

End Class