Feature #2359 2006-07-06 08:24

phoenixpl

Soting ID and adding controls as arrays

Hello,

First of all sorry for my English. It's not my native language.

I think that you could add one of two solutions. Both of them are very usefull and I think that you should add them as soon as possible. The main problem with C::B is that you are not able to add controls in wxSmith as arrays (for example wxToggleButton[10]). C::B is automatically correcting them which is not good if you are building dialogs where you need to have loop access to controls. There is no problem with small amount of controls put for example in my application I will have at least 5 places where I will have wxCheckBoxes of 20 or more in row. Right now to access all of them I need to alter source code manually or I need to write one line for each control. I have two sugestions:

1. Allow wxSmith to assign array variables for controls (for example wxCheckBox MyControls[50]).

2. Change a way of sorting IDs while generating controls. Most of systems like wxWidgets or native Win32 allow searching for windows by ID. Unfortunately wxSmith is sorting IDs in alphabetic order so for example you have:

ID_TOGGLEBUTTON1, ID_TOGGLEBUTTON10, ID_TOGGLEBUTTON11, ID_TOGGLEBUTTON12, ID_TOGGLEBUTTON13, ID_TOGGLEBUTTON14, ID_TOGGLEBUTTON15, ID_TOGGLEBUTTON16, ID_TOGGLEBUTTON2, ID_TOGGLEBUTTON3, ID_TOGGLEBUTTON4, ID_TOGGLEBUTTON5, ID_TOGGLEBUTTON6, ID_TOGGLEBUTTON7, ID_TOGGLEBUTTON8, ID_TOGGLEBUTTON9,

If you would sort them in number order people would be able to access windows/controls by increasing IDs.

You don't have to implement both solutions. I think that both of them are solving the same problem - accessing controls/windows in single loop to build a chain of values.

If you want to disscus this subject please, contact me at pstarczewski@o2.pl

Thanks in advanced, Peter

Category
RAD
Status
Open
Close date
 
Assigned to
byo