I noticed that wxWindow has a SetName() and GetName() function https://docs.wxwidgets.org/3.0/classwx_ ... 01dbaaf990. Does this have any intrinsic meaning, or can this freely be used? Since I have windows which have not titles, I would like to set the name to the "title" for such windows, so I can retrieve it later when I convert such a window into one that has a title.
For example; When I convert a tab from wxNotebook to a wxSplitter I want to remember the value of the tab, so when it is convert back again to a tab, I can set it again to it's original value.
From the documentation it appears that this name has no special meaning and also doesn't need to be unique.
What is Set-/GetName() on wxWindow class used for? Topic is solved
Re: What is Set-/GetName() on wxWindow class used for?
Yes, you can freely use it for any purpose. AFAIK it's not used by wxWidgets internally.
I've used it on a few occasions to find a window using wxWindow::FindWindowByName() to avoid having to pass a pointer around.
https://docs.wxwidgets.org/trunk/classw ... 00557a44c3
I've used it on a few occasions to find a window using wxWindow::FindWindowByName() to avoid having to pass a pointer around.
https://docs.wxwidgets.org/trunk/classw ... 00557a44c3
Use the source, Luke!