Ver Mensaje Individual
  #1  
Antiguo 23-02-2017
juniorSoft juniorSoft is offline
Miembro
 
Registrado: abr 2005
Posts: 178
Reputación: 19
juniorSoft Va por buen camino
Validar Contenido Portapapeles

Hola de nuevo Amigos,

he creado las siguientes acciones en Firemonkey para copiar y pegar texto pero que su contenido sean números

Código Delphi [-]
procedure TFrmCalculadora.AcCopiarExecute(Sender: TObject);
var
  Clipboard: IFMXClipboardService;
  Value: TValue;
begin
     if TPlatformServices.Current.SupportsPlatformService(IFMXClipboardService,
     IInterface(Clipboard)) then
     begin
       Value := TValue.From<string>(label1.Text);
       Clipboard.SetClipboard(Value);
     end;
end;

procedure TFrmCalculadora.AcPegarExecute(Sender: TObject);
var
  Clipboard: IFMXClipboardService;
  Value: TValue;
begin
  if TPlatformServices.Current.SupportsPlatformService(IFMXClipboardService,
  IInterface(Clipboard)) then
  begin
     Value := Clipboard.GetClipboard;
     label1.Text:=Value.AsString;
   end;
end;

Mi pregunta es como puedo validar la información que tiene el Portapapeles para saber si este contenido es un número de punto flotante y no otro tipo de información.
Responder Con Cita