Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 07-04-2005
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: 19.438
Poder: 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 esta:

Código Delphi [-]
 var
   Str,Str2:string;
   f:byte;
   ARect:TRect;
   Ancho_Letra,Ancho_de_Antes:integer;
   _Left:Integer;
 begin
   f:=0;
   _Left:=0;
   Str:=BASIC_List.Items[Index];
   //BASIC_List.Canvas.TextRect(Rect, 0, 0, '');
 
   while f<=length (Str) do begin
       if (Str[f]<#32) or (Str[f] in [#144..#164]) then begin
             case ord(Str[f]) of
               144..164:
         begin
           Ancho_Letra:=BASIC_List.Canvas.TextWidth(Str[f]);
           Str2:=copy(Str,0,f);
           Ancho_de_Antes:=BASIC_List.Canvas.TextWidth(Str2);
           BASIC_List.Canvas.Font.Style:=[fsUnderline,fsItalic];
           ARect:=Rect;
           ARect.Left:=ARect.Left+Ancho_de_Antes+1;
           ARect.Right:=ARect.Right+Ancho_de_Antes+Ancho_Letra+1;
           BASIC_List.Canvas.TextRect(aRect, ARect.Left, aRect.Top,
           chr(ord(Str[f])-79));
               end;
               else  begin
                   //De momento nada
                end;
             end;
             inc (f);
           end
         else  begin
             Ancho_Letra:=BASIC_List.Canvas.TextWidth(Str[f]);
             Str2:=copy(Str,0,f);
             Ancho_de_Antes:=BASIC_List.Canvas.TextWidth(Str2);
             BASIC_List.Canvas.Font.Style:=[];
             ARect:=Rect;
       ARect.Left:=_Left;
 
       if (fthen begin  // ultima
               ARect.Right:=_Left+Ancho_Letra;
       end;
       
       _LEft := _LEft + Ancho_Letra;
             BASIC_List.Canvas.TextRect(aRect, ARect.Left + 1, aRect.Top, Str[f]);
             inc(f);
     end;
     end;
 
   // Cambiar cuando tiene el foco...
   if odFocused in State then begin
     BASIC_List.Canvas.Brush.Style := bsClear;
     BASIC_List.Canvas.Rectangle(Rect);
     DrawFocusRect(BASIC_List.Canvas.Handle, Rect);
   end;
 end;

De todas forma la condición (Str[f] in [#144..#164]) nunca se cumple y por lo tanto nunca va a entar en la primera parte del procedimiento.
__________________
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
 



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 05:26:14.


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