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

Hello,
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.16.3.0.21

Jack




1 Reply

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

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 
 
Note: 
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. 

Regards, 
Deivaselvan 


Loader.
Live Chat Icon For mobile
Up arrow icon