- // list box
- m_lbStrings = new wxListBox(this, 24, wxDefaultPosition, wxDefaultSize);
- unsigned int i;
- for ( i=0; i<ArrayGetCount(); i++ )
- m_lbStrings->Append( ArrayGet(i) );
- rowsizer->Add( m_lbStrings, 1, wxEXPAND|wxRIGHT, spacing );
-
- // Manipulator buttons
- wxBoxSizer* colsizer = new wxBoxSizer( wxVERTICAL );
- m_butCustom = NULL;
- if ( m_custBtText )
- {
- m_butCustom = new wxButton(this,28,::wxGetTranslation(m_custBtText));
- colsizer->Add( m_butCustom,
- 0, wxALIGN_CENTER|wxTOP/*wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT*/,
- spacing );
- }
- m_butUpdate = new wxButton(this,27,_("Update"));
- colsizer->Add( m_butUpdate,
- 0, wxALIGN_CENTER|wxTOP, spacing );
- m_butRemove = new wxButton(this,23,_("Remove"));
- colsizer->Add( m_butRemove,
- 0, wxALIGN_CENTER|wxTOP, spacing );
- m_butUp = new wxButton(this,25,_("Up"));
- colsizer->Add( m_butUp,
- 0, wxALIGN_CENTER|wxTOP, spacing );
- m_butDown = new wxButton(this,26,_("Down"));
- colsizer->Add( m_butDown,
- 0, wxALIGN_CENTER|wxTOP, spacing );
- rowsizer->Add( colsizer, 0, 0, spacing );
-
- topsizer->Add( rowsizer, 1, wxLEFT|wxRIGHT|wxEXPAND, spacing );
-
- // Separator line
- topsizer->Add( new wxStaticLine(this,-1),
- 0, wxEXPAND|wxTOP|wxLEFT|wxRIGHT, spacing );
+ but = m_elb->GetUpButton();
+ but->Connect(but->GetId(), wxEVT_BUTTON,
+ wxCommandEventHandler(wxPGArrayEditorDialog::OnUpClick),
+ NULL, this);
+
+ but = m_elb->GetDownButton();
+ but->Connect(but->GetId(), wxEVT_BUTTON,
+ wxCommandEventHandler(wxPGArrayEditorDialog::OnDownClick),
+ NULL, this);
+
+ lc->Connect(lc->GetId(), wxEVT_LIST_END_LABEL_EDIT,
+ wxListEventHandler(wxPGArrayEditorDialog::OnEndLabelEdit),
+ NULL, this);
+
+ topsizer->Add( m_elb, 1, wxEXPAND, spacing );