Change BOX content

Change BOX content

Postby yardenmo » Thu Jan 22, 2009 7:34 pm

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
yardenmo
 
Posts: 33
Joined: Tue Aug 12, 2008 7:08 am

Re: Change BOX content

Postby yardenmo » Fri Jan 23, 2009 9:30 am

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
yardenmo
 
Posts: 33
Joined: Tue Aug 12, 2008 7:08 am

Re: Change BOX content

Postby Enrico Maria Giordano » Fri Jan 23, 2009 10:28 am

The following sample works fine here:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd

    DEFINE WINDOW oWnd

    @ 1, 1 SAY "This is a test"

    ACTIVATE WINDOW oWnd

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Change BOX content

Postby yardenmo » Fri Jan 23, 2009 12:49 pm

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
yardenmo
 
Posts: 33
Joined: Tue Aug 12, 2008 7:08 am

Re: Change BOX content

Postby Enrico Maria Giordano » Fri Jan 23, 2009 4:22 pm

Code: Select all  Expand view
@ row, col SAY oSay PROMPT cManifest ...


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 3 guests