I'm creating multiple dashboards dynamically according to the number of entries in a database table and data:
pnlBtn := TPanel.Create(Self); // Cria o um Panel
pnlBtn.Parent := pnlMesas; // seta pnlMesa como parente
sTop := FloatToStr(rTop);
sLeft := FloatToStr(rLeft);
//Posição do Panel
pnlBtn.Top := StrToInt(sTop);
pnlBtn.Left := StrToInt(sLeft);
//Tamanho do Panel
pnlBtn.Width := 103;
pnlBtn.Height := 50;
//Informações Gerais do panel
pnlBtn.Name := 'pnlMesaComanda' + intToStr(iContador);
And I wanted to create several labels inside this dynamic panel with the information registered in the bank however how do I get the id of this panel that I created dynamically to put in the parent?
example:
lblCod := TLabel.Create(Self);
lblCod.Parent := 'pnlMesaComanda' + intToStr(iContador);
Can anyone help me?