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

Make FileDialog (v2) more customizible for buttons #2859

Closed
tznind opened this issue Sep 15, 2023 · 2 comments
Closed

Make FileDialog (v2) more customizible for buttons #2859

tznind opened this issue Sep 15, 2023 · 2 comments

Comments

@tznind
Copy link
Collaborator

tznind commented Sep 15, 2023

Lets's make FileDialog more customizible for buttons. I suggest adding to the constructor the label for Cancel button and the ability to change the order of the buttons ([ Cancel ][ Open ] -> [ Open ][ Cancel ] -> [ Open ][ Done ]):
`..., ustring prompt, ustring cancel, bool buttonsReverseOrder,...'
[...]
And the ability to change the order of the buttons ([ Wait no! ][ Lets go! ] -> [ Lets go! ][ Wait no! ])
// does not exist
// fd.Style.ButtonsReverseOrder = true;

@Likarion

I'm a fan of making it more customizable but not via a constructor. Constructors should be parameter-less.
@tig

Most of what you describe can be accomplished with the Style class. But there are improvements that could be made. I've put what works at the top of this code sample and what we could enable in the bottom (in comments).

fd.Style.OkButtonText = "Lets go!";
fd.Style.ModifiedColumnName = "Date";
fd.Title = "Blerg";

// does not exist
// fd.Style.OkCancelText = "Wait no!";

// currently has internal setters (so you cannot do this).  Also needs slight adjustment
// in order of initialization so user changes would take effect
//fd.Style.PathCaption = "Pick a file";
//fd.Style.SearchCaption = "Find yer stuff";

image
FileDialog with custom title, ok message and table column name

Originally posted by @tznind in #2259 (comment)

@tznind tznind changed the title > Lets's make FileDialog more customizible for buttons. I suggest adding to the constructor the label for Cancel button and the ability to change the order of the buttons ([ Cancel ][ Open ] -> [ Open ][ Cancel ] -> [ Open ][ Done ]): Make FileDialog (v2) more customizible for buttons Sep 15, 2023
@tznind
Copy link
Collaborator Author

tznind commented Sep 21, 2023

@Likarion please can you confirm that the linked PR #2863 exposes all the settings you are wanting.

Also it is worth noting that the Path and Search strings are setup for localization (default values are in strings.resx) so those can also be changed there if it is a language thing (i.e. by creating a localized language resx file).

@Likarion
Copy link

Everything's good! Thanks!

@tig tig closed this as completed Sep 29, 2023
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

No branches or pull requests

3 participants