Example #1
1
void CJoinDialog::MoveSelectedItems(wxListBox& From, wxListBox& To)
{
	int i;
	wxString s;

	if (From.GetSelection() == -1) 
	{
		wxMessageBox(_("Nothing selected."),_T(""),wxICON_EXCLAMATION | wxOK);
	}
	for (i = 0; i < (int)From.GetCount(); ++i) 
	{
		if (From.IsSelected(i))
		{
			s = From.GetString(i);
			To.Append(s);
		}
	}
	for (i = (int)From.GetCount() - 1; i >= 0; --i) 
	{
		if (From.IsSelected(i)) 
		{
			From.Delete(i);
		}
	}
}
Example #2
-1
	void OnListItemSelected(wxCommandEvent& event)
	{
		int sel = m_listTemplate->GetSelection();
		if (sel < 0 || sel >= (int)m_projTempList->size())
		{
			m_curSel = -1;
			return;
		}

		m_curSel = sel;

		const luProjTemplate& templ = (*m_projTempList)[sel];

		m_imgPreview->SetBitmap(wxBitmap(templ.preview, wxBITMAP_TYPE_ANY));
		m_textDesc->SetLabelText(templ.desc);
		m_textTitle->SetLabelText(templ.title);

		//gkPrintf("%d", sel);
	}