]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/progdlgg.cpp
don't access inexistent column in wxDataViewTreeCtrl::OnSize() (this bug also probabl...
[wxWidgets.git] / src / generic / progdlgg.cpp
index 25a42355ae779be7ce2db4b41e097af304ee5b7a..d286409ab9b44e9c93ef7434631bc33893a52e86 100644 (file)
@@ -148,7 +148,6 @@ wxProgressDialog::wxProgressDialog(const wxString& title,
     m_msg = new wxStaticText(this, wxID_ANY, message);
     sizerTop->Add(m_msg, 0, wxLEFT | wxTOP, 2*LAYOUT_MARGIN);
 
-    wxSize sizeLabel = m_msg->GetSize();
     if ( maximum > 0 )
     {
         int gauge_style = wxGA_HORIZONTAL;
@@ -488,6 +487,25 @@ bool wxProgressDialog::Show( bool show )
     return wxDialog::Show(show);
 }
 
+int wxProgressDialog::GetValue() const
+{
+    if (m_gauge)
+        return m_gauge->GetValue();
+    return wxNOT_FOUND;
+}
+
+int wxProgressDialog::GetRange() const
+{
+    if (m_gauge)
+        return m_gauge->GetRange();
+    return wxNOT_FOUND;
+}
+
+wxString wxProgressDialog::GetMessage() const
+{
+    return m_msg->GetLabel();
+}
+
 // ----------------------------------------------------------------------------
 // event handlers
 // ----------------------------------------------------------------------------
@@ -650,6 +668,8 @@ void wxProgressDialog::UpdateMessage(const wxString &newmsg)
     {
         m_msg->SetLabel(newmsg);
 
+        Fit();   // adapt to the new label size
+
         wxYieldIfNeeded() ;
     }
 }