Forum Discussion

jyothi_priya's avatar
jyothi_priya
Contributor
15 years ago

How to add child controls dynamically in a TcxGroupBox?

Hi,



I have different test cases for different modules.Now I want to design a user form as follows:



            Module Name: TextBox    //as in Module1, Module2---

            

            (CheckBox) Choose Test Cases

             //When I tick the checkbox a group box appears below it showing list of check boxes for the test cases of the particular module name.

                

                cxGroupBox1

                    TC1            //These are checkboxes.

                    TC2    

                     so on

                  

              Now when I give Module1 in the textbox, I should get Module1 Test Cases list and when I give Module2 in the textbox, I should get Module2 Test Cases list.



How can i do that? Can I add checkboxes dynamically in the groupbox??? 



Thanks,

Priya                        

4 Replies

  • Hi,



    There's no way to create controls on user forms dynamically. Your request has increased the appropriate suggestion's rating in our DB.
  • I would also suggest to keep checkboxgroup control as we need list of checkboxes mostly in the user forms.
  • Instead of checkbox list, I would like to add items in list box. Since I have 60 items, I want them in the following allignment:



    TC1          TC6        TC11        ----

    TC2          TC7        TC12

    TC3          TC8        TC13

    TC4          TC9        TC14

    TC5          TC10      TC15



    I know we have to use align or anchors property, but I unable to understand how to use them.

    Can you give me an example how to align items in the listbox of the order mentioned above...
  • Hi,



    List box items are just strings. They are not controls, and they don't have anchors. Use your list box's Columns property to view its items in several columns.