From: Vadim Zeitlin Date: Sun, 11 Dec 2011 23:51:14 +0000 (+0000) Subject: Document that setting colours for native controls might not work. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bf799728943dc2c2ad429c0eb25be49b6a1ad6ee?ds=sidebyside Document that setting colours for native controls might not work. Changing colours of the native controls can't be relied on. See #13745. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/wx/window.h b/interface/wx/window.h index 192ce514f6..dff00d5560 100644 --- a/interface/wx/window.h +++ b/interface/wx/window.h @@ -1697,13 +1697,18 @@ public: /** Sets the background colour of the window. + + Notice that as with SetForegroundColour(), setting the background + colour of a native control may not affect the entire control and could + be not supported at all depending on the control and platform. + Please see InheritAttributes() for explanation of the difference between this method and SetOwnBackgroundColour(). @param colour The colour to be used as the background colour; pass wxNullColour to reset to the default colour. - Note that you may want to use wxSystemSettings::GetColour() to retrieve + Note that you may want to use wxSystemSettings::GetColour() to retrieve a suitable colour to use rather than setting an hard-coded one. @remarks The background colour is usually painted by the default @@ -1780,6 +1785,13 @@ public: /** Sets the foreground colour of the window. + + The meaning of foreground colour varies according to the window class; + it may be the text colour or other colour, or it may not be used at + all. Additionally, not all native controls support changing their + foreground colour so this method may change their colour only partially + or even not at all. + Please see InheritAttributes() for explanation of the difference between this method and SetOwnForegroundColour(). @@ -1787,9 +1799,6 @@ public: The colour to be used as the foreground colour; pass wxNullColour to reset to the default colour. - @remarks The meaning of foreground colour varies according to the window class; - it may be the text colour or other colour, or it may not be used at all. - @return @true if the colour was really changed, @false if it was already set to this colour and nothing was done.