- wxMemoryDC temp_dc;
- wxSize size;
- long direction;
- if(GetMajorAxis() == wxHORIZONTAL)
- {
- direction = wxRIBBON_SCROLL_BTN_RIGHT;
- size = m_art->GetScrollButtonMinimumSize(temp_dc, GetParent(), direction);
- size.SetHeight(GetSize().GetHeight());
- }
- else
- {
- direction = wxRIBBON_SCROLL_BTN_DOWN;
- size = m_art->GetScrollButtonMinimumSize(temp_dc, GetParent(), direction);
- size.SetWidth(GetSize().GetWidth());
- }
- wxPoint initial_pos = GetPosition() + GetSize() - size;
- m_scroll_right_btn = new wxRibbonPageScrollButton(this, wxID_ANY, initial_pos, size, direction);
- if(!IsShown())
- {
- m_scroll_right_btn->Hide();
- }
- reposition = true;
+ direction = wxRIBBON_SCROLL_BTN_RIGHT;
+ size = m_art->GetScrollButtonMinimumSize(temp_dc, GetParent(), direction);
+ size.SetHeight(GetSize().GetHeight());
+ }
+ else
+ {
+ direction = wxRIBBON_SCROLL_BTN_DOWN;
+ size = m_art->GetScrollButtonMinimumSize(temp_dc, GetParent(), direction);
+ size.SetWidth(GetSize().GetWidth());
+ }
+ wxPoint initial_pos = GetPosition() + GetSize() - size;
+ if (m_scroll_right_btn)
+ {
+ m_scroll_right_btn->SetSize(size);
+ }
+ else
+ {
+ m_scroll_right_btn = new wxRibbonPageScrollButton(this, wxID_ANY, initial_pos, size, direction);
+ reposition = true;
+ }
+ if(!IsShown())
+ {
+ m_scroll_right_btn->Hide();