Search found 98 matches: gettextwidth

Return to advanced search

Re: none PIXEL calculation

Is that what you mean ?

GetTextWidth(NIL, "calculate", oFont:hFont)
by Natter
Fri Apr 14, 2023 8:51 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: none PIXEL calculation
Replies: 6
Views: 316

Re: Google pixels versus characters

Dear Marc,

FWH provides function GetTextWidth( hDC, szText [,hFont], [@nHeight] ) --> nPixelsWidth
by Antonio Linares
Thu Oct 06, 2022 2:11 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Google pixels versus characters
Replies: 1
Views: 166

Imprimir una linea con varias fuentes. - SOLUCIONADO

... He intentado esto : Imprimir el codigo : oPrn:cmSay( linea,3.6,alltrim((cpptod)->codigo),oFontnegrita) Averiguar el ancho con nsize:=oPrn:GetTextWidth(alltrim((cpptod)->codigo),oFontnegrita) pero me lo da en pixeles y lo paso a cm así : nancho:=oPrn:Cmtr2Pix(nsize, 0) y despues imprimo ...
by Garbi
Thu Jul 08, 2021 10:06 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Imprimir una linea con varias fuentes. - SOLUCIONADO
Replies: 4
Views: 379

Re: GetTextWidth(), para ventana [SOLUCIONADO]

Buscando, buscando......

oWnd:GetWidth(cTexto,oFont)
by JESUS MARIN
Wed Nov 04, 2020 6:35 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: GetTextWidth(), para ventana [SOLUCIONADO]
Replies: 1
Views: 294

GetTextWidth(), para ventana [SOLUCIONADO]

Buenas tardes

Utilizo la función GetTextWidth(), para conocer el tamaño que va a ocupar una cadena de texto en una impresión.

Existe una función similar pero para el texto mostrado en pantalla ?

Gracias a todos.
by JESUS MARIN
Tue Nov 03, 2020 6:08 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: GetTextWidth(), para ventana [SOLUCIONADO]
Replies: 1
Views: 294

Re: Know the size of a font selected

... ::oPrn:hDCOut, nClrText ) #ELSE SetTextCol( ::oPrn:hDCOut, nClrText ) #ENDIF ENDIF DO CASE CASE nPad == 1 // right nCol := Max( 0, nCol - ::GetTextWidth( cText, oFont ) ) CASE nPad == 2 // center nCol := Max( 0, nCol - ( ::GetTextWidth( cText, oFont ) / 2 ) ) ENDCASE TextOut( ::oPrn:hDCOut, ...
by Otto
Tue Nov 03, 2020 10:56 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Know the size of a font selected - Resolved -
Replies: 9
Views: 1322

Re: Como Calcular Ancho en Pixeles de una Variable "FrancicoA"

Hola a todos ¿ no sería mejor hacer el refresh después de establecer el nuevo ancho ? ANTES AEval(aoSay,{|o,n| o:Refresh() ,o:nWidth := GetTextWidth( 0, Alltrim(o:cCaption), o:oFont:hFont ) + if(alBorder[n],6,0) }) AHORA AEval(aoSay,{|o,n| o:nWidth := GetTextWidth( 0, Alltrim(o:cCaption), ...
by JESUS MARIN
Mon Jun 15, 2020 10:16 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Como Calcular Ancho en Pixeles de una Variable "FrancicoA"
Replies: 21
Views: 3877

Re: Como Calcular Ancho en Pixeles de una Variable

DEFINE FONT oFont6 NAME "TAHOMA" SIZE 0,-14 BOLD @ 200,160 SAY oSay1 Var Profe->Nom_Pro SIZE GetTextWidth(0,Profe->Nom_Pro,oFont6:hFont),20 PIXEL OF oDlg2 PICTURE "@!" COLOR RGB(0,0,128), RGB(159,233,255) Antonio, así debería funcionarte:  @ 105,160 ...
by FranciscoA
Fri Jun 12, 2020 8:37 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Como Calcular Ancho en Pixeles de una Variable "FrancicoA"
Replies: 21
Views: 3877

Como Calcular Ancho en Pixeles de una Variable "FrancicoA"

Hola Amigos Necesito obtener el ancho real de una variable en PIXELES, para colorear el fondo de un SAY en un DEFINE DIALOG. Estou usando : GetTextWidth(0,Profe->Nom_Pro, oFont6). El problema es que el calculo, me corta el contenido de la variable, aun cuando no le ponga en oFont6, el contenido ...
by remtec
Fri Jun 12, 2020 1:26 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Como Calcular Ancho en Pixeles de una Variable "FrancicoA"
Replies: 21
Views: 3877

Re: A problem with SAY and font- style and size

In Class TSAY I added Line 93 // DEFAULT nWidth := SAY_CHARPIX_W * Len( ::cCaption ) - 4 DEFAULT nWidth := GetTextWidth( 0, ::cCaption, If( oFont != nil, oFont:hFont,; If( oWnd:oFont != nil, oWnd:oFont:hFont,) ) ) + 5 because NO textwidth and height is defined ( DEFAULT-values ...
by ukoenig
Thu Aug 15, 2019 5:30 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: A problem with SAY and font- style and < size default >
Replies: 5
Views: 790

cambiar mansaje en barra??

saludos, tengo un: DEFINE MSGITEM oFecha OF Principal:oMsgBar; PROMPT FormaFecha(gdFecTra); SIZE GetTextWidth(0,FormaFecha(gdFecTra))+2; COLOR COLOR_AZUL,COLOR_SVERDE; TOOLTIP Ota('Fecha de operación') necesito que cada que cambie la fecha, en la barra de mensajes se actualize ...
by noe aburto
Sat Sep 30, 2017 6:25 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: cambiar mansaje en barra??
Replies: 4
Views: 879

Re: Ayuda DLL

Antonio buenos dias, gracias por la ayuda Agrego la VM.LIB (xharbour), y me manda estos errorres :( :( Proyecto: Kept5, Entorno: BorlandDLL: [1]:Harbour.Exe Source\Tseguro.prg /m /n /es2 /ki /iP:\32bits\xharbour\include;P:\32bits\FWH\INCLUDE /i /oObj\Tseguro.c xHarbour Compiler build 1.2.1 (SimpLex)...
by ricardog
Thu Aug 31, 2017 2:56 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Ayuda DLL
Replies: 24
Views: 6329

Re: Function to Print Memo with proportional font.

oPrn:gettextwidth(ctext, oFont) is useful for this
by dtussman
Sat Oct 29, 2016 7:18 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Function to Print Memo with proportional font.
Replies: 6
Views: 930

Re: FWH 15:12: Bug in the size of the column in xbrowse

Have you tried to change the width of the column ?

oBrw:aCols[ ... ]:nWidth := GetTextWidth( 0, "textwithdesiredwidth", oBrw:hFont )
by Antonio Linares
Thu Feb 11, 2016 9:16 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: FWH 15:12: Bug in the size of the column in xbrowse RESOLVED
Replies: 15
Views: 3401

Re: Problema con Encabezados de TReport

... TRcolum (RColum.prg), en los metodos SayTitle y SayData. Si te fijas bien, en el metodo SayData está esta linea: //nWidth := ::oReport:oDevice:GetTextWidth(cText, oFont) // To Review: Why is this line here? No lo he probado, pero que tal si modificas el metodo SayTitle: ... ... ::nCurLine := ...
by FranciscoA
Wed Dec 30, 2015 2:48 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Problema con Encabezados de TReport
Replies: 8
Views: 1381
Next

Return to advanced search