FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Changing cCaption of buttons!? ( SOLVED )
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Changing cCaption of buttons!? ( SOLVED )
Posted: Fri Oct 24, 2008 06:26 PM
Antonio and friends,

I created this function bellow to change the property "cCaption" of the buttons to reuse the same button to different tasks... I did not want to directly change the ownership cCaption, but this is the best solution even?

FUNCTION setCaption( oObject, cCaption )

DEFAULT cCaption := ""

IF valType( oObject ) == "O"

   setWindowText( oObject:hWnd, cCaption )
   oObject:refresh()
   
ENDIF

RETURN( NIL )
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Changing cCaption of buttons!? ( SOLVED )
Posted: Fri Oct 24, 2008 06:39 PM

Friends,

Solved!

Using the ::setText() method! ;)

Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Changing cCaption of buttons!? ( SOLVED )
Posted: Sat Oct 25, 2008 09:25 AM

yes :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion