Skip to content

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

Open
soyware wants to merge 2 commits into
tradewright:masterfrom
soyware:master
Open

added basic "dont display closer on first N tabs"#5
soyware wants to merge 2 commits into
tradewright:masterfrom
soyware:master

Conversation

@soyware

@soyware soyware commented Jul 22, 2019

Copy link
Copy Markdown

No description provided.

@rlktradewright

Copy link
Copy Markdown
Contributor

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

@soyware

soyware commented Jul 22, 2019

Copy link
Copy Markdown
Author

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

@wmjordan

wmjordan commented Mar 8, 2021

Copy link
Copy Markdown

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

@rlktradewright

Copy link
Copy Markdown
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

wmjordan commented Mar 9, 2021

Copy link
Copy Markdown

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

@wmjordan

wmjordan commented Mar 12, 2021

Copy link
Copy Markdown

@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

larudev commented Dec 1, 2022

Copy link
Copy Markdown

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