Variable Anzahl an dynamisch angelegten Objekten



  • Hallo,

    ich habe Checkboxen und StaticText dynamisch angelegt. Wie schaffe ich es dass anstelle der 100 ein variabler Wert steht. der sich anhand meiner While Bedingung ergibt?

    TCheckBox *Checkbox[100];
            TStaticText *StaticText[100];
            TStaticText *Label[100];
    
     while(!FILINGSYSTEM->Query1->Eof)
         {
            icount++;
            for (int i = icount; i <= icount; i++)
    
            {
                x++;
                Checkbox[i] = new TCheckBox(this);
                StaticText[i] = new TStaticText(this);
                Label[i] = new TStaticText(this);
                Checkbox[i]->Parent = this;
                StaticText[i]->Parent = this;
                Label[i]->Parent = this;
    		//usw...
    	}
    }
    


  • Hallo

    siehe FAQ hier im BCB-Forum, Abschnitt Komponenten benutzen.

    bis bald
    akari


Anmelden zum Antworten