Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #5  
Antiguo 15-05-2014
wilcg wilcg is offline
Miembro
 
Registrado: abr 2014
Posts: 107
Poder: 11
wilcg Va por buen camino
Tienes razón ecfisa, creo que el problema viene por como creo el TEdit, porque he hecho pruebas tal como tu código y funciona perfecto.

La forma como creo los TEdit es desde un archivo XML previamente guardado todos la información de cada TEdit.
aquí el código

Código Delphi [-]
var
  XML : TXMLDocument;
  NComponente : IXMLNode;
  l: Integer;
  Edit: TEdit;
begin
   XML := TXMLDocument.Create(Application);
   try
      XML.Active := True;

      XML.LoadFromFile(ExtractFilePath(Application.ExeName) + '\Plantillas\00001.xml');

      for l := 0 to XML.DocumentElement.ChildNodes.Count - 1 do
      begin

        // ¿Es una Edit?
        if XML.DocumentElement.ChildNodes[l].NodeName = 'Edit' then
        begin
          NComponente := XML.DocumentElement.ChildNodes[l];
          Edit := TEdit.Create(Scroll1);
          Edit.Parent := Scroll1;
          Edit.Name := NComponente.Attributes['Nombre'];
          Edit.Tag := NComponente.Attributes['ID'];
          Edit.Left := NComponente.Attributes['x'];
          Edit.Top := NComponente.Attributes['y'];
          Edit.Width := NComponente.Attributes['Ancho'];
          Edit.Height := NComponente.Attributes['Alto'];
          Edit.Font.Color := NComponente.Attributes['Color'];
          if NComponente.Attributes['Tipo'] = '*' then
          begin
            Edit.PasswordChar := '*';
            Edit.PopupMenu:= PopupMenu1;
          end;
        end;

      XML.Active := False;
   finally
      XML := nil;
   end;
   end;


esta es la forma como se crean los edit, creo que ahí esta el error.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Mostrar/Ocultar columnas de un dbgrid en tiempo de ejecucion camiz Varios 1 29-08-2012 20:42:02
Evento en BitBtn creado en tiempo de ejecución newtron OOP 2 10-05-2012 16:54:14
eventos de PageControl creado en tiempo de ejecucion kaozz OOP 5 17-07-2007 15:02:10
Perder el control de un componente creado en tiempo de ejecución dec Trucos 0 30-06-2006 13:35:56
Mostrar un texto creado en tiempo de ejecución FunBit Varios 1 10-10-2005 13:23:39


La franja horaria es GMT +2. Ahora son las 10:00:45.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi