dbTalk Databases Forums  

Help with multi-tabbed form ... OPal ... Paradox 10

comp.databases.paradox comp.databases.paradox


Discuss Help with multi-tabbed form ... OPal ... Paradox 10 in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
andrewnp
 
Posts: n/a

Default Help with multi-tabbed form ... OPal ... Paradox 10 - 03-12-2006 , 10:15 PM






Hi;
I have a single form which includes a portion which includes a series of
tabs (5); so that clicking on the tab will reveal a series of fields
relevant to the tab but will keep the top of the form revealed. Rather
then multiple, separate forms, its convenient to jump between the tabs.
The top of the form includes the form's key field.

When I open up the form, it opens with the fifth tab and the
corresponding fields associated with that fifth tab open.

I'd like the form, to open up with the "first" tab, and its forms
visible. I can't find out how this is done using OPal.

Any help would be appreciated.

Thanks, -- Andrew

Reply With Quote
  #2  
Old   
Jim Moseley
 
Posts: n/a

Default Re: Help with multi-tabbed form ... OPal ... Paradox 10 - 03-12-2006 , 11:00 PM







Andrew,

Put the form in Design mode, click on the first tab, then just save it.
Next time you open it, taadaa.

Jim Moseley


Reply With Quote
  #3  
Old   
Ed Nash
 
Posts: n/a

Default Re: Help with multi-tabbed form ... OPal ... Paradox 10 - 03-13-2006 , 09:17 AM



andrewnp wrote:
Quote:
I'd like the form, to open up with the "first" tab, and its forms
visible. I can't find out how this is done using OPal.
Include a moveTo() in the open event on the Notebook object. E.g., if
the Notebook's first tab was named Andrew01 the code would look like this:


method open(var eventInfo Event)

;make sure Andrew01 tab is first
Andrew01.moveTo()

endMethod


Reply With Quote
  #4  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: Help with multi-tabbed form ... OPal ... Paradox 10 - 03-13-2006 , 09:52 AM



In addition to that, from your description it sounds like you have the
fields bare on the form and the Notebook tabs. You should put the fields on
the top of the form and the ones on the note tabs in an MRO (it can contain
the whole notebook in the record object) if you plan to do any data entry
or record manipulation with the form. Otherwise you won't have any record
object to interact with. See my papers on Database Basics and Containership
in Forms on our paradox resources page (link in my signature).

Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and non-profits
since 1982



Reply With Quote
  #5  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: Help with multi-tabbed form ... OPal ... Paradox 10 - 03-13-2006 , 05:49 PM



Except, of course, you pretty much never want to name a notebook or its pages.
You just complicate your contanership that way. And the save with that tab
forward solution should work. You can also change the notebook's currentpage
property to the page you want (even using the noise names) in the form arrive
or the Notebook arrive.

Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and non-profits
since 1982




Reply With Quote
  #6  
Old   
Anders Jonsson
 
Posts: n/a

Default Re: Help with multi-tabbed form ... OPal ... Paradox 10 - 03-14-2006 , 12:23 AM




Quote:
Except, of course, you pretty much never want to name a notebook or its
pages.
I have seen this advice on the NG many times but I must admit I fairly often
have namned my notebook pages and never seen any strange behaviour. I have
always been able to refer to fields, buttons etc on the pages without
problem. Could you give a quick example on what could go wrong?

I'm just curious.

Anders




Reply With Quote
  #7  
Old   
Tom Krieg
 
Posts: n/a

Default Re: Help with multi-tabbed form ... OPal ... Paradox 10 - 03-14-2006 , 01:31 AM



I've always named my notebook and its pages, because I have a toolbar
which includes buttons which allow the user to move to specific pages
and I've never had any problems.

In some cases, where I want the user to step through NB pages in a
specific sequence, and disable or enable pages depending on checkboxes
on page 1, I hide the tabs and just have a next or previous button to
move to the next or previous notebook page.

In answer to the question:

NBName.SetProperty("CurrentPage", "NBPageName")

Anders Jonsson wrote:
Quote:
Except, of course, you pretty much never want to name a notebook or its
pages.


I have seen this advice on the NG many times but I must admit I fairly often
have namned my notebook pages and never seen any strange behaviour. I have
always been able to refer to fields, buttons etc on the pages without
problem. Could you give a quick example on what could go wrong?

I'm just curious.

Anders

Reply With Quote
  #8  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: Help with multi-tabbed form ... OPal ... Paradox 10 - 03-14-2006 , 09:56 AM



Not about strange behavior but about adding yet another object to the
containership. When you name an object you need to use the name to call anything
contained in that object from outside the object which you do not have to do
with noise names. (you should be able to call from within the container without
adding the container name so within a notepage or notebook you would be OK) So
you add to the amount and complexity of code. Why do that unless you need a name
to actually call an object or reference it. And since you can usually reference
a notetab by calling some object in it (MyMRO.container) it just seems pointless
and problematic to name a notebook or its pages.

Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and non-profits since
1982




Reply With Quote
  #9  
Old   
Anders Jonsson
 
Posts: n/a

Default Re: Help with multi-tabbed form ... OPal ... Paradox 10 - 03-14-2006 , 12:36 PM



Quote:
When you name an object you need to use the name to call anything
contained in that object from outside the object which you do not have to
do
with noise names.
That is not what I'm seeing or maybe I don't get it?

Let's say i have a form with a Notebook with 2 pages. On one of the pages I
have a tableframe and in that frame I have a field CustomerNo.

Outside the notebook, on the forms page, I have a button with code like
view(CustomerNo).

The button will display the active customer number.

If I rename the notebook page that contains the tableframe to "FirstPage", I
can still run the code on the button and it will display the correct
customer no.

Quote:
Why do that unless you need a name
to actually call an object or reference it. And since you can usually
reference
a notetab by calling some object in it (MyMRO.container) it just seems
pointless
and problematic to name a notebook or its pages.
Sometimes I wish to know if the notebook page is active and then I find it
easier to refer to it with something like
if FirstPage.Focus=true
then
....

My main rule is that I rename an object with a #name if I'm going to refer
to it in code.

Anders




Reply With Quote
  #10  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: Help with multi-tabbed form ... OPal ... Paradox 10 - 03-14-2006 , 03:40 PM



OK. I have certainly received "Object named X is not visible from object Y" when
using named notetabs so I stopped a long time ago (probably with P7 when they
were introduced). I don't think I am the only one who has experienced this but
if you find it working for you that is fine by me.

Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and non-profits since
1982



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.