Search code examples
c++wxwidgets

How to get all wxListbook items?


I have a wxListbook that has some items, the following it is just a preview picture:

I want to get all item titles but before that, I want to get all items first then creating a for loop which in turn getting each item's title.

I found a method called GetListView() but it doesn't return array-like.

Is there a method to get all the items of that wxListbook?


Solution

  • wxListbook inherits from wxBookCtrlBase which defines GetPageCount() and GetPageText() methods that you can use to iterate over the pages and retrieve their labels, respectively.