Ver Mensaje Individual
  #4  
Antiguo 24-02-2004
Avatar de jachguate
jachguate jachguate is offline
Miembro
 
Registrado: may 2003
Ubicación: Guatemala
Posts: 6.254
Reputación: 28
jachguate Va por buen camino
Código:
Procedure Form1Table1Campo1GetText(Field : TField; var Text : String);
  // de los parámetros no me recuerdo bien...

Begin
  Case Tabla1Campo1.AsInteger of
    1 : Text := 'uno';
    2 : Text := 'dos';
    3 : Text := 'tres';
    4 : Text := 'cuatro';
  else
     Text := 'mayor que cuatro';
  end;
end;

Procedure Form1Table1Campo1SetText(Field : TField; const Text : String);
  // de los parámetros no me recuerdo bien...

Begin
  if text = 'uno' Then
    Tabla1Campo1.AsInteger := 1
  else if text = 'dos' Then
    Tabla1Campo1.AsInteger := 2
  else if text = 'tres' Then
    Tabla1Campo1.AsInteger := 3
  else if text = 'cuatro' Then
    Tabla1Campo1.AsInteger := 4
  else
    raise exception.Create('Valor inválido para este campo!');
end;
algo asi...

Hasta luego.

__________________
Juan Antonio Castillo Hernández (jachguate)
Guía de Estilo | Etiqueta CODE | Búsca antes de preguntar | blog de jachguate
Responder Con Cita