"Out of window IDs" when building complex GUI

I have a somewhat complex interface to manage monthly employee attendance. It uses a Notebook with one page per person, and every page contains one custom widget per day (RowWidget), and every RowWidget contains about 20 input widgets.
This used to work, but in time more people were added, and now I’m getting the “Out of window IDs” message. Is it possibile to allow more window IDs without recompiling wx?
The alternative is to refactor the UI to use less widgets, I guess :slight_smile:

(wxPython 4.1.0 gtk3 (phoenix) wxWidgets 3.1.4)

If I run the following code using Python 3.10.6 + wxPython 4.2.0 gtk3 (phoenix) wxWidgets 3.2.0 on Linux Mint 21.1 it succeeds:

import wx
ids = wx.NewIdRef(29995)
print(len(ids))

However, if I increase the number to 29996, if generates the error:

11:48:07: Error: Out of window IDs.  Recommend shutting down application.

That is a lot of ids!

I would suggest that instead of trying to load all the data for all people into separate pages of a notebook, you have an interface with a listbox to select a particular person and then load that person’s data into the appropriate set of controls. You could also add ‘Previous’ and ‘Next’ buttons to step through the people in the list, displaying each one’s details in turn.

Nice idea, thanks!