Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #6  
Antiguo 20-08-2003
Lmas Lmas is offline
Miembro
 
Registrado: jul 2003
Ubicación: España
Posts: 27
Poder: 0
Lmas Va por buen camino
Hola superhopi.

Con estas dos funciones podrás guardar y recuperar el estilo de una fuente como un entero.

Código:
const
  FNT_STYLE_BOLD = $0001;
  FNT_STYLE_ITALIC = $0002;
  FNT_STYLE_UNDERLINE = $0004;
  FNT_STYLE_STRIKEOUT = $0008;

function FontStyleToInt(AFontStyle: TFontStyles): Integer;
begin
  Result := 0;
  if fsBold in AFontStyle then Result := Result or FNT_STYLE_BOLD;
  if fsItalic in AFontStyle then Result := Result or FNT_STYLE_ITALIC;
  if fsUnderline in AFontStyle then Result := Result or FNT_STYLE_UNDERLINE;
  if fsStrikeOut in AFontStyle then Result := Result or FNT_STYLE_STRIKEOUT;
end;

function IntToFontStyle(AValue: Integer): TFontStyles;
begin
  Result := [];
  if (AValue and FNT_STYLE_BOLD) <> 0 then Include(Result, fsBold);
  if (AValue and FNT_STYLE_ITALIC) <> 0 then Include(Result, fsItalic);
  if (AValue and FNT_STYLE_UNDERLINE) <> 0 then Include(Result, fsUnderline);
  if (AValue and FNT_STYLE_STRIKEOUT) <> 0 then Include(Result, fsStrikeOut);
end;
SalU2.
__________________
Una cosa es una cosa, y otra cosa es otra cosa...
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 20:51:10.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi