Hi,
On a main screen that shows few buttons, I need to create another button which, when clicking it, it will show another permanent BOX / SAY with a string. Each click changes the string in the box from "DISCHARGE" <--> "LOAD". I don't want to draw all the screen on each click, but the string in the box.
The main screen is drawn using:
@ 0, 0 BTNBMP NAME "setup" SIZE 40, 30 OF oWnd ACTION TalySetupMain()
@ 0, 40 BTNBMP NAME "DschLoad" SIZE 40, 30 OF oWnd ACTION TalyHeadMain()
@ 0, 80 BTNBMP NAME "shfting" SIZE 40, 30 OF oWnd ACTION TalyContShifting()
@ 0, 120 BTNBMP NAME "empty" SIZE 40, 30 OF oWnd ACTION ( cFSE := "EMPTY", TalyContMain() )
Thanks,
Moshe Yarden
Change BOX content
Re: Change BOX content
Hi,
If I need just to show a string somewhere on the screen, how can I use the SAY command?
I'm trying:
@ 0, 0 BTNBMP NAME "setup" SIZE 40, 30 OF oWnd ACTION TalySetupMain()
@ 0, 40 BTNBMP NAME "DschLoad" SIZE 40, 30 OF oWnd ACTION TalyHeadMain()
@ 0, 80 BTNBMP NAME "shfting" SIZE 40, 30 OF oWnd ACTION TalyContShifting()
and:
@ 0, 40 SAY "I022345" OF oWnd //BOX //cManifest
The buttons do work, but the SAY is not shown.
What do I do wrong?
Thanks,
Moshe Yarden
If I need just to show a string somewhere on the screen, how can I use the SAY command?
I'm trying:
@ 0, 0 BTNBMP NAME "setup" SIZE 40, 30 OF oWnd ACTION TalySetupMain()
@ 0, 40 BTNBMP NAME "DschLoad" SIZE 40, 30 OF oWnd ACTION TalyHeadMain()
@ 0, 80 BTNBMP NAME "shfting" SIZE 40, 30 OF oWnd ACTION TalyContShifting()
and:
@ 0, 40 SAY "I022345" OF oWnd //BOX //cManifest
The buttons do work, but the SAY is not shown.
What do I do wrong?
Thanks,
Moshe Yarden
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Change BOX content
The following sample works fine here:
EMG
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd
DEFINE WINDOW oWnd
@ 1, 1 SAY "This is a test"
ACTIVATE WINDOW oWnd
RETURN NIL
Re: Change BOX content
Thanks EMG,
Now it is shown. I've used row and column like in BTNBMP.
I'm trying to use the SAY and then redefine it (with each click, on another button)
When trying:
@ 4, 10 SAY oSay cManifest OF oWnd COLOR nRGB( 255, 255, 255 ), nRGB( 0, 255, 0 )
I receive: "syntax error at '@'"
Using SAY without oSay works:
@ 4, 10 SAY cManifest OF oWnd COLOR nRGB( 255, 255, 255 ), nRGB( 0, 255, 0 )
Bit then I don't know how ro use redine from an outer function.
Thanks,
Moshe Yarden
Now it is shown. I've used row and column like in BTNBMP.
I'm trying to use the SAY and then redefine it (with each click, on another button)
When trying:
@ 4, 10 SAY oSay cManifest OF oWnd COLOR nRGB( 255, 255, 255 ), nRGB( 0, 255, 0 )
I receive: "syntax error at '@'"
Using SAY without oSay works:
@ 4, 10 SAY cManifest OF oWnd COLOR nRGB( 255, 255, 255 ), nRGB( 0, 255, 0 )
Bit then I don't know how ro use redine from an outer function.
Thanks,
Moshe Yarden
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Change BOX content
Code: Select all
@ row, col SAY oSay PROMPT cManifest ...