Utiliza TAG's en tus mensajes, se leen mejor (compara tu código con el mío):
Modifica el código y cambialo por éste:
Código Delphi
[-]
if not (Sender is TPanel) then
Exit;
for I:= ((sender as TPanel).ControlCount - 1) downto 0 do
If (sender as TPanel).Controls[i].Name[1]='B' then
(sender as TPanel).Controls[i].free;