Question : Div with scroll bar showing mysql data?

Can I have a div area with a scroll bar?  Similar to an iframe I suppose, but I am not pulling in another file.

I am pulling in mysql data and would like it to look like an iframe.

Thoughts?

Answer : Div with scroll bar showing mysql data?

You can Inherit from the CheckedListBox and prevent the undesirable action like this:
(just hit "Build" and your new control should appear at the top of the ToolBox)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
Public Class MyCheckedListBox
    Inherits CheckedListBox

    Private Const WM_LBUTTONDOWN As Integer = &H201
    Private Const WM_LBUTTONUP As Integer = &H202
    Private Const WM_LBUTTONDBLCLK As Integer = &H203

    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        Select Case m.Msg
            Case WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDBLCLK
                Dim pt As Point = Me.PointToClient(Cursor.Position)
                For i As Integer = Me.TopIndex To Me.Items.Count - 1
                    If Me.GetItemRectangle(i).Contains(pt) Then
                        MyBase.WndProc(m)
                        Exit Sub
                    End If
                Next
                Exit Sub ' Left click occurred in the white space: suppress default action

        End Select
        MyBase.WndProc(m)
    End Sub

End Class
Random Solutions  
 
programming4us programming4us