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

Cannot switch off 3D borders on MessageBox #1499

Closed
fergusonr opened this issue Oct 31, 2021 · 5 comments · Fixed by #1549
Closed

Cannot switch off 3D borders on MessageBox #1499

fergusonr opened this issue Oct 31, 2021 · 5 comments · Fixed by #1549

Comments

@fergusonr
Copy link
Contributor

fergusonr commented Oct 31, 2021

3D borders are now on by default. Can explicitly turn them off for a Dialog but not a MessageBox

@BDisp
Copy link
Collaborator

BDisp commented Oct 31, 2021

A Dialog is designed to appear on the top of another top-level. So, if no 3D border is needed, then a Window must be used, in my opinion.

@tznind
Copy link
Collaborator

tznind commented Oct 31, 2021

Has the border style changed between patches for MessageBox? If so we could add an overload to Show that takes a style parameter at the end?

Or add a static property to MessageBox class of BorderStyle which affects all dialogs shown?

@fergusonr
Copy link
Contributor Author

fergusonr commented Oct 31, 2021

Dialog and MessageBox have consistent default border styles (3D), but if I want to switch both off, I can do this with a Dialog, but there is no equivalent for MessageBox

var d = new Dialog ();
d.Border.Effect3D = false;

@tznind
Copy link
Collaborator

tznind commented Oct 31, 2021

MessageBox is a static Factory/helper class for Dialog:

https://github.com/migueldeicaza/gui.cs/blob/28580de3c57fe4fc03ddef157f4c4cc879a5bda0/Terminal.Gui/Windows/MessageBox.cs#L164

I think it would be a nice enhancement to expand these static functions to allow custom border style (i.e. 3d or line). But we don't want to break the existing API so would need to think of an elegant way (e.g. a new overloaded method or a static setting in the MessageBox class itself).

@BDisp
Copy link
Collaborator

BDisp commented Nov 1, 2021

Yes is true. This must be implemented without breaking anything. Thanks to both.

BDisp added a commit to BDisp/Terminal.Gui that referenced this issue Nov 2, 2021
@tig tig closed this as completed in 64b00e3 Nov 4, 2021
BDisp added a commit to BDisp/Terminal.Gui that referenced this issue Nov 12, 2021
BDisp added a commit to BDisp/Terminal.Gui that referenced this issue Nov 13, 2021
@tig tig mentioned this issue Dec 18, 2021
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 a pull request may close this issue.

3 participants