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
Divers
Thread ID:
00774978
Message ID:
00775173
Vues:
16
I am in the middle of getting all my stuff installed on a new PC, so I do not have access to VFP8 to test this, but, just a SWAG, do you have the fields you need to bind in the CursorSchema property of the CA?

>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,
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform