Will successive calls of wxNewId() return successive IDs?
Volker Bartheld
dr_versaeg at freenet.de
Wed Jan 31 03:08:21 PST 2007
Hi Vadim!
>VB> I'm using wxNewId() to assign IDs for controls.
> Please don't.
Well, to be precise: Robert's wxDesigner does. When I'm writing the C++
source code, it leaves me with the choice of having the IDs in
const int ID_TEXT=10000;
#define ID_TEXT 10000
or
int ID_TEXT; ID_TEXT=wxNewId();
style.
Probably newer versions of the product will implement that change (I'm
using 2.14, released June 8th), the current doesn't.
>Use wxWindow::NewControlId() instead, wxNewId() will
>(hopefully) be deprecated in the next version.
Good to know. Unfortunately to-date, I'm stuck with either of the above
choices (I don't know if I could select wxID_HIGHEST as a starting value
for IDs if I go with choice 1 or 2...) since the GUI I have here is a
rather complex one, subject to change frequently and barely manageable
manually. And, yeah, I inherited the project. ;-)
>And you may be interested in Next/PrevControlId() methods too.
... but that won't work when specifying a range of controls to be used
in EVT_MENU_RANGE and similar functions, will it?
Thanks for your input and happy hacking!
Volker
__
Mail replies to/an V B A R T H E L D at G M X dot D E
More information about the wx-users
mailing list