minor changes here and there
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -175,6 +175,7 @@ void MyFrame::ChooseColour(wxCommandEvent& WXUNUSED(event) )
|
||||
}
|
||||
|
||||
wxColourDialog *dialog = new wxColourDialog(this, &data);
|
||||
dialog->SetTitle("Choose the background colour");
|
||||
if (dialog->ShowModal() == wxID_OK)
|
||||
{
|
||||
wxColourData retData = dialog->GetColourData();
|
||||
@@ -609,6 +610,11 @@ void MyModalDialog::OnButton(wxCommandEvent& event)
|
||||
|
||||
m_btnDelete->Disable();
|
||||
}
|
||||
else if ( event.GetEventObject() == m_btnFocused )
|
||||
{
|
||||
wxGetTextFromUser("Dummy prompt", "Modal dialog called from dialog",
|
||||
"", this);
|
||||
}
|
||||
else
|
||||
{
|
||||
event.Skip();
|
||||
|
@@ -411,8 +411,8 @@ void MyFrame::OnAppendSubMenu(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
wxMenu *menu = menubar->GetMenu(menubar->GetMenuCount() - 1);
|
||||
|
||||
menu->Append(Menu_Dummy_Last, "Dummy sub menu\tCtrl-F2",
|
||||
CreateDummyMenu(NULL));
|
||||
menu->Append(Menu_Dummy_Last, "Dummy sub menu",
|
||||
CreateDummyMenu(NULL), "Dummy sub menu help");
|
||||
}
|
||||
|
||||
void MyFrame::OnDeleteMenuItem(wxCommandEvent& WXUNUSED(event))
|
||||
|
@@ -544,6 +544,10 @@ void MyTextCtrl::OnKeyDown(wxKeyEvent& event)
|
||||
case WXK_F6:
|
||||
SetValue("F6 was just pressed.");
|
||||
break;
|
||||
|
||||
case WXK_F7:
|
||||
ShowPosition(10);
|
||||
break;
|
||||
}
|
||||
|
||||
LogEvent( wxT("Key down"), event);
|
||||
@@ -634,9 +638,12 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
||||
m_enter->SetClientData((void *)_T("enter"));
|
||||
|
||||
m_textrich = new MyTextCtrl(this, -1, "Allows more than 30Kb of text\n"
|
||||
"(even under broken Win9x)",
|
||||
"(even under broken Win9x)\n"
|
||||
"and a very very very very very "
|
||||
"very very very long line to test"
|
||||
"wxHSCROLL style",
|
||||
wxPoint(450, 10), wxSize(200, 230),
|
||||
wxTE_RICH | wxTE_MULTILINE);
|
||||
wxTE_RICH | wxTE_MULTILINE | wxHSCROLL);
|
||||
}
|
||||
|
||||
void MyPanel::OnSize( wxSizeEvent &event )
|
||||
|
@@ -431,7 +431,18 @@ void MyFrame::OnSetImageSize(wxCommandEvent& event)
|
||||
|
||||
void MyFrame::OnToggleImages(wxCommandEvent& event)
|
||||
{
|
||||
wxGetApp().SetShowImages(!wxGetApp().ShowImages());
|
||||
if ( wxGetApp().ShowImages() )
|
||||
{
|
||||
m_treeCtrl->CreateImageList(-1);
|
||||
|
||||
wxGetApp().SetShowImages(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_treeCtrl->CreateImageList();
|
||||
|
||||
wxGetApp().SetShowImages(TRUE);
|
||||
}
|
||||
|
||||
OnRecreate(event);
|
||||
}
|
||||
@@ -525,10 +536,9 @@ void MyTreeCtrl::CreateImageList(int size)
|
||||
if ( size == -1 )
|
||||
{
|
||||
m_imageListNormal = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
// Make an image list containing small icons
|
||||
m_imageListNormal = new wxImageList(size, size, TRUE);
|
||||
|
||||
@@ -539,7 +549,7 @@ void MyTreeCtrl::CreateImageList(int size)
|
||||
m_imageListNormal->Add(wxBitmap("bitmap3", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap4", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
m_imageListNormal->Add(wxBitmap("bitmap5", wxBITMAP_TYPE_BMP_RESOURCE));
|
||||
#else
|
||||
#else // !MSW
|
||||
wxIcon icons[5];
|
||||
icons[0] = wxICON(icon1);
|
||||
icons[1] = wxICON(icon2);
|
||||
@@ -560,7 +570,8 @@ void MyTreeCtrl::CreateImageList(int size)
|
||||
ConvertToBitmap());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // MSW/!MSW
|
||||
}
|
||||
|
||||
SetImageList(m_imageListNormal);
|
||||
}
|
||||
|
Reference in New Issue
Block a user