Ver Mensaje Individual
  #1  
Antiguo 16-11-2010
cmfab cmfab is offline
Miembro
 
Registrado: jun 2010
Posts: 419
Reputación: 14
cmfab Va por buen camino
Probelma al agregar item en menú

Hola a todos. tengo el siguiente problema. itento agregar items a un determinado menú en tiempo de ejecución. el código que utilizo es el siguiente

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
 var
   it: Tmenuitem;
begin
     it := Tmenuitem.Create(self);
     it.caption := 'Menu 1';
     mennu1.Items.Add(it);
end;

al parecer no hay error de sintaxis. sn embargo cuando compilo me salta el siguiente error:

[DCC Error] Unit1.pas(34): E2029 '[' expected but '.' found

si alguien puede indicarme. desde ya muchas Gracias
Responder Con Cita