'Imports System.ComponentModel

'<ToolboxItem(False)> _
'Public Class OptionsSubtitlesControl
'    Inherits DialogControl

'#Region " Windows Form Designer generated code "

'    Public Sub New()
'        MyBase.New()

'        'This call is required by the Windows Form Designer.
'        InitializeComponent()

'        'Add any initialization after the InitializeComponent() call

'    End Sub

'    'UserControl overrides dispose to clean up the component list.
'    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
'        If disposing Then
'            If Not (components Is Nothing) Then
'                components.Dispose()
'            End If
'        End If
'        MyBase.Dispose(disposing)
'    End Sub

'    'Required by the Windows Form Designer
'    Private components As System.ComponentModel.IContainer

'    'NOTE: The following procedure is required by the Windows Form Designer
'    'It can be modified using the Windows Form Designer.  
'    'Do not modify it using the code editor.
'    Friend WithEvents clbSubtitles As System.Windows.Forms.CheckedListBox
'    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
'        Me.clbSubtitles = New System.Windows.Forms.CheckedListBox
'        Me.SuspendLayout()
'        '
'        'clbSubtitles
'        '
'        Me.clbSubtitles.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
'                    Or System.Windows.Forms.AnchorStyles.Left) _
'                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
'        Me.clbSubtitles.CheckOnClick = True
'        Me.clbSubtitles.FormattingEnabled = True
'        Me.clbSubtitles.Location = New System.Drawing.Point(8, 8)
'        Me.clbSubtitles.Name = "clbSubtitles"
'        Me.clbSubtitles.Size = New System.Drawing.Size(248, 242)
'        Me.clbSubtitles.TabIndex = 1
'        '
'        'OptionsSubtitlesControl
'        '
'        Me.Controls.Add(Me.clbSubtitles)
'        Me.Name = "OptionsSubtitlesControl"
'        Me.ResumeLayout(False)

'    End Sub

'#End Region

'    Private BlockItemCheck As Boolean

'    Public Overrides Sub Init()
'        clbSubtitles.ColumnWidth = clbSubtitles.Width \ 2 - 4
'        BlockItemCheck = True

'        For Each i As Subtitle In p.Subtitles
'            clbSubtitles.Items.Add(i, i.Enabled)
'        Next

'        BlockItemCheck = False
'    End Sub

'    Private Sub clbSubtitles_ItemCheck(ByVal sender As Object, ByVal e As ItemCheckEventArgs) Handles clbSubtitles.ItemCheck
'        If Not BlockItemCheck Then
'            Dim li As Subtitle = CType(clbSubtitles.Items(e.Index), Subtitle)
'            li.Enabled = (e.NewValue = CheckState.Checked)
'            'check if size gets recalced
'        End If
'    End Sub
'End Class