Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTabs
Imports Infragistics.Win.UltraWinTabControl
Private Sub InitializeTabControl()
With Me.ultraTabControl1
' Turn of XP themes support to pick up explicit backcolor
' setting below
.SupportThemes = False
' Set the default appearance for all tabs
.Appearance.BackColor = Color.Silver
.Appearance.BackColor2 = Color.White
.Appearance.BackGradientStyle = GradientStyle.HorizontalBump
.Appearance.BackGradientAlignment = GradientAlignment.Client
' Set the default appearance for the client area
' which does not include the tab header area
.ClientAreaAppearance.BackColor = Color.Silver
.ClientAreaAppearance.BackColor2 = Color.White
.ClientAreaAppearance.BackGradientStyle = GradientStyle.HorizontalBump
.ClientAreaAppearance.BackGradientAlignment = GradientAlignment.Client
' Set a slightly different apperance for the currect
' 'ActiveTab' (the tab with focus)
.ActiveTabAppearance.ForeColor = Color.Red
' Set a slightly different apperance for the currect
' 'SelectedTab' (the tab whose tab page is currently visible)
.SelectedTabAppearance.ForeColor = Color.Blue
' Set the image background to conform and align with the
' form's BackgroundImage
.TabHeaderAreaAppearance.ImageBackground = Me.BackgroundImage
.TabHeaderAreaAppearance.ImageBackgroundOrigin = ImageBackgroundOrigin.Form
' Enable hot tracking (tabs hightlight as the mouse passes over them)
.HotTrack = True
.HotTrackAppearance.ForeColor = Color.FromArgb(255, 0, 255)
' Set AutoSelect on so that if the mouse pauses over
' a tab for half a second the tab will be automatically
' selected
.AutoSelect = True
.AutoSelectDelay = 500
' Enable hot tracking (tabs hightlight as the mouse passes over them)
.HotTrack = True
.HotTrackAppearance.ForeColor = Color.FromArgb(255, 0, 255)
' Allow all tabs but the first tab to be moved
.AllowTabMoving = True
.Tabs(0).AllowMoving = DefaultableBoolean.False
' Set width constraints (in pixels) on the tabs
.MinTabWidth = 35
.MaxTabWidth = 100
' Set the NavigationStyle property. This determines what
' happens when the user navigates betwen tabs via the
' keyboard (i.e. the arrow keys, page up, page down etc.).
' This assumes that the TabStop property is true and the
' control has focus.
.NavigationStyle = NavigationStyle.AutoSelect
' Specify the image size and also to scale larger
' images down to that size but leave smaller images
' unchanged.
.ImageSize = New Size(16, 16)
.ScaleImages = ScaleImage.OnlyWhenNeeded
' Specify that separators should be shown between buttons.
' This is ignored if the Style property is not set to
' StateButtons
.ShowButtonSeparators = True
' Specify that tooltips will be shown when the cursor
' is paused over a tab.
' Note: Tooltips will only be displayed for tab's whose
' 'ToolTipText' property returns a string of at least 1
' character or the Tab's 'Text' is not fully visible
' due to size constraints.
.ShowToolTips = True
' Specify the style of the tabs
.Style = UltraTabControlStyle.StateButtons
' Specify the button style. This is ignored if the Style
' property is not set to StateButtons
.TabButtonStyle = UIElementButtonStyle.PopupBorderless
' Specify the layout of the tabs. There are various
' single-row and multi-row TabLayoutStyle's available
.TabLayoutStyle = TabLayoutStyle.SingleRowAutoSize
' Specify the orientation of the tabs and the text.
.TabOrientation = TabOrientation.RightTop
.TextOrientation = TextOrientation.HorizontalPlus90
' Specify the size of the tab page.
' Note: this will cause the control to be resized
.TabPageSize = New Size(300, 100)
' Specify the default size of each tab.
' Note: the width is ignored untless the TabLayoutStyle is
' either SingleRowFixed or MultiRowFixed
.TabSize = New Size(70, 20)
' Specify the amount of padding around the text and image
' when calcualting the size of the tabs.
.TabPadding = New Size(3, 3)
' Specify whether mnemonics will be supported. If so and
' there is an '&' in a tab's text, the following character
' will be treated as an accelerator (i.e. the tab will
' be activated when the user presses the 'Alt' key and
' that character).
.UseMnemonics = DefaultableBoolean.True
End With
End Sub