Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 26-11-2005
rebollo75 rebollo75 is offline
Miembro
 
Registrado: nov 2004
Posts: 46
Poder: 0
rebollo75 Va por buen camino
tcanvas alineado a la derecha

Hola a todos.

Hay alguna forma de imprimir con el tcanvas alineado a la derecha para poder imprimir digitos con decimales?

printer.Canvas.TextOut(2400,y,'123.05');
printer.Canvas.TextOut(2700,y,'12.35');

Muchas gracias.
Responder Con Cita
  #2  
Antiguo 26-11-2005
luisgutierrezb luisgutierrezb is offline
Miembro
 
Registrado: oct 2005
Ubicación: México
Posts: 925
Poder: 19
luisgutierrezb Va por buen camino
si, si la hay, pero es con APIs, se llama "DrawText", de la ayuda del win32:
int DrawText(
HDC hDC, // handle to device context, (el Canvas.Handle)
LPCTSTR lpString, // pointer to string to draw
int nCount, // string length, in characters
LPRECT lpRect, // pointer to structure with formatting dimensions
UINT uFormat // text-drawing flags
);

el uFormat seria, DT_RIGHT + DT_VCENTER (por aquello del alineado vertical)
Responder Con Cita
  #3  
Antiguo 30-11-2005
rebollo75 rebollo75 is offline
Miembro
 
Registrado: nov 2004
Posts: 46
Poder: 0
rebollo75 Va por buen camino
hola luis. he probado poniendo:

rect.Left:=100;
rect.Right:=100;
rect.Bottom:=100;
rect.Top:=100;
printer.BeginDoc;
printer.Canvas.TextOut(1000,0,'1,00'); //para ver la diferencia
drawtext(printer.Canvas.Handle,'10,00',5,Rect,dt_right);
printer.EndDoc;


pero no me imprime nada, solo la linea del textout. supongo que no estara bien el drawtext, si puedieras orientarme un poco mas?

muchas gracias. un saludo.
Responder Con Cita
Respuesta



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:00:27.


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