'宣言 Public Enum UltraTabControlStyle Inherits System.Enum
public enum UltraTabControlStyle : System.Enum
メンバ | 解説 |
---|---|
Default | 使用されている UltraTabControlBase.ViewStyle のデフォルトスタイル。 |
Excel | タブの両サイドが外側にまっすぐ傾斜しています (菱形のような形状)。各タブの右側は隣接するタブと途中まで重なります。ただし、選択されたタブは隣接するタブと両側で重なります。 |
Flat | すべてのタブがフラットな外観で表示されます。選択されているタブはキャプション色によってハイライト表示され、他のタブのキャプションは灰色で表示されます。 |
NotePage | 右上隅と左上隅にページをめくるためのページカールイメージが表示されます。タブの周囲には浮き出した境界線が描画されます。 |
NotePageFlat | 右上隅と左上隅にページをめくるためのページカールイメージが表示されます。タブの周囲に境界線は描画されません。 |
Office2007Ribbon | 選択されたタブまたはホットトラックされたタブのみに境界線が描画されます。 |
PropertyPage | プロパティページで見られるように浮き出した境界線が使用されます。 |
PropertyPage2003 | 前縁はタブの上部に向かって傾斜し、後縁は角が丸くなっています。 |
PropertyPageFlat | 角の丸い1ピクセルの境界線を持ちます。 |
PropertyPageSelected | 選択されたタブとホットトラックタブ (ホットトラッキングが有効な場合) がプロパティページスタイルのタブになります。その他のすべてのタブには境界線はありません。 |
StateButtons | 状態ボタンスタイルのタブ。ボタンスタイルは UltraTabControlBase.TabButtonStyle プロパティの設定によって決まります。 |
VisualStudio | 選択されたタブのみが浮き出します。他のタブはフラットで、隣接する選択されていない2つのタブとは垂直線で区切られます。また、選択されていないタブのキャプションは灰色で表示されます。 |
VisualStudio2005 | 選択されたタブのみが丸くされた境界線で表示され、他のタブはフラットで、隣接する選択されていない 2 つのタブとは垂直線で区切られます。これはピン固定した時に、VS2005 IDE の一番下のタブを真似ます。 |
Wizard | タブ間を移動するためのUIはランタイムに提供されず、コントロールの周囲に境界線はありません。 |
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
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinTabs; using Infragistics.Win.UltraWinTabControl; private void InitializeTabControl() { // Turn of XP themes support to pick up explicit backcolor // setting below this.ultraTabControl1.SupportThemes = false; // Set the default appearance for all tabs this.ultraTabControl1.Appearance.BackColor = Color.Silver; this.ultraTabControl1.Appearance.BackColor2 = Color.White; this.ultraTabControl1.Appearance.BackGradientStyle = GradientStyle.HorizontalBump; this.ultraTabControl1.Appearance.BackGradientAlignment = GradientAlignment.Client; // Set the default appearance for the client area // which does not include the tab header area this.ultraTabControl1.ClientAreaAppearance.BackColor = Color.Silver; this.ultraTabControl1.ClientAreaAppearance.BackColor2 = Color.White; this.ultraTabControl1.ClientAreaAppearance.BackGradientStyle = GradientStyle.HorizontalBump; this.ultraTabControl1.ClientAreaAppearance.BackGradientAlignment = GradientAlignment.Client; // Set a slightly different apperance for the currect // 'ActiveTab' (the tab with focus) this.ultraTabControl1.ActiveTabAppearance.ForeColor = Color.Red; // Set a slightly different apperance for the currect // 'SelectedTab' (the tab whose tab page is currently visible) this.ultraTabControl1.SelectedTabAppearance.ForeColor = Color.Blue; // Set the image background to conform and align with the // form's BackgroundImage this.ultraTabControl1.TabHeaderAreaAppearance.ImageBackground = this.BackgroundImage; this.ultraTabControl1.TabHeaderAreaAppearance.ImageBackgroundOrigin = ImageBackgroundOrigin.Form; // Set AutoSelect on so that if the mouse pauses over // a tab for half a second the tab will be automatically // selected this.ultraTabControl1.AutoSelect = true; this.ultraTabControl1.AutoSelectDelay = 500; // Enable hot tracking (tabs hightlight as the mouse passes over them) this.ultraTabControl1.HotTrack = true; this.ultraTabControl1.HotTrackAppearance.ForeColor = Color.FromArgb(255,0,255); // Allow all tabs but the first tab to be moved this.ultraTabControl1.AllowTabMoving = true; this.ultraTabControl1.Tabs[0].AllowMoving = DefaultableBoolean.False; // Set width constraints (in pixels) on the tabs this.ultraTabControl1.MinTabWidth = 35; this.ultraTabControl1.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. this.ultraTabControl1.NavigationStyle = NavigationStyle.AutoSelect; // Specify the image size and also to scale larger // images down to that size but leave smaller images // unchanged. this.ultraTabControl1.ImageSize = new Size(16,16); this.ultraTabControl1.ScaleImages = ScaleImage.OnlyWhenNeeded; // Specify that separators should be shown between buttons. // This is ignored if the Style property is not set to // StateButtons this.ultraTabControl1.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. this.ultraTabControl1.ShowToolTips = true; // Specify the style of the tabs this.ultraTabControl1.Style = UltraTabControlStyle.StateButtons; // Specify the button style. This is ignored if the Style // property is not set to StateButtons this.ultraTabControl1.TabButtonStyle = UIElementButtonStyle.PopupBorderless; // Specify the layout of the tabs. There are various // single-row and multi-row TabLayoutStyle's available this.ultraTabControl1.TabLayoutStyle = TabLayoutStyle.SingleRowAutoSize; // Specify the orientation of the tabs and the text. this.ultraTabControl1.TabOrientation = TabOrientation.RightTop; this.ultraTabControl1.TextOrientation = TextOrientation.HorizontalPlus90; // Specify the size of the tab page. // Note: this will cause the control to be resized this.ultraTabControl1.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 this.ultraTabControl1.TabSize = new Size(70, 20); // Specify the amount of padding around the text and image // when calcualting the size of the tabs. this.ultraTabControl1.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). this.ultraTabControl1.UseMnemonics = DefaultableBoolean.True; }