Profile Picture

I want to disable CloseButton in a specific tab in NtabControl, how do I do it. Help please

Posted By emin coşkun 4 Years Ago

I want to disable CloseButton in a specific tab in NtabControl, how do...

Author
Message
emin coşkun
Posted 4 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 3, Visits: 18
hello I want to disable CloseButton in tabcontrol that I have selected but I can't succeed.My codes are as follows and I write to NTabControl1_SelectedTabChanged event, but when I hover over the tab with the mouse, CloseButton appears.I do not want the tab to appear when I hover over the tab. It does not appear when I select the tab, but it does appear when I hover over the tab with the mouse.
Private Sub NTabControl1_SelectedTabChanged(sender As Object, e As EventArgs) Handles NTabControl1.SelectedTabChanged
   For Each page As NTabPage In NTabControl1.TabPages
    If (page.Text = tab1.Text) Then
      NTabControl1.HasClose = False
    ElseIf (page.Text = NTabControl1.SelectedTab.Text) Then
      NTabControl1.HasClose = True
    End If
   Next
  End Sub[/code]



emin coşkun
Posted 4 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 3, Visits: 18
With this code, only when that tab is selected, closebutton is passive. Please I am waiting for help from friends who know.When you mouse over the tab I want, closebutton does not appear in the tab I have determined.but I couldn't achieve this closebutton does not appear when the tab is selected, but when I mouse over it, closebutton appears.thanks

Nevron Support
Posted 4 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 6 hours ago
Posts: 3,054, Visits: 3,991
Hello Emin,

You can set NTabControl.ShowCloseOnEachTab property to true. This way the close button will appear on each tab, and this way when the tab is disabled the user won't be able to close it.

Best Regards,
Nevron Support Team



emin coşkun
Posted 4 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 3, Visits: 18
I did it the way you said, but in passive tab when mouse over it, closebutton appears again.When you mouse over the tab while the passive tab I want is not selected, closebutton does not appear in the passive tab.could you please share a code about this.Another one is that I can't remove the focus rectangle in the selected tab. I would be glad if you share a code about it.thanks.

Nevron Support
Posted 4 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 6 hours ago
Posts: 3,054, Visits: 3,991
Hello Emin,

You can prevent showing the close button only on disabled tabs. The enabled and tabs that are not selected the close button is always shown.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic