Says with ID and there text is changed on runtime, then the old text are also to see. Only on folders if the parent dialog is GradientBrushe()`d.
- Code: Select all Expand view
- METHOD SetText( cText ) CLASS TSay
local hDC, nWidth , lBrush
DEFAULT ::lTransparent := .f.
lBrush := Empty( ::oWnd:oBrush:hBitmap ) .or. (!empty(::oWnd:oBrush:hBitmap) .and. ( empty(::oWnd:oBrush:cBmpFile) .and. empty(::oWnd:oBrush:cBmpRes) )) //change BYTE-ONE
::cCaption := If( ::cPicture != nil, Transform( cText, ::cPicture ),;
cValToChar( cText ) )
#ifndef __CLIPPER__
if ! Empty( ::hWnd ) .and. ::oWnd:oBrush != nil .and. lBrush .and. ( IsAppThemed() .or. ::lTransparent ) //change BYTE-ONE
DrawPBack( ::hWnd, hDC := GetDC( ::hWnd ) )
ReleaseDC( ::hWnd, hDC )
endif
#endif
if ! Empty( ::hWnd )
if ! lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), nOr( SS_LEFT, SS_RIGHT, SS_CENTER ) ) .AND. ::lAdjust
nWidth = GetTextWidth( 0, ::cCaption, If( ::oFont != nil, ::oFont:hFont,) ) + 20
if nWidth > ::nWidth
::nWidth = nWidth
endif
endif
SetWindowText( ::hWnd, ::cCaption )
endif
return nil