accessibility for a blinds users on my project
I have a problem with the treelist on windows o.s., I can't see the treelist on the main window of the program.
I inserted the sizer in this program but I can't see it, I see only the window with the menu bar at the top and I see the status bar at the bottom.
Below the myframe function of the program "minimal.cpp" modified.
Code: Select all
// frame constructor
MyFrame::MyFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title)
{
// set the frame icon
SetIcon(wxICON(sample));
#if wxUSE_MENUS
// create a menu bar
wxMenu *fileMenu = new wxMenu;
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
helpMenu->Append(Minimal_About, "&About\tF1", "Show about dialog");
fileMenu->Append(Minimal_Quit, "E&xit\tAlt-X", "Quit this program");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(fileMenu, "&File");
menuBar->Append(helpMenu, "&Help");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
SetStatusText("Welcome to wxWidgets!");
#endif // wxUSE_STATUSBAR
wxPanel *panel = new wxPanel(this, wxID_ANY);
m_treelist = new wxTreeListCtrl( panel, wxID_ANY, wxPoint(10,10), wxSize(300,400), wxTL_SINGLE );
m_treelist->AppendColumn("First column",
wxCOL_WIDTH_AUTOSIZE,
wxALIGN_LEFT,
wxCOL_RESIZABLE | wxCOL_SORTABLE);
wxTreeListItem root = m_treelist->GetRootItem();
wxTreeListItem treelistitem[5];
treelistitem[0] = m_treelist->AppendItem(root, "item alpha" );
treelistitem[1] = m_treelist->AppendItem(root, "item bravo" );
treelistitem[2] = m_treelist->AppendItem( root, "item charlie" );
treelistitem[3] = m_treelist->AppendItem(root, "item delta" );
#if wxUSE_ACCESSIBILITY
m_treelist->SetAccessible( new MyListBoxAccessible(m_treelist) );
#endif
wxSizer* sizertreelist = new wxBoxSizer(wxVERTICAL);
sizertreelist->Add(m_treelist, wxSizerFlags(0).Expand());
SetSizer(sizertreelist);
}
marco_84