Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assigning a CA cursor to a ComboBox in a container
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Assigning a CA cursor to a ComboBox in a container
Divers
Thread ID:
00774978
Message ID:
00774978
Vues:
64
Hi all,

This one will take some explaining, so stay with me...

I have a form which grabs containers from a classlib, orders them, and displays the first container to the user. These containers are populated and selected near the end of the Init() of the form.

These containers use multiple instances of a subclass of the ComboBox control with the Style property set to 2-Dropdown List, and no RowSource or RowSourceType properties.

This form also uses a subclassed DataEnvironment with several CA's. One of those CA's is a parameterized SELECT from a native VFP "lookup items" table. The CA is named cadLookupItems and its cursor is named curLookupItems.

PROBLEM: I can't seem to assign the RowSource or RowSourceType properties of the ComboBox controls in the containers to the cursor and Type=2 (Alias) AT DESIGN TIME without causing one of two errors. Either the form can't find the cursor, or I get a "field phrase is not found" error. Once the form is instantiated, I can manually populate the cursor with CursorFill(), and set the NumberOfElements property of the combo, but it won't refresh on the form (and yes, I call the Refresh() method). I'd actually prefer to set them at runtime, but I'm not sure exactly WHERE in the event sequence I should do this).

I find it hard to believe that the VFP team provided us neat new features like CA's and subclassable data environments and then made it difficult to successfully bind a container's controls using these features at design time.

What stupidly simple, foolish mistake am I making here?

TIA,
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform