+
+ _grid = new wxGridBagSizer (DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
+ _sizer->Add (_grid, 0, wxALL, 8);
+}
+
+void
+ContentSubPanel::setup_refer_button (wxCheckBox* button, wxStaticText* note, shared_ptr<DCPContent> dcp, bool can_reference, wxString cannot)
+{
+ button->Enable (can_reference);
+
+ if (dcp && !can_reference) {
+ note->SetLabel (cannot);
+ } else {
+ note->SetLabel (wxT(""));
+ }
+
+ note->Wrap (400);
+
+ if (cannot.IsEmpty()) {
+ note->Hide ();
+ } else {
+ note->Show ();
+ }
+
+ layout ();
+}
+
+
+void
+ContentSubPanel::layout ()
+{
+ int x;
+ int y;
+ GetViewStart (&x, &y);
+ Scroll (0, 0);
+ _sizer->Layout ();
+ Scroll (x, y);