{
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); }
#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"));
CreateStatusBar(2);
SetStatusText(_T("Welcome to wxWidgets!"));
#endif // wxUSE_STATUSBAR
-
+
// create the child controls
CreateBox();
wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY, _T(""),
{
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
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();
}
void MyFrame::OnToggleMulti(wxCommandEvent& WXUNUSED(event))
{
wxWindow *old = m_hlbox;
-
+
// we need to recreate the listbox
CreateBox();
GetSizer()->Replace(old, m_hlbox);
{
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