X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/11f4a34413ae1495a9ca2c812b00da86d90eee25..adfa6f1a48e0b22e06a7626198a28c240cc94cf3:/src/palmos/radiobox.cpp diff --git a/src/palmos/radiobox.cpp b/src/palmos/radiobox.cpp index 1031b08ccb..a82b1e6f6f 100644 --- a/src/palmos/radiobox.cpp +++ b/src/palmos/radiobox.cpp @@ -233,7 +233,7 @@ wxRadioBox::~wxRadioBox() { } -wxRadioButton *wxRadioBox::GetRadioButton(int i) +wxRadioButton *wxRadioBox::GetRadioButton(int i) const { return (wxRadioButton *)m_radios.Get(i); } @@ -252,6 +252,10 @@ void wxRadioBox::DoGetSize( int *width, int *height ) const void wxRadioBox::DoMoveWindow(int x, int y, int width, int height) { + wxRect oldRect = GetRect(); + + m_pos.x = x; + m_pos.y = y; m_size.x = width; m_size.y = height; @@ -282,16 +286,22 @@ void wxRadioBox::DoMoveWindow(int x, int y, int width, int height) } } } + + // refresh old and new area + GetParent()->RefreshRect(oldRect.Union(GetRect())); } // get the origin of the client area in the client coordinates wxPoint wxRadioBox::GetClientAreaOrigin() const { - return GetParent()->GetClientAreaOrigin() + GetPosition(); + return GetPosition(); } void wxRadioBox::SetString(int item, const wxString& label) { + wxRadioButton *btn = GetRadioButton(item); + if(btn) + btn->SetLabel(label); } void wxRadioBox::SetSelection(int N) @@ -307,9 +317,10 @@ int wxRadioBox::GetSelection() const // Find string for position wxString wxRadioBox::GetString(int item) const { - wxString ret; - - return ret; + wxRadioButton *btn = GetRadioButton(item); + if(btn) + return btn->GetLabel(); + return wxEmptyString; } // ---------------------------------------------------------------------------- @@ -354,12 +365,22 @@ bool wxRadioBox::Enable(int item, bool enable) bool wxRadioBox::Show(bool show) { - return false; + for(int i=0; iShow(show); + RefreshRect(btn->GetRect()); + return ret; + } + return false; } wxString wxRadioBox::GetLabel() @@ -382,7 +403,7 @@ void wxRadioBox::Refresh(bool eraseBack, const wxRect *rect) area.SetSize(rect->GetSize()); } - GetParent()->Refresh( eraseBack , &area ); + GetParent()->RefreshRect(area); } void wxRadioBox::Command(wxCommandEvent & event)