Allow using custom labels for wxGenericMessageDialog buttons.
Custom labels set for wxGenericMessageDialog buttons were simply ignored as it used CreateSeparatedButtonSizer() to create the actual buttons which in turn always used the standard labels. Fix this by explicitly creating the buttons with custom labels if necessary. This also fixes custom label support in wxGenericRichMessageDialog deriving from this class. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -242,6 +242,16 @@ protected:
|
||||
var = label.GetAsString();
|
||||
}
|
||||
|
||||
// these functions return the custom label or empty string and should be
|
||||
// used only in specific circumstances such as creating the buttons with
|
||||
// these labels (in which case it makes sense to only use a custom label if
|
||||
// it was really given and fall back on stock label otherwise), use the
|
||||
// Get{Yes,No,OK,Cancel}Label() methods above otherwise
|
||||
const wxString& GetCustomYesLabel() const { return m_yes; }
|
||||
const wxString& GetCustomNoLabel() const { return m_no; }
|
||||
const wxString& GetCustomOKLabel() const { return m_ok; }
|
||||
const wxString& GetCustomCancelLabel() const { return m_cancel; }
|
||||
|
||||
private:
|
||||
// these functions may be overridden to provide different defaults for the
|
||||
// default button labels (this is used by wxGTK)
|
||||
|
Reference in New Issue
Block a user