Ver Mensaje Individual
  #9  
Antiguo 17-01-2012
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.318
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Prueba con algo así; Tal como lo habías hecho debería funcionar:

Código Delphi [-]
constructor TEntradaTxt.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);

  FRequerido   := False;
  LabelPosition:= lpRight;
  LabelSpacing := 4;
  EditLabel.Font.Color:= clRed;
  EditLabel.Caption:= ' ';
  EditLabel.Invalidate;

end;

procedure TEntradaTxt.SetRequerido(lVal: Boolean);
begin
  if lVal <> FRequerido then begin
    FRequerido := lVal;
    if lVal then begin
      EditLabel.Caption:= '*'
    end
    else begin
      EditLabel.Caption:= '';
    end;
    Invalidate;
  end;
end;

Creo que el problema es dejar la cadena vacía en el Edit; Basta con que coloques un ESPACIO.
Por lo visto al dejarla vacía no le hace caso y vuelve a colocar el nombre.
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita