Search code examples
cross-platformtabswxwidgetswxnotebook

wxNotebook Close Button?


I'm developing a notepad app using wxWidgets (the C++ version) and I'm working on implementing multi-file support. Using the wxNotebook class, I can't seem to find any documentation on adding a close button to the pages so I can easily close individual files. Is there a cross-platform way to enable this using the class itself? If not, what ways do you recommend that I go about adding said button to a wxNotebook page?

Thanks


Solution

  • You have two alternatives;

    1. wxAuiNotebook which is part of wxwidgets distribution, so you can use it directly.
    2. wxFlatNotebook which is a cool alternative as a contibution. You can find it here

    I had to made a choice between the two yesterday. In Windows / VS2008 platform, installing wxFlatNotebook was very difficult, you have to build its lib, which gave me a set of errors, so I settlet with wxAuiNotebook although wxFlatNotebook has some really nice visual enhancements.