'宣言 Public Property TabSizing As Infragistics.Win.UltraWinTabs.TabSizing
public Infragistics.Win.UltraWinTabs.TabSizing TabSizing {get; set;}
TabSizing は、タブ項目のサイズの計算方法を決定します。
AutoSize | タブ サイズは、イメージとテキストを表示するために必要なサイズに基づいて決まります。 |
Fixed | タブ サイズは、値に解決された場合には TabWidth に基づいており、そうでない場合、AutoSize 値が使用されます。 |
Justified | このサイズ設定モードは、タブ項目をすべて表示できるだけのスペースがない場合のみ、タブに作用します。すべてのタブ項目が表示されるように、個々のタブ項目のサイズが縮小されます。 |
SizeToFit | タブが使用可能な領域全体を占めるように、タブのサイズが拡大または縮小します。 |
Compress | 選択されていないタブのサイズが、関連付けられたイメージのみを表示できるサイズになります。選択されているタブのサイズは、最大のイメージとテキスト領域に基づいて設定されます。 |
TabsPerRow | 各タブのサイズは、TabsPerRow の設定に基づいて使用可能な領域のパーセンテージです。 |
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTabs Imports Infragistics.Win.UltraWinTabbedMdi Private Sub InitializeTabbedMdi(ByVal mdiManager As UltraTabbedMdiManager) ' the same type (MdiTabSettings) is used for the ' TabSettings of the UltraTabbedMdiManager - affects all tabs ' TabSettings of the MdiTabGroup - affects all tabs in group ' Settings of the MdiTab - affects the specific tab Me.InitializeTabSettings(mdiManager.TabSettings) ' the same type (MdiTabGroupSettings) is used for the ' TabGroupSettings of the UltraTabbedMdiManager - affects all tab groups ' Settings of the MdiTabGroup - affects the specific tab group Me.InitializeTabGroupSettings(mdiManager.TabGroupSettings) End Sub Private Sub InitializeTabSettings(ByVal tabSettings As MdiTabSettings) ' allow tabs contained in the tab group to being closed tabSettings.AllowClose = DefaultableBoolean.True ' close the associated form when the close ' button is pressed tabSettings.TabCloseAction = MdiTabCloseAction.Close ' only allow tabs to be repositioned within its containing group tabSettings.AllowDrag = MdiTabDragStyle.WithinGroup ' do not use the icon of the associated for as ' the image for the tab tabSettings.DisplayFormIcon = DefaultableBoolean.False ' enable hot tracking - the tab will make use ' of the hot track appearance when the mouse is ' over the tab tabSettings.HotTrack = DefaultableBoolean.True ' when the mouse is over the tab, the forecolor ' should use the system's hot track color tabSettings.HotTrackTabAppearance.ForeColor = SystemColors.HotTrack ' when the tab is selected, use the system colors button ' colors tabSettings.SelectedTabAppearance.BackColor = SystemColors.ControlDarkDark tabSettings.SelectedTabAppearance.ForeColor = SystemColors.ControlLightLight End Sub Private Sub InitializeTabGroupSettings(ByVal groupSettings As MdiTabGroupSettings) ' display the close button in the tab group groupSettings.ShowCloseButton = DefaultableBoolean.True ' enable the automatic selection of a tab when the mouse ' is over a tab for a specific period of time groupSettings.AutoSelect = DefaultableBoolean.True ' wait 2 seconds when the mouse enters ' the bounds of the tab before it is selected automatically groupSettings.AutoSelectDelay = 0 ' do not allow a tab's width to exceed 200 pixels groupSettings.MaxTabWidth = 200 ' do not allow a tab's width to be less than 50 pixels groupSettings.MinTabWidth = 50 ' put 2 pixels of padding around the image and text area groupSettings.TabPadding = New Size(2, 2) ' have the tabs aligned to the bottom of the tab group groupSettings.TabOrientation = TabOrientation.BottomLeft ' have the tab's size based on their image and text but ' they will be constrained to the limits set above groupSettings.TabSizing = TabSizing.AutoSize ' use worksheet style tabs groupSettings.TabStyle = TabStyle.Excel End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinTabs; using Infragistics.Win.UltraWinTabbedMdi; private void InitializeTabbedMdi(UltraTabbedMdiManager mdiManager) { // the same type (MdiTabSettings) is used for the // TabSettings of the UltraTabbedMdiManager - affects all tabs // TabSettings of the MdiTabGroup - affects all tabs in group // Settings of the MdiTab - affects the specific tab this.InitializeTabSettings(mdiManager.TabSettings); // the same type (MdiTabGroupSettings) is used for the // TabGroupSettings of the UltraTabbedMdiManager - affects all tab groups // Settings of the MdiTabGroup - affects the specific tab group this.InitializeTabGroupSettings(mdiManager.TabGroupSettings); } private void InitializeTabSettings( MdiTabSettings tabSettings ) { // allow tabs contained in the tab group to being closed tabSettings.AllowClose = DefaultableBoolean.True; // close the associated form when the close // button is pressed tabSettings.TabCloseAction = MdiTabCloseAction.Close; // only allow tabs to be repositioned within its containing group tabSettings.AllowDrag = MdiTabDragStyle.WithinGroup; // do not use the icon of the associated for as // the image for the tab tabSettings.DisplayFormIcon = DefaultableBoolean.False; // enable hot tracking - the tab will make use // of the hot track appearance when the mouse is // over the tab tabSettings.HotTrack = DefaultableBoolean.True; // when the mouse is over the tab, the forecolor // should use the system's hot track color tabSettings.HotTrackTabAppearance.ForeColor = SystemColors.HotTrack; // when the tab is selected, use the system colors button // colors tabSettings.SelectedTabAppearance.BackColor = SystemColors.ControlDarkDark; tabSettings.SelectedTabAppearance.ForeColor = SystemColors.ControlLightLight; } private void InitializeTabGroupSettings( MdiTabGroupSettings groupSettings ) { // display the close button in the tab group groupSettings.ShowCloseButton = DefaultableBoolean.True; // enable the automatic selection of a tab when the mouse // is over a tab for a specific period of time groupSettings.AutoSelect = DefaultableBoolean.True; // wait 2 seconds when the mouse enters // the bounds of the tab before it is selected automatically groupSettings.AutoSelectDelay = 0; // do not allow a tab's width to exceed 200 pixels groupSettings.MaxTabWidth = 200; // do not allow a tab's width to be less than 50 pixels groupSettings.MinTabWidth = 50; // put 2 pixels of padding around the image and text area groupSettings.TabPadding = new Size(2,2); // have the tabs aligned to the bottom of the tab group groupSettings.TabOrientation = TabOrientation.BottomLeft; // have the tab's size based on their image and text but // they will be constrained to the limits set above groupSettings.TabSizing = TabSizing.AutoSize; // use worksheet style tabs groupSettings.TabStyle = TabStyle.Excel; }