@@ -57,6 +57,9 @@ export class DockPanel extends Widget {
5757 if ( options . addButtonEnabled !== undefined ) {
5858 this . _addButtonEnabled = options . addButtonEnabled ;
5959 }
60+ if ( options . tabScrollingEnabled !== undefined ) {
61+ this . _tabScrollingEnabled = options . tabScrollingEnabled ;
62+ }
6063
6164 // Toggle the CSS mode attribute.
6265 this . dataset [ 'mode' ] = this . _mode ;
@@ -258,6 +261,23 @@ export class DockPanel extends Widget {
258261 } ) ;
259262 }
260263
264+ /**
265+ * Whether scrolling of tabs in tab bars is enabled.
266+ */
267+ get tabScrollingEnabled ( ) : boolean {
268+ return this . _tabScrollingEnabled ;
269+ }
270+
271+ /**
272+ * Set whether the add buttons for each tab bar are enabled.
273+ */
274+ set tabScrollingEnabled ( value : boolean ) {
275+ this . _tabScrollingEnabled = value ;
276+ each ( this . tabBars ( ) , tabbar => {
277+ tabbar . scrollingEnabled = value ;
278+ } ) ;
279+ }
280+
261281 /**
262282 * Whether the dock panel is empty.
263283 */
@@ -938,6 +958,7 @@ export class DockPanel extends Widget {
938958 tabBar . tabsMovable = this . _tabsMovable ;
939959 tabBar . allowDeselect = false ;
940960 tabBar . addButtonEnabled = this . _addButtonEnabled ;
961+ tabBar . scrollingEnabled = this . _tabScrollingEnabled ;
941962 tabBar . removeBehavior = 'select-previous-tab' ;
942963 tabBar . insertBehavior = 'select-tab-if-needed' ;
943964
@@ -1083,6 +1104,7 @@ export class DockPanel extends Widget {
10831104 private _tabsMovable : boolean = true ;
10841105 private _tabsConstrained : boolean = false ;
10851106 private _addButtonEnabled : boolean = false ;
1107+ private _tabScrollingEnabled : boolean = false ;
10861108 private _pressData : Private . IPressData | null = null ;
10871109 private _layoutModified = new Signal < this, void > ( this ) ;
10881110
@@ -1165,6 +1187,13 @@ export namespace DockPanel {
11651187 * The default is `'false'`.
11661188 */
11671189 addButtonEnabled ?: boolean ;
1190+
1191+ /**
1192+ * Enable scrolling in each of the dock panel's tab bars.
1193+ *
1194+ * The default is `'false'`.
1195+ */
1196+ tabScrollingEnabled ?: boolean ;
11681197 }
11691198
11701199 /**
0 commit comments