wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
-
+
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
if ( m_windowStyle & wxSL_LABELS )
{
- msStyle |= SS_CENTER;
+ msStyle |= SS_CENTER|WS_VISIBLE;
WXDWORD exStyle = 0;
long valueStyle = m_windowStyle & ~wxBORDER_MASK;
(int) min_len, cy, TRUE);
y_offset += cy;
- // slider_length = (total height available) - (height used so far)
+ // slider_length = (total height available) - (height used so far)
// - (height of max label) - (border)
int slider_length = (int)(h1 - (y_offset-y) - cy - cy);
{
wxSize rv;
wxChar buf[300];
- int cx;
+ int cx;
int cy;
int cyf;
int min_len = 0;
int max_len = 0;
-
+
wxGetCharSize(GetHWND(), &cx, &cy, this->GetFont());
-
+
if ( !HasFlag(wxSL_VERTICAL))
{
rv = wxSize(100, 20); // default size for the slider itself
-
+
if (HasFlag(wxSL_LABELS)) // do we need to add more for the labels?
{
::GetWindowText((HWND) m_staticMin, buf, 300);
{
int new_width = (int)(wxMax(min_len, max_len));
int valueHeight = (int)cyf;
-
+
#ifdef __WIN32__
// For some reason, under Win95, the text edit control has
// a lot of space before the first character
::GetWindowText((HWND) m_staticMax, buf, 300);
GetTextExtent(buf, &max_len, &cyf);
rv.y += cy;
-
+
if (m_staticValue)
{
int new_width = (int)(wxMax(min_len, max_len));
valueHeight = (int) (valueHeight * 1.5) ;
rv.y += valueHeight;
rv.x = wxMax(new_width, rv.x);
- }
+ }
}
}
return rv;
{
wxWindow::Show(show);
- int cshow;
- if (show)
- cshow = SW_SHOW;
- else
- cshow = SW_HIDE;
+ int cshow = show ? SW_SHOW : SW_HIDE;
if(m_staticValue)
- ShowWindow((HWND) m_staticValue, (BOOL)cshow);
+ ShowWindow((HWND) m_staticValue, cshow);
if(m_staticMin)
- ShowWindow((HWND) m_staticMin, (BOOL)cshow);
+ ShowWindow((HWND) m_staticMin, cshow);
if(m_staticMax)
- ShowWindow((HWND) m_staticMax, (BOOL)cshow);
+ ShowWindow((HWND) m_staticMax, cshow);
return true;
}