Changing cCaption of buttons!? ( SOLVED )

Changing cCaption of buttons!? ( SOLVED )

Postby JC » Fri Oct 24, 2008 6: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?

Code: Select all  Expand view
FUNCTION setCaption( oObject, cCaption )

DEFAULT cCaption := ""

IF valType( oObject ) == "O"

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

RETURN( NIL )
Last edited by JC on Fri Oct 24, 2008 6:39 pm, edited 1 time in total.
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby JC » Fri Oct 24, 2008 6: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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby Antonio Linares » Sat Oct 25, 2008 9:25 am

yes :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 88 guests