Page 1 of 1

BUTTON question

PostPosted: Fri Mar 24, 2006 12:30 am
by Jeff Barnes
Hi Everybody,

I am trying (without success) to manipulate a button.

I want to have a counter on the button and update it every time it is pressed.

This is an example:

@ 1,1 BUTTON oBtnLap PROMPT "LAP + ("+alltrim(str(nLapCounter))+")" SIZE 50,25 of oDlg1 FONT oFontSmall UPDATE Action (nLapCounter++, TONE(440,1),oDlg1:Update())

Can someone please help.

Thanks,
Jeff

PostPosted: Fri Mar 24, 2006 7:32 am
by RAMESHBABU
Mr.Jeff

Here is the solution.


@ 1,1 BUTTON oBtnLap PROMPT "LAP + ("+alltrim(str(nLapCounter))+")" SIZE 50,25 of oDlg1 FONT oFontSmall UPDATE Action (nLapCounter++, TONE(440,1),oBtnLap:SetText("LAP ("+alltrim(str(nCounter))+")")oBtnLap:Refresh())

Regards,

- Ramesh Babu P

PostPosted: Fri Mar 24, 2006 3:42 pm
by Jeff Barnes
Thanks Ramesh

Works perfectly :)


Jeff