Board index » delphi » Help: Tabbednotebook and ActivePage

Help: Tabbednotebook and ActivePage

Hello,

Tabbednotebook component:
How can I know, when am I on specific page ?
At that page I have to open a few tables and execute
a stored procedures before showing DBGrid and DBEdits.

Thanks,

AJL

Antti J. Lind
anttij.l...@outokumpu.fi

 

Re:Help: Tabbednotebook and ActivePage


In article: <4un8c9$...@idefix.eunet.fi>  anttij.l...@outokumpu.fi@ writes:

Quote

> Hello,

> Tabbednotebook component:
> How can I know, when am I on specific page ?
> At that page I have to open a few tables and execute
> a stored procedures before showing DBGrid and DBEdits.

The PageIndex property.

if Notebook.PageIndex = 0 then {On first page}

The OnPageChanged event may also be useful.

--
Chris Isbell               Southampton, England
ch...@kenda.co.uk (work)   ch...@isbell.demon.co.uk (home)
+44 1703 869922            +44 1703 465367

Re:Help: Tabbednotebook and ActivePage


Quote
anttij.l...@outokumpu.fi@ wrote:

> Hello,

> Tabbednotebook component:
> How can I know, when am I on specific page ?
> At that page I have to open a few tables and execute
> a stored procedures before showing DBGrid and DBEdits.

> Thanks,

> AJL

> Antti J. Lind
> anttij.l...@outokumpu.fi

--

Use the "OnChange" or "OnSelection" (whichever it is) events to check for
the TTabbedNotebook.PageIndex property value. 0 is the first page, 1 is
second... Use a case statement or such to customize what you want
depending on PageIndex value.

Good luck,

Howard

Re:Help: Tabbednotebook and ActivePage


Quote
>Hello,

>Tabbednotebook component:
>How can I know, when am I on specific page ?
>At that page I have to open a few tables and execute
>a stored procedures before showing DBGrid and DBEdits.

>Thanks,

>AJL

>Antti J. Lind
>anttij.l...@outokumpu.fi

The tpagecontrol event on change.  Then step up a case statement  such as;

Pagecontrol1.activepage.pageindex of
   2;
    begin
     {this is page 2 of your tabbed notebook}
   end;
  3;
   begin
    { this is page 3 and etc
  end;

hopefully this will help you

Mel

Re:Help: Tabbednotebook and ActivePage


In article <4un8c9$...@idefix.eunet.fi>, From
anttij.l...@outokumpu.fi@, the following was written:

Quote
> Tabbednotebook component:
> How can I know, when am I on specific page ?
> At that page I have to open a few tables and execute
> a stored procedures before showing DBGrid and DBEdits.

How about the pageindex property.

God Bless,

--
Jay Schwisow j...@weldnet.com
08/12/96 19:57
---------
Using: OUI PRO 1.5.0.2 from http://www.dvorak.com

Other Threads