Pages and forms...? : .( 
Author Message
 Pages and forms...? : .(

There must be a way!

I have this form with a page, as the first of nine,
which I want to present to the user as quickly as he get there.
It's a 'sort' of menu.

I understand that the program show the page in the form that contain
a tab-stop.I have this idea about it's maybe somewhat the first
tab-stop the program recognize? Yesterday I was sure about that because
it worked then (not today!!!)

My problem is that the page, that the program stops at, is the last
page (yesterday it was no problem, it stopped at the first page
but today it stops at the last page!!!!)

How do I tell Paradox (OPAL) that it shall show the first page in
the form???

(I've got Paradox 5.0, if that could be at any help....)

Please mail me if you know the answer,

Anders Johansson

(What a lovely night it have been. Just me and a bottle of CocaCola)



Sun, 28 Dec 1997 03:00:00 GMT
 Pages and forms...? : .(

one thing you can do is to always save your form design from the first
page. You must have something on the first page Paradox can go to like a
field object.


Sun, 28 Dec 1997 03:00:00 GMT
 Pages and forms...? : .(

Quote:
>one thing you can do is to always save your form design from the first
>page. You must have something on the first page Paradox can go to like a
>field object.

from online help for <<MoveToPage>>
var
   myForm, otherForm  Form
   somePage           SmallInt
endVar
moveToPage(2)                       ; moves to page 2 on this form
if otherForm.open("Sitenote.fsl") then  ; opens to first page
  sleep(2000)                       ; pause
  otherForm.moveToPage(2)           ; moves to page 2 of SiteNote

in the open procedure for the form, use the move to page ..
cpm



Sun, 28 Dec 1997 03:00:00 GMT
 Pages and forms...? : .(
Perhaps you could name the first page something like FirstPage and
put the line:

FirstPage.Moveto()

in the Open section of the Forms methods (i.e. right click on the title
bar of the form and select "methods").

I haven't tried this but it might work.



Sun, 28 Dec 1997 03:00:00 GMT
 Pages and forms...? : .(

Quote:

> one thing you can do is to always save your form design from the first
> page. You must have something on the first page Paradox can go to like a
> field object.

as another alternative, i've used the following chunks of code so
that you can start from whichever page you wish.  want to change the
starting page?  change the constant StartingPageName.  want to change
the radio button text?  change the PageTurnerValue constant on the
page.  (if you *really* want to get complicated, i suppose you could
do some OPal work to make the Label.Value = PageTurnerValue.  ;-)

i've carved out some extraneous code that is not related so, if it
doesn't function as advertised, please e-mail me directly & i'll
fire off any missing pieces:

on the form itself:
        Const   StartingPageName        = "MaintRFADDRTP"
        endConst

        Var     PageTurnerTranslator    DynArray[]      String
        endVar

        method open(var eventInfo Event)
                var     TheTarget               UIObject
                endVar
                if      eventInfo.isPreFilter()
                then    ;// This code executes for each object on the form:
                        eventInfo.getTarget(TheTarget)
                        if      TheTarget.ContainerName = TheTarget.Manager
                        ; *WARNING*     this works when the form *only* contains pages
                        then    if      TheTarget.Name = StartingPageName
                                then    TheTarget.Visible = True
                                else    TheTarget.Visible = False
                                endIf
                        endIf
                endif
        endmethod

        proc    PageLocator(const       OriginalValue   String)
                var     ThisPage,
                        DesiredPage     UIObject
                endVar
                ThisPage.attach(subject.ContainerName)
                ThisPage.Visible = False
                try     DesiredPage.attach(PageTurnerTranslator[subject.Value])
                onfail  msgStop("Maintain Reference Tables",
                                "No page has been designed for this option ("
                                        +       subject.Value
                                        +       ") - choose again")
                        ThisPage.PageTurner.Value = OriginalValue
                        DesiredPage.attach(ThisPage)
                endtry
                DesiredPage.Visible = True
                DesiredPage.moveTo()
        endproc

on each Page in the form:
        Const   PageTurnerValue = "Country"
        endConst

        method open(var eventInfo Event)
                PageTurnerTranslator[PageTurnerValue] = self.Name
        endmethod

        method arrive(var eventInfo MoveEvent)
                PageTurner.Value = PageTurnerValue
        endmethod

on the Radio Button field called PageTurner (on each page):
        method newValue(var eventInfo Event)
                doDefault
                if      eventInfo.reason() = EditValue  
                then    PageLocator(PageTurnerValue)
                endIf
        endmethod



Tue, 30 Dec 1997 03:00:00 GMT
 Pages and forms...? : .(
: I have this form with a page, as the first of nine,
: which I want to present to the user as quickly as he get there.
: It's a 'sort' of menu.

: I understand that the program show the page in the form that contain
: a tab-stop.I have this idea about it's maybe somewhat the first
: tab-stop the program recognize? Yesterday I was sure about that because
: it worked then (not today!!!)

: My problem is that the page, that the program stops at, is the last
: page (yesterday it was no problem, it stopped at the first page
: but today it stops at the last page!!!!)

: How do I tell Paradox (OPAL) that it shall show the first page in
: the form???

Scroll back to the first page and SAVE the form again.

--
=========================================================================
Kasey K. S. Chang (a guy)             | Paradox for Windows Programmer

URL> http://userwww.sfsu.edu/~kschang | X-COM Guru   General PC expert
--------------------------------------+----------------------------------
Editor of XCOM and XCOM2 UN-official Strategy Guide -- FREE!  (See URL)



Tue, 30 Dec 1997 03:00:00 GMT
 
 [ 6 post ] 

 Relevant Pages 

1. HELP with html page and form

2. Multi-Page Tabbed Forms

3. ?Return to page of form you left?

4. PW4.5:Printing varying page length form letters

5. Web Index Page Search form connection to FMP data file

6. PDOXWIN: reports print 1 page from form!???

7. Page Printing Muti-Page Forms

8. pdox4.5 m-page forms:printing 2nd page

9. Moving between pages in a multi-page form

10. Recordset paging when sql comes from form on same page

11. Passing form values to SQL Connection string on ASP page

12. Estimating Programming Effort - Forms/Pages


 
Powered by phpBB® Forum Software