Skip to content

Make FileDialog (v2) more customizible for buttons #2859

@tznind

Description

@tznind

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions