Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching for good reference....
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00668638
Message ID:
00669567
Vues:
21
Kevin,

>Case in point...I was building a demo form with a pageframe and a few pages...and really struggled how to do things like ...
>
>IF MyPage.CurrentPage = 1
> do this...
>
>or
>
>MyPage.ActivePage = 2 [to set the current page programatically)...

Did you finally figure out how to do this? If not...

.NET's TabControl is a bit different from Visual FoxPro's PageFrame. First of all, each element of a TabControl--the TabControl itself and each TabPage are surfaced as form-level objects. For example, if you have a TabControl named MyTabControl that has two pages named tabSummary and tabDetail, all three are surfaced as at the form level as follows:

this.TabControl
this.tabSummary
this.tabDetail

(For that matter, all controls contained in each TabPage are also surfaced as form-level objects).

Now, let's say you are on the tabSummary page and want to change to the tabDetail page. You can use the following form-level code:
this.TabControl.SelectedTab = this.tabDetail;
If you want to check if the current tab is the tabSummary page you could run the following form-level code:
if (this.tabControl.SelectedTab == this.tabSummary)
{
   // perform processing
}
In addition to the books mentioned by others, I've got an upcoming book ".NET for VFP Developers" that's coming out in September 2002 (Hentzenwerke publishing, tech-edited by Cathi Gero) that I think you'll also find useful.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform