1 Reply Latest reply on Feb 13, 2012 2:09 AM by nfallon55

    Help with dynamic checkbox from database results

    nfallon55

      Hi,

       

       

       

      I am creating some dynamic checkboxes from the results of a database read to sqlite.  I am able to get the data and the correct number of checkboxes is being created but I'm having a problem populating the labels for the checkboxes.  Here is the section of code that gets the results from the database and creates the checkboxes.

       

       

       

                      var result:Array = stmt.getResult().data;

                     

                      for each( var obj:Object in result )

                      {

                          var cb:CheckBox = new CheckBox();

                          cb.label = obj.toString();

                          cb.setStyle("color", 0x00593B);

                          cb.setStyle("symbolColor", 0x000000);

                          container.contentGroup.addElement(cb);                   

                      }

       

       

      Neil