I have a Text on ButtonBar via TSay class. I need to change it with pressing "Change It" button.
Any help?
Thanks.
- Code: Select all Expand view
- #include "fivewin.ch"
function Main()
local oWnd, oBar, oBold, oFont1, oSay11
DEFINE FONT oFont1 NAME "Arial" SIZE 0, -35
DEFINE WINDOW oWnd TITLE "FWH17.04 : ButtonBar Group Labels"
DEFINE BUTTONBAR oBar OF oWnd 2007 SIZE 56,56 HEIGHT 80
oBold := oBar:oFont:Bold()
oBar:oGrpFont := oBold
DEFINE BUTTON OF oBar PROMPT "Change it" action Change_Text(oSay11)
@ 3,100 say oSay11 Prompt "Test1" of oBar size 500,56 pixel TRANSPARENT FONT oFont1 CENTER VCENTER COLOR CLR_RED UPDATE
ACTIVATE WINDOW oWnd CENTERED
RELEASE FONT oBold
oFont1:=nil
return nil
function Change_Text(oSay)
oSay:SetText("New Text")
oSay:refresh()
return .t.