Senhores,
Como posso fazer para colocar um texto em um TProgressBar, já tentei o Parí¢metro cText , mas não teve efeito nenhum.
Ex:
oProgressBar1:cText := "TESTE DE ESCRITA"
Desde já agradeço a ajuda,
Atenciosamente,
Marcelo Coelho Silva
Brasil
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Texto em TProgressBar
Texto em TProgressBar
Marcelo Coelho Silva
Brasil.
Brasil.
Texto em TProgressBar
Appdata:oWaitOnMeter:OnChange := {|| cProgressText:=IF(!Empty(cTexto),cTexto+" ",""),;
cProgressText+=IF(lVerCantidad,AllString(Appdata:oWaitOnMete r:nValue)+ " / "+AllString(nTotalValue),""),;
Appdata:oWaitOnMeter:cText:= cProgressText,;
Application:SetProgress(psNORMAL,Appdata:oWaitOnMeter:nValue ,nTotalValue),ProcessMessages() }
cProgressText+=IF(lVerCantidad,AllString(Appdata:oWaitOnMete r:nValue)+ " / "+AllString(nTotalValue),""),;
Appdata:oWaitOnMeter:cText:= cProgressText,;
Application:SetProgress(psNORMAL,Appdata:oWaitOnMeter:nValue ,nTotalValue),ProcessMessages() }
BiSoft Desarrollo de software profesional
http://www.bisoft.es
http://www.bisoft.es
-
- Mensajes: 291
- Registrado: Jue Ene 31, 2013 1:10 pm
Texto em TProgressBar
Marcelo,
este código es de hace tiempo pero debería funcionar:
CLASS TProgressBar FROM XProgressBar
PUBLISHED:
PROPERTY cText INIT ""
PROPERTY nClrText INIT clWindowText
PUBLIC:
METHOD WMPaint()
ENDCLASS
//---------------------------------------------------------- ----------------
METHOD WMPaint( hDC ) CLASS TProgressBar
LOCAL cText
hDC := ::BeginPaint( hDC )
PrevWindowProc( ::Handle, WM_PAINT, hDC, 0 )
IF !Empty( ::cText )
cText := StrTran( ::cText, "%i", AllTrim( ToString( ::nValue ) ))
SetBkMode( hDC, TRANSPARENT )
SetTextColor( hDC, ::nClrText )
DrawText( hDC, cText, GetClientRect( ::Handle ), nOR( DT_CENTER,
DT_VCENTER, DT_SINGLELINE ) )
ENDIF
::Super:WmPaint()
RETURN ::EndPaint( hDC )
//---------------------------------------------------------- ----------------
Saludos,
José Lalín
este código es de hace tiempo pero debería funcionar:
CLASS TProgressBar FROM XProgressBar
PUBLISHED:
PROPERTY cText INIT ""
PROPERTY nClrText INIT clWindowText
PUBLIC:
METHOD WMPaint()
ENDCLASS
//---------------------------------------------------------- ----------------
METHOD WMPaint( hDC ) CLASS TProgressBar
LOCAL cText
hDC := ::BeginPaint( hDC )
PrevWindowProc( ::Handle, WM_PAINT, hDC, 0 )
IF !Empty( ::cText )
cText := StrTran( ::cText, "%i", AllTrim( ToString( ::nValue ) ))
SetBkMode( hDC, TRANSPARENT )
SetTextColor( hDC, ::nClrText )
DrawText( hDC, cText, GetClientRect( ::Handle ), nOR( DT_CENTER,
DT_VCENTER, DT_SINGLELINE ) )
ENDIF
::Super:WmPaint()
RETURN ::EndPaint( hDC )
//---------------------------------------------------------- ----------------
Saludos,
José Lalín
- Marcelo Coelho Silva
- Mensajes: 269
- Registrado: Sab May 31, 2008 4:49 pm
- Ubicación: Brasil
- Contactar:
Texto em TProgressBar
Funcionou Perfeito.
Obrigado.
Atenciosamente,
Marcelo Coelho Silva
Brasil.
Em 25/03/2015 09:34, José Lalín escreveu:
> Marcelo,
>
> este código es de hace tiempo pero debería funcionar:
>
> CLASS TProgressBar FROM XProgressBar
>
> PUBLISHED:
> PROPERTY cText INIT ""
> PROPERTY nClrText INIT clWindowText
>
> PUBLIC:
> METHOD WMPaint()
>
> ENDCLASS
>
> //----------------------------------------------------------
> ----------------
>
> METHOD WMPaint( hDC ) CLASS TProgressBar
>
> LOCAL cText
>
> hDC := ::BeginPaint( hDC )
> PrevWindowProc( ::Handle, WM_PAINT, hDC, 0 )
>
> IF !Empty( ::cText )
> cText := StrTran( ::cText, "%i", AllTrim( ToString( ::nValue ) ))
> SetBkMode( hDC, TRANSPARENT )
> SetTextColor( hDC, ::nClrText )
> DrawText( hDC, cText, GetClientRect( ::Handle ), nOR( DT_CENTER,
> DT_VCENTER, DT_SINGLELINE ) )
> ENDIF
>
> ::Super:WmPaint()
>
> RETURN ::EndPaint( hDC )
>
> //----------------------------------------------------------
> ----------------
>
> Saludos,
> José Lalín
>
---
Este email foi escaneado pelo Avast antivírus.
http://www.avast.com
Obrigado.
Atenciosamente,
Marcelo Coelho Silva
Brasil.
Em 25/03/2015 09:34, José Lalín escreveu:
> Marcelo,
>
> este código es de hace tiempo pero debería funcionar:
>
> CLASS TProgressBar FROM XProgressBar
>
> PUBLISHED:
> PROPERTY cText INIT ""
> PROPERTY nClrText INIT clWindowText
>
> PUBLIC:
> METHOD WMPaint()
>
> ENDCLASS
>
> //----------------------------------------------------------
> ----------------
>
> METHOD WMPaint( hDC ) CLASS TProgressBar
>
> LOCAL cText
>
> hDC := ::BeginPaint( hDC )
> PrevWindowProc( ::Handle, WM_PAINT, hDC, 0 )
>
> IF !Empty( ::cText )
> cText := StrTran( ::cText, "%i", AllTrim( ToString( ::nValue ) ))
> SetBkMode( hDC, TRANSPARENT )
> SetTextColor( hDC, ::nClrText )
> DrawText( hDC, cText, GetClientRect( ::Handle ), nOR( DT_CENTER,
> DT_VCENTER, DT_SINGLELINE ) )
> ENDIF
>
> ::Super:WmPaint()
>
> RETURN ::EndPaint( hDC )
>
> //----------------------------------------------------------
> ----------------
>
> Saludos,
> José Lalín
>
---
Este email foi escaneado pelo Avast antivírus.
http://www.avast.com
Att.
Marcelo Coelho Silva
Brasil.
Marcelo Coelho Silva
Brasil.