+ int n = wxThePrintPaperDatabase->Number();
+ wxString *choices = new wxString [n];
+ int i;
+ for (i = 0; i < n; i++)
+ {
+ wxPrintPaperType *paper = (wxPrintPaperType *)wxThePrintPaperDatabase->Nth(i)->Data();
+ choices[i] = paper->GetName();
+ }
+
+ m_paperTypeChoice = new wxComboBox(this, wxPRINTID_PAPERSIZE, _("Paper Size"),
+ wxDefaultPosition, wxSize(300, -1), n, choices);
+ topsizer->Add( m_paperTypeChoice, 1, wxEXPAND|wxALL, 5 );
+// m_paperTypeChoice->SetSelection(sel);
+
+ mainsizer->Add( topsizer, 0, wxTOP|wxLEFT|wxRIGHT | wxEXPAND, 10 );
+
+ // 2) middle sizer with radio box
+
+ wxString *choices2 = new wxString[2];
+ choices2[0] = _("Portrait");
+ choices2[1] = _("Landscape");
+ m_orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"),
+ wxDefaultPosition, wxDefaultSize, 2, choices2, 2);
+ m_orientationRadioBox->SetSelection(0);
+
+ mainsizer->Add( m_orientationRadioBox, 0, wxTOP|wxLEFT|wxRIGHT, 10 );
+
+ // 3) margins
+
+ wxBoxSizer *table = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer *column1 = new wxBoxSizer( wxVERTICAL );
+ column1->Add( new wxStaticText(this, wxPRINTID_STATIC, _("Left margin (mm):")),1,wxALL|wxALIGN_RIGHT,5 );
+ column1->Add( new wxStaticText(this, wxPRINTID_STATIC, _("Top margin (mm):")),1,wxALL|wxALIGN_RIGHT,5 );
+ table->Add( column1, 0, wxALL | wxEXPAND, 5 );
+
+ wxBoxSizer *column2 = new wxBoxSizer( wxVERTICAL );
+ m_marginLeftText = new wxTextCtrl(this, wxPRINTID_LEFTMARGIN, "", wxDefaultPosition, wxSize(textWidth, -1));
+ m_marginTopText = new wxTextCtrl(this, wxPRINTID_TOPMARGIN, "", wxDefaultPosition, wxSize(textWidth, -1));
+ column2->Add( m_marginLeftText, 1, wxALL, 5 );
+ column2->Add( m_marginTopText, 1, wxALL, 5 );
+ table->Add( column2, 0, wxRIGHT|wxTOP|wxBOTTOM | wxEXPAND, 5 );