Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox ProgrammaticChange not firing
Message
De
23/08/1997 08:17:27
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00046325
Message ID:
00046523
Vues:
34
John,

1) Obviously, I'm not Barbara.

2) As usual, the Help is very weak here. But I would say, based strictly on the NAME of the event, that it is fired only when the object is changed BY CODE. What you describe is not "by code" in my humble opinion.

Knowing this doesn't help (KTDH),
Jim N


>>>>>I have a combobox that doesn't seem to fire the ProgrammaticChange. InteractiveChange event fires OK when I physically change the item in the combobox but when I scroll the main table, the value in the combobox changes appropriately but doesn't fire the ProgrammaticChange event. I need to trap this event so that I could display other information pertaining to the value in the combobox. Anyone know why?
>>>>>
>>>>>TIA
>>>>>John.
>>>>
>>>>Check the Help on ProgrammaticChange. I think it only fires when you make a change in code, not when you're refreshing the combo. Try putting the code in the Refresh event.
>>>>
>>>>HTH
>>>>Barbara
>>>
>>>Thanks Barbara. As usual, the "White Knightengale" quickly comes to rescue!
>>
>>Hey, I like that. Can I put it in my tag line?
>>
>>>This problem is not that simply. First, I'm not just Refreshing the combobox but in fact is changing the value by moving from record to record of the controlsource table. Second, and this is most interestingly frustrating, I had originally created a plain form (not from class) and the ProgrammaticChange worked when I moved from rec to rec. However, when I choose another value from the combobox, it seemed it wasn't firing the InteractiveChange event. After wasting hours trying to figure out why, I try to save the form as Class and create another form based on this class with exact same DE. Now, it seems InteractiveChange seems to fire OK but not ProgrammaticChange event! What's going on I'm saying??? Is it too much to ask to have both features be able to fire??? I can't be the only one ever to use the combobox in VFP 3.0???
>>>
>>>Desperately serious,
>>>
>>>John
>>
>>John, neither the InteractiveChange method nor the ProgrammaticChange method fires when the form refreshes, even if the combo value is changed in the new record.
>>
>>To fire InteractiveChange you must be in the combobox, and make a change in the value. To can fire the ProgrammaticChange method, you have to make a call to the combobox, changing it's value.
>>
>>What exactly are you trying to accomplish? I'll help figure it out if you'll give me more information.
>>
>>Barbara
>
>OK Barbara, you've asked for it so here it is.
>
>I've designed a form to show real estate agent info (the basic name, address, etc.) The agents table which the form is based upon hold a field called OFFICE_ID, a FK for PK of offices table that holds real estate offices. This relationship links which agent works for which real estate office. I've put up a combo box to show the office name and not the linked key which is only a number. This combobox uses SQL-Select as rowsourcetype and has controlsource of the agents.office_id as the bound column.
>
>Now, when I scroll through the agents table, the following sequence of events should happen (I'm assuming here):
>1. office_id value should change
>2. combobox value should change since controlsource is set to office_id
>3. finally, this should cause the ProgrammaticChange event to fire.
>Shouldn't this happen? However, the ProgrammaticChange event never fires. Do I have to explicitly change the value of the combobox based on changes in my office_id field everytime I move from rec to rec 'in code'?
>
>Thanks again for your assistance.
>
>John.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform