Ver Mensaje Individual
  #6  
Antiguo 02-12-2005
Avatar de Héctor Randolph
[Héctor Randolph] Héctor Randolph is offline
Miembro Premium
 
Registrado: dic 2004
Posts: 882
Reputación: 20
Héctor Randolph Va por buen camino
Cita:
Empezado por dec
Gracias Héctor Randolph por la idea.
Hola David

No hay nada que agradecer, tú sabes, para eso estamos aquí.


Tengo una sugerencia para tu componente, a ver que te parece.

Código Delphi [-]
type
  TPortapapeles=(cbAllowCut,cbAllowPaste,cbAllowCopy);
  TClipboardOptions=set of TPortapapeles;

  TNoPastEdit = class(TEdit)
  private
    FClipboardOptions: TClipBoardOptions;
  published
    property ClipboardOptions: TClipBoardOptions read  FClipBoardOptions
                                                 write FClipBoardOptions;
  private
    procedure WMPaste(var Message: TMessage); message WM_PASTE;
  end;

implementation

{ TNoPasteEdit }

procedure TNoPastEdit.WMPaste(var Message: TMessage);
begin
  if not (cbAllowPaste in FClipboardOptions) then Exit;
  inherited;
end;

Se puede hacer lo mismo con las opciones copiar y cortar.

Un saludo.
Responder Con Cita