Problem with display of wxGetSingleChoiceIndex

Jörn Koch joern at ca3d-engine.de
Fri Nov 16 08:44:37 PST 2007


Hello wxWidgets users,

we recently moved from wxWidgets 2.6 to version 2.8, that brought some 
changes in the display of certain screen elements.
While working on the code to achieve a display similar to the previous 
wxWidgets version I found that the display of a wxGetSingleChoiceIndex 
changed in size and I'm not able to restore it to its previous size.

According to the documentation the size of a wxGetSingleChoiceIndex is 
150x250 per default. This worked perfectly well with version 2.6. 
Without changing the code, it now leads to a wxGetSingleChoiceIndex 
window with a size of 346x334.

The code:

   wxGetSingleChoiceIndex("Available configurations:", wxString("Please
   select a game for ")+MapName, Choices.Size(), &Choices[0]);

According to the documentation the last 5 parameters are per default set 
as follows:

   wxWindow *parent = NULL, int x = -1, int y = -1, bool centre = true,
   int width=150, int height=200

This hasn't changed since version 2.6.

Even if I explicitly set the values like this

   wxGetSingleChoiceIndex("Available configurations:", wxString("Please
   select a game for ")+MapName, Choices.Size(), &Choices[0], false, 10,
   10, false, 50, 100);

the positioning and size parameters are ignored and the window is shown 
in the same way as with the default values.

I checked this problem with Windows Vista and Windows 2000 using VC++ 
2005 as compiler.
Our previous wxWidgets version was wxMSW-2.6.2, the current one is 
WX_2_8_BRANCH.

Thanks in advance for your help!

Best regards
Jörn Koch





More information about the wx-users mailing list