wxPython: Change a buttons text in a wx.FileDialog
I have a wx.FileDialog (with the wx.FD_OPEN flag) & I would like to know if I can (& how) I could change the button in the bottom right of the FileDialog from "Open" to "Create" or "Delete", etc.
What I am doing is I have a button with the text "Delete Portfolio", when pressed it opens a FileDialog & allows th开发者_开发百科e user to select a portfolio file(.db) to delete. So instead of the File Dialog's bottom right confirm button displaying "Open" I would like to be able to change the text to "Confirm" or "Delete" or whatever.
Is this possible, its a rather superficial thing to do, but if the button says open when the user wants to select a file to delete, it can be a little confusing even if the title of the dialog says "please select a file to delete"
Yeah, I agree with Arafangion. wxPython uses the native widgets and can only manipulate them in whatever way that native widgets allow. You would need to create a custom dialog to do this.
If you are using the native controls, which wx tends to use, then you probably can't.
精彩评论