FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Says that don't say, Problem upodating Button cCaptions etc
Posts: 464
Joined: Tue May 16, 2006 07:47 AM
Says that don't say, Problem upodating Button cCaptions etc
Posted: Tue Jul 10, 2007 10:44 PM

I am writing a program to control the workflow of Word Documents. I am just using a single (main) window (oWnd). I have a timer set to check if there are any files to be edited by that user. I wanted to alert the user, preferably by changing the caption and color of a button - or at least changing the text of a SAY. I looked at testime.prg annd thought it would be straight forward but no. In fact testtime as in the samples doesn't work! The timer fires no doubt but the oWnd:Say(.......) doesn't do anything. In fact I can't even get a SAY to work on the main window at all - let alone change its caption. Is this normal? I can get a Button to work and the timer can alter its caption (I think) because oMyButton:cCaption:= doesn't giva an error but the caption as displayed doesn't alter and calling oMyButton:Paint() also doesn't help and calling oMyButton:Initiate(oWnd) crashes. The timer is firing (alerts work fine). The timer can successfully SET MESSAGE which is my solution of last resort, but can anyone help with either updating the caption on the button or explaining why Says don't seem to work on the main window at all. Should testtime.prg compile and ruin as suggested or is it a sample that noone checked?

Thanks

xProgrammer

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Says that don't say, Problem upodating Button cCaptions etc
Posted: Wed Jul 11, 2007 08:05 AM
samples\TestTime.prg is properly working, the problem is that uses white color so you can't see it :-)

Simply change the color of the window:

DEFINE WINDOW oWnd FROM 3, 3 TO 20, 50 ;
TITLE OemToAnsi( "Testing timers" ) ;
MENU BuildMenu() COLOR "W+/B"
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 464
Joined: Tue May 16, 2006 07:47 AM
Says that don't say, Problem upodating Button cCaptions etc
Posted: Wed Jul 11, 2007 11:33 AM

Thanks Antonio for your prompt answer. Will try. Buttons must have different color defaults because they show up. This certasinly looks like a solution, but is there a way to

1> Change the caption of a Button

2> Change the (background) color of a button

which I would like to do.

Also is there a simple way to change gets from read only to normal when you want to put an enquiry dialog into edit mode. Currently I am redefining the dialog.

Thanking you

xProgrammer

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Says that don't say, Problem upodating Button cCaptions etc
Posted: Thu Jul 12, 2007 07:26 AM

1: oBtn:Settext(...)

2: AFAIK you can´t change the color of standard buttons. You can try to use the TsButton-class

REDEFINE oGet VAR ...
oGet:Enable() or oGet:Disable()

kind regards

Stefan
Posts: 464
Joined: Tue May 16, 2006 07:47 AM
Says that don't say, Problem upodating Button cCaptions etc
Posted: Thu Jul 12, 2007 08:02 AM

Thanks for your help Stefan. Prgressing well today.

Regards

xProgrammer

Continue the discussion