Hide wxSlider labels too when it's hidden in wxOSX
Derive wxSlider from wxCompositeWindow to ensure that Show() (and other methods) affect the slider labels as well. Closes #2388.
This commit is contained in:
@@ -193,3 +193,4 @@ wxOSX/Cocoa:
|
||||
- Implement strike-through support in wxFont (Igor Korot).
|
||||
- Provide native implementation of wxStandardPaths (Tobias Taschner).
|
||||
- Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl (Andreas Falkenhahn).
|
||||
- Don't leave wxSlider labels shown when the slider itself is hidden.
|
||||
|
@@ -11,10 +11,11 @@
|
||||
#ifndef _WX_SLIDER_H_
|
||||
#define _WX_SLIDER_H_
|
||||
|
||||
#include "wx/compositewin.h"
|
||||
#include "wx/stattext.h"
|
||||
|
||||
// Slider
|
||||
class WXDLLIMPEXP_CORE wxSlider: public wxSliderBase
|
||||
class WXDLLIMPEXP_CORE wxSlider: public wxCompositeWindow<wxSliderBase>
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxSlider);
|
||||
|
||||
@@ -100,6 +101,15 @@ protected:
|
||||
int m_lineSize;
|
||||
int m_tickFreq;
|
||||
private :
|
||||
virtual wxWindowList GetCompositeWindowParts() const wxOVERRIDE
|
||||
{
|
||||
wxWindowList parts;
|
||||
parts.push_back(m_macMinimumStatic);
|
||||
parts.push_back(m_macMaximumStatic);
|
||||
parts.push_back(m_macValueStatic);
|
||||
return parts;
|
||||
}
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user