]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/vscroll.cpp
test popup menu help strings
[wxWidgets.git] / src / generic / vscroll.cpp
index e7cb8cfa06c9d7d4afc6747edbefbff5bd735dbd..5d2ccf0cb63b1255110b49dc31896868b4020973 100644 (file)
@@ -164,8 +164,8 @@ void wxVScrolledWindow::SetLineCount(size_t count)
                                    count/2 + NUM_LINES_TO_SAMPLE/2);
 
         // use the height of the lines we looked as the average
-        m_heightTotal = ((float)m_heightTotal / (3*NUM_LINES_TO_SAMPLE)) *
-                            m_lineMax;
+        m_heightTotal = (wxCoord)
+                (((float)m_heightTotal / (3*NUM_LINES_TO_SAMPLE)) * m_lineMax);
     }
 
 
@@ -196,6 +196,13 @@ void wxVScrolledWindow::RefreshLine(size_t line)
     RefreshRect(rect);
 }
 
+void wxVScrolledWindow::RefreshAll()
+{
+    UpdateScrollbar();
+
+    Refresh();
+}
+
 int wxVScrolledWindow::HitTest(wxCoord WXUNUSED(x), wxCoord y) const
 {
     const size_t lineMax = GetLastVisibleLine();
@@ -354,5 +361,9 @@ void wxVScrolledWindow::OnScroll(wxScrollWinEvent& event)
     }
 
     ScrollToLine(lineFirstNew);
+
+#ifdef __WXMAC__
+    Update();
+#endif // __WXMAC__
 }