⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sampletabcontrol.vb

📁 Magic Library 1.7,有说明文档
💻 VB
📖 第 1 页 / 共 3 页
字号:
        Me.StyleGroup.TabIndex = 0
        Me.StyleGroup.TabStop = False
        Me.StyleGroup.Text = "Style"
        '
        'radioPlain
        '
        Me.radioPlain.Location = New System.Drawing.Point(16, 40)
        Me.radioPlain.Name = "radioPlain"
        Me.radioPlain.Size = New System.Drawing.Size(56, 24)
        Me.radioPlain.TabIndex = 0
        Me.radioPlain.Text = "Plain"
        '
        'radioIDE
        '
        Me.radioIDE.Location = New System.Drawing.Point(16, 16)
        Me.radioIDE.Name = "radioIDE"
        Me.radioIDE.Size = New System.Drawing.Size(56, 24)
        Me.radioIDE.TabIndex = 0
        Me.radioIDE.Text = "IDE"
        '
        'label4
        '
        Me.label4.Location = New System.Drawing.Point(456, 344)
        Me.label4.Name = "label4"
        Me.label4.Size = New System.Drawing.Size(80, 23)
        Me.label4.TabIndex = 3
        Me.label4.Text = "Bottom Offset"
        Me.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'label1
        '
        Me.label1.Location = New System.Drawing.Point(312, 312)
        Me.label1.Name = "label1"
        Me.label1.Size = New System.Drawing.Size(64, 23)
        Me.label1.TabIndex = 3
        Me.label1.Text = "Left Offset"
        Me.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'label2
        '
        Me.label2.Location = New System.Drawing.Point(472, 312)
        Me.label2.Name = "label2"
        Me.label2.Size = New System.Drawing.Size(64, 23)
        Me.label2.TabIndex = 3
        Me.label2.Text = "Right Offset"
        Me.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'label3
        '
        Me.label3.Location = New System.Drawing.Point(312, 344)
        Me.label3.Name = "label3"
        Me.label3.Size = New System.Drawing.Size(64, 23)
        Me.label3.TabIndex = 3
        Me.label3.Text = "Top Offset"
        Me.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'insetPlain
        '
        Me.insetPlain.Location = New System.Drawing.Point(176, 152)
        Me.insetPlain.Name = "insetPlain"
        Me.insetPlain.TabIndex = 1
        Me.insetPlain.Text = "Inset Plain"
        '
        'insetPagesOnly
        '
        Me.insetPagesOnly.Location = New System.Drawing.Point(176, 128)
        Me.insetPagesOnly.Name = "insetPagesOnly"
        Me.insetPagesOnly.Size = New System.Drawing.Size(120, 24)
        Me.insetPagesOnly.TabIndex = 4
        Me.insetPagesOnly.Text = "Inset Pages Only"
        '
        'showArrows
        '
        Me.showArrows.Location = New System.Drawing.Point(176, 104)
        Me.showArrows.Name = "showArrows"
        Me.showArrows.TabIndex = 1
        Me.showArrows.Text = "Show Arrows"
        '
        'radioMultiDocument
        '
        Me.radioMultiDocument.Location = New System.Drawing.Point(16, 16)
        Me.radioMultiDocument.Name = "radioMultiDocument"
        Me.radioMultiDocument.TabIndex = 0
        Me.radioMultiDocument.Text = "MultiDocument"
        '
        'AppearanceGroup
        '
        Me.AppearanceGroup.Controls.AddRange(New System.Windows.Forms.Control() {Me.radioMultiBox, Me.radioMultiForm, Me.radioMultiDocument})
        Me.AppearanceGroup.Location = New System.Drawing.Point(8, 96)
        Me.AppearanceGroup.Name = "AppearanceGroup"
        Me.AppearanceGroup.Size = New System.Drawing.Size(144, 96)
        Me.AppearanceGroup.TabIndex = 0
        Me.AppearanceGroup.TabStop = False
        Me.AppearanceGroup.Text = "Appearance"
        '
        'exampleColors
        '
        Me.exampleColors.Controls.AddRange(New System.Windows.Forms.Control() {Me.red, Me.blue, Me.normal})
        Me.exampleColors.Location = New System.Drawing.Point(8, 328)
        Me.exampleColors.Name = "exampleColors"
        Me.exampleColors.Size = New System.Drawing.Size(232, 64)
        Me.exampleColors.TabIndex = 1
        Me.exampleColors.TabStop = False
        Me.exampleColors.Text = "Example Colors"
        '
        'red
        '
        Me.red.Location = New System.Drawing.Point(160, 24)
        Me.red.Name = "red"
        Me.red.Size = New System.Drawing.Size(56, 24)
        Me.red.TabIndex = 0
        Me.red.Text = "Red"
        '
        'blue
        '
        Me.blue.Location = New System.Drawing.Point(88, 24)
        Me.blue.Name = "blue"
        Me.blue.Size = New System.Drawing.Size(88, 24)
        Me.blue.TabIndex = 0
        Me.blue.Text = "Blue"
        '
        'normal
        '
        Me.normal.Location = New System.Drawing.Point(16, 24)
        Me.normal.Name = "normal"
        Me.normal.Size = New System.Drawing.Size(88, 24)
        Me.normal.TabIndex = 0
        Me.normal.Text = "Normal"
        '
        'idePixelBorder
        '
        Me.idePixelBorder.Location = New System.Drawing.Point(176, 176)
        Me.idePixelBorder.Name = "idePixelBorder"
        Me.idePixelBorder.Size = New System.Drawing.Size(112, 24)
        Me.idePixelBorder.TabIndex = 5
        Me.idePixelBorder.Text = "IDE Pixel Border"
        '
        'idePixelArea
        '
        Me.idePixelArea.Location = New System.Drawing.Point(176, 200)
        Me.idePixelArea.Name = "idePixelArea"
        Me.idePixelArea.Size = New System.Drawing.Size(112, 24)
        Me.idePixelArea.TabIndex = 6
        Me.idePixelArea.Text = "IDE Pixel Area"
        '
        'multiline
        '
        Me.multiline.Location = New System.Drawing.Point(176, 272)
        Me.multiline.Name = "multiline"
        Me.multiline.Size = New System.Drawing.Size(112, 24)
        Me.multiline.TabIndex = 7
        Me.multiline.Text = "Multiline"
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.tabHideWithoutMouse, Me.tabHideUsingLogic, Me.tabHideAlways, Me.tabShowAlways})
        Me.GroupBox1.Location = New System.Drawing.Point(8, 200)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(144, 120)
        Me.GroupBox1.TabIndex = 2
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "HideTabsMode"
        '
        'tabHideWithoutMouse
        '
        Me.tabHideWithoutMouse.Location = New System.Drawing.Point(16, 88)
        Me.tabHideWithoutMouse.Name = "tabHideWithoutMouse"
        Me.tabHideWithoutMouse.Size = New System.Drawing.Size(120, 24)
        Me.tabHideWithoutMouse.TabIndex = 1
        Me.tabHideWithoutMouse.Text = "HideWithoutMouse"
        '
        'tabHideUsingLogic
        '
        Me.tabHideUsingLogic.Location = New System.Drawing.Point(16, 64)
        Me.tabHideUsingLogic.Name = "tabHideUsingLogic"
        Me.tabHideUsingLogic.TabIndex = 0
        Me.tabHideUsingLogic.Text = "HideUsingLogic"
        '
        'tabHideAlways
        '
        Me.tabHideAlways.Location = New System.Drawing.Point(16, 40)
        Me.tabHideAlways.Name = "tabHideAlways"
        Me.tabHideAlways.Size = New System.Drawing.Size(88, 24)
        Me.tabHideAlways.TabIndex = 0
        Me.tabHideAlways.Text = "HideAlways"
        '
        'tabShowAlways
        '
        Me.tabShowAlways.Location = New System.Drawing.Point(16, 16)
        Me.tabShowAlways.Name = "tabShowAlways"
        Me.tabShowAlways.TabIndex = 0
        Me.tabShowAlways.Text = "ShowAlways"
        '
        'hoverSelect
        '
        Me.hoverSelect.Location = New System.Drawing.Point(176, 248)
        Me.hoverSelect.Name = "hoverSelect"
        Me.hoverSelect.Size = New System.Drawing.Size(112, 24)
        Me.hoverSelect.TabIndex = 1
        Me.hoverSelect.Text = "Hover Select"
        '
        'multilineFullWidth
        '
        Me.multilineFullWidth.Location = New System.Drawing.Point(176, 296)
        Me.multilineFullWidth.Name = "multilineFullWidth"
        Me.multilineFullWidth.Size = New System.Drawing.Size(128, 24)
        Me.multilineFullWidth.TabIndex = 8
        Me.multilineFullWidth.Text = "Multiline Full Width"
        '
        'SampleTabControl
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(640, 429)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.multilineFullWidth, Me.multiline, Me.idePixelArea, Me.idePixelBorder, Me.insetPagesOnly, Me.hoverSelect, Me.selectedTextOnly, Me.numericUpDown3, Me.label3, Me.numericUpDown4, Me.label4, Me.numericUpDown2, Me.label2, Me.label1, Me.numericUpDown1, Me.insetPlain, Me.showArrows, Me.showClose, Me.tabControl, Me.shrinkPages, Me.addPage, Me.removePage, Me.clearAll, Me.hotTrack, Me.positionAtTop, Me.StyleGroup, Me.AppearanceGroup, Me.exampleColors, Me.GroupBox1})
        Me.Name = "SampleTabControl"
        Me.Text = "SampleTabControl"
        CType(Me.numericUpDown3, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.numericUpDown1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.numericUpDown4, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.numericUpDown2, System.ComponentModel.ISupportInitialize).EndInit()
        Me.StyleGroup.ResumeLayout(False)
        Me.AppearanceGroup.ResumeLayout(False)
        Me.exampleColors.ResumeLayout(False)
        Me.GroupBox1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Protected Sub UpdateControls()
        Select Case tabControl.Appearance
            Case Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiDocument
                _update = True
                radioMultiDocument.Select()
            Case Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiForm
                _update = True
                radioMultiForm.Select()
            Case Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiBox
                _update = True
                radioMultiBox.Select()
        End Select

        Select Case tabControl.Style
            Case VisualStyle.IDE
                _update = True
                radioIDE.Select()
            Case VisualStyle.Plain
                _update = True
                radioPlain.Select()
        End Select

        Select Case tabControl.HideTabsMode
            Case tabControl.HideTabsModes.ShowAlways
                _update = True
                tabShowAlways.Checked = True
            Case tabControl.HideTabsModes.HideAlways
                _update = True
                tabHideAlways.Checked = True
            Case tabControl.HideTabsModes.HideUsingLogic
                _update = True
                tabHideUsingLogic.Checked = True
            Case tabControl.HideTabsModes.HideWithoutMouse
                _update = True
                tabHideWithoutMouse.Checked = True
        End Select

        hotTrack.Checked = tabControl.HotTrack
        positionAtTop.Checked = tabControl.PositionTop
        shrinkPages.Checked = tabControl.ShrinkPagesToFit
        showClose.Checked = tabControl.ShowClose
        showArrows.Checked = tabControl.ShowArrows
        insetPlain.Checked = tabControl.InsetPlain
        idePixelBorder.Checked = tabControl.IDEPixelBorder
        idePixelArea.Checked = tabControl.IDEPixelArea
        insetPagesOnly.Checked = tabControl.InsetBorderPagesOnly
        selectedTextOnly.Checked = tabControl.SelectedTextOnly
        hoverSelect.Checked = tabControl.HoverSelect
        multiline.Checked = tabControl.Multiline
        multilineFullWidth.Checked = tabControl.MultilineFullWidth
        numericUpDown1.Value = tabControl.ControlLeftOffset
        numericUpDown2.Value = tabControl.ControlRightOffset
        numericUpDown3.Value = tabControl.ControlTopOffset
        numericUpDown4.Value = tabControl.ControlBottomOffset
    End Sub

    Protected Sub OnAddPage(ByVal sender As Object, ByVal e As EventArgs) Handles addPage.Click
        Dim controlToAdd As Control = Nothing

        Select Case _count
            Case 0, 2, 4, 6
                controlToAdd = New DummyForm()
                controlToAdd.BackColor = Color.White
            Case 1, 5
                Dim rtb As New RichTextBox()
                rtb.Text = "The quick brown fox jumped over the lazy dog."
                controlToAdd = rtb
            Case 3
                controlToAdd = New DummyPanel()
                controlToAdd.BackColor = Color.DarkSlateBlue
        End Select

        ' Define color that match the tabControl
        controlToAdd.ForeColor = tabControl.ForeColor
        controlToAdd.BackColor = tabControl.BackColor

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -