Ver Mensaje Individual
  #2  
Antiguo 25-03-2005
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Código Delphi [-]
interface

type
  TForm1 = class(TForm)
  public
    function GetEditText(EditName: String): String;
  end;

implementation

function TForm1.GetEditText(EditName: String): String;
var
  Edit: TComponent;

begin
  Edit := FindComponent(EditName);
  if Assigned(Edit) and (Edit is TEdit)
    then Result := TEdit(Edit).Text
    else Result := '';
end;

end.

Te queda de tarea el correspondiente método SetEditText.

También, si no es molestia me gustaría saber el contexto en que necesitas esto ya que siempre me llama la atención este tipo de requerimientos propios de un lenguaje interpretado como VB

// Saludos
Responder Con Cita