Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added basic "dont display closer on first N tabs" #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

soyware
Copy link

@soyware soyware commented Jul 22, 2019

No description provided.

@rlktradewright
Copy link
Contributor

Can you please provide some justification for this? For example, one or more specific use cases.

@soyware
Copy link
Author

soyware commented Jul 22, 2019

You may want to use first tab as a main tab which opens other tabs in the same tabcontrol

@wmjordan
Copy link

wmjordan commented Mar 8, 2021

I vote for this PR too.
The same reason as @h1ru5 .

@rlktradewright
Copy link
Contributor

Sorry for not responding to this when it was first raised.

I'm not able to envisage a situation where I would find this an acceptable UI design.

So I'd still like to hear of a specific use case that couldn't be carried out better by a more effective design.

Having said that, I can certainly see a case for disabling the closer on a per-tab basis, rather like the 'Pin this tab' functionality in Visual Studio. But that is a more difficult development.

@wmjordan
Copy link

wmjordan commented Mar 9, 2021

Hmm, if it is possible to hide a certain close buttons in specific tabs, that will be better.

@wmjordan
Copy link

wmjordan commented Mar 12, 2021

@h1ru5
The drag&drop function of tabs is broken due to issue #7. Once it is fixed, your solution might be broken if a user drags and reorders the tabs. The last one can become the first.

The way to go is providing a method to control the visibility of close buttons for each tab.

@larudev
Copy link

larudev commented Dec 1, 2022

I have a set of changes that adds an IExtenderProvider implementation which provides a CanClose property on each tab page (with designer support), plus modifications to TabControlExtra to use those properties to suppress the close button on each tab if that extender property is defined and set to false. Having a per-tab, optional close button is a feature of tab controls in a number of other (not winforms) frameworks - it's definitely useful to have. If there is interest I can produce a PR with those changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants