Compile fix (VC++ 6 doesn't like wxString::Format with only 1 arg: gives several pages of template-related warnings)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
bbf941bda9
commit
f196316400
@ -129,12 +129,12 @@ public:
|
||||
{
|
||||
wxLogMessage(_T("Listbox item %d double clicked."), event.GetInt());
|
||||
}
|
||||
|
||||
|
||||
void OnHtmlLinkClicked(wxHtmlLinkEvent& event);
|
||||
void OnHtmlCellHover(wxHtmlCellEvent &event);
|
||||
void OnHtmlCellClicked(wxHtmlCellEvent &event);
|
||||
|
||||
wxSimpleHtmlListBox *GetSimpleBox()
|
||||
wxSimpleHtmlListBox *GetSimpleBox()
|
||||
{ return wxDynamicCast(m_hlbox, wxSimpleHtmlListBox); }
|
||||
MyHtmlListBox *GetMyBox()
|
||||
{ return wxDynamicCast(m_hlbox, MyHtmlListBox); }
|
||||
@ -238,9 +238,9 @@ MyFrame::MyFrame()
|
||||
#if wxUSE_MENUS
|
||||
// create a menu bar
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
menuFile->AppendRadioItem(HtmlLbox_CustomBox, _T("Use custom box"),
|
||||
menuFile->AppendRadioItem(HtmlLbox_CustomBox, _T("Use custom box"),
|
||||
_T("Use a wxHtmlListBox virtual class control"));
|
||||
menuFile->AppendRadioItem(HtmlLbox_SimpleBox, _T("Use simple box"),
|
||||
menuFile->AppendRadioItem(HtmlLbox_SimpleBox, _T("Use simple box"),
|
||||
_T("Use a wxSimpleHtmlListBox control"));
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->Append(HtmlLbox_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
|
||||
@ -288,7 +288,7 @@ MyFrame::MyFrame()
|
||||
CreateStatusBar(2);
|
||||
SetStatusText(_T("Welcome to wxWidgets!"));
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
|
||||
// create the child controls
|
||||
CreateBox();
|
||||
wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY, _T(""),
|
||||
@ -321,7 +321,7 @@ void MyFrame::CreateBox()
|
||||
{
|
||||
m_hlbox = new wxSimpleHtmlListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
0, NULL, multi ? wxLB_MULTIPLE : 0);
|
||||
|
||||
|
||||
// unlike wxHtmlListBox which is abstract, wxSimpleHtmlListBox is a
|
||||
// concrete control and doesn't support virtual mode, this we need
|
||||
// to add all of its items from the beginning
|
||||
@ -354,12 +354,12 @@ void MyFrame::CreateBox()
|
||||
void MyFrame::OnSimpleOrCustomBox(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxWindow *old = m_hlbox;
|
||||
|
||||
|
||||
// we need to recreate the listbox
|
||||
CreateBox();
|
||||
GetSizer()->Replace(old, m_hlbox);
|
||||
delete old;
|
||||
|
||||
|
||||
GetSizer()->Layout();
|
||||
Refresh();
|
||||
}
|
||||
@ -401,7 +401,7 @@ void MyFrame::OnSetMargins(wxCommandEvent& WXUNUSED(event))
|
||||
void MyFrame::OnToggleMulti(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxWindow *old = m_hlbox;
|
||||
|
||||
|
||||
// we need to recreate the listbox
|
||||
CreateBox();
|
||||
GetSizer()->Replace(old, m_hlbox);
|
||||
@ -575,7 +575,7 @@ wxString MyHtmlListBox::OnGetItem(size_t n) const
|
||||
{
|
||||
if ( !n && m_firstItemUpdated )
|
||||
{
|
||||
return wxString::Format(_T("<h1><b>Just updated</b></h1>"));
|
||||
return _T("<h1><b>Just updated</b></h1>");
|
||||
}
|
||||
|
||||
#ifdef USE_HTML_FILE
|
||||
|
Loading…
Reference in New Issue
Block a user