We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Irresponsive Workbook.DisplayWorkbookTabs

I'm trying to hide the Sheets tab (bottom-left) of the Spreadsheet control, using Spreadsheet1.Workbook.DisplayWorkbookTabs = False
This is a WinForm project

Visual Studio 2017 V.15.9.3
SpreadSheet V.


1 Reply

DY Deivaselvan Y Syncfusion Team December 4, 2018 06:11 AM

Hi Jack, 

Thanks for using Syncfusion products. 

To hide the TabBarPage in SpreadSheet control, you could use the TabBarPage.Visible and TabBarSplitterControl.RelativeWidth property in WorkbookLoaded event. Please refer the following code example and the sample, 

Code example 
AddHandler Me.spreadsheet.WorkbookLoaded, AddressOf Spreadsheet_WorkbookLoaded 
Private Sub Spreadsheet_WorkbookLoaded(ByVal sender As Object, ByVal args As Syncfusion.Windows.Forms.Spreadsheet.Helpers.WorkbookLoadedEventArgs) 
                Dim tabcontrol = TryCast(spreadsheet.Controls(0), TabBarSplitterControl) 
                tabcontrol.ShowAddNewTabBarPageOption = False 
                For Each tabitem In tabcontrol.TabBarPages 
                                TryCast(tabitem, TabBarPage).Visible = False 
                Next tabitem 
              tabcontrol.RelativeWidth = 0 
End Sub 
Sheet has displayed while loading the spreadsheet then sheet will be getting hided. To avoid this behavior, you could disable the spreadsheet visibility in constructor and then enable the visibility in Form.Shown event. Please refer the following code example, 
Code example 
Me.spreadsheet.Visible = False 
AddHandler Me.Shown, AddressOf Form1_Shown 
Private Sub Form1_Shown(ByVal sender As Object, ByVal e As EventArgs) 
                Me.spreadsheet.Visible = True 
End Sub 

Please let us know if you need any further assistance on this. 


Live Chat Icon For mobile
Up arrow icon