标签:
void PropertyPanel::init() { messageWhenEmpty = TRANS("(nothing selected)"); addAndMakeVisible (viewport); viewport.setViewedComponent (propertyHolderComponent = new PropertyHolderComponent()); viewport.setFocusContainer (true); }
void PropertyPanel::resized() { viewport.setBounds (getLocalBounds()); updatePropHolderLayout(); }
void PropertyPanel::updatePropHolderLayout() const { const int maxWidth = viewport.getMaximumVisibleWidth(); propertyHolderComponent->updateLayout (maxWidth); const int newMaxWidth = viewport.getMaximumVisibleWidth(); if (maxWidth != newMaxWidth) { // need to do this twice because of scrollbars changing the size, etc. propertyHolderComponent->updateLayout (newMaxWidth); } }
标签:
原文地址:http://www.cnblogs.com/csxy/p/4855320.html