Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 826
Nicholas Flynt Avatar asked Mar 24 '09 17:03

Nicholas Flynt


2 Answers

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.

like image 176
mentat Avatar answered Oct 16 '22 08:10

mentat


If you need a close button then you should use wxFlatNotebook or wxAuiNotebook. wxFlatNotebook can be found at wxForum

like image 43
T-Rex Avatar answered Oct 16 '22 09:10

T-Rex