Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Activecontrol in grid & activecolumn in grid.valid
Message
 
À
25/09/1998 01:24:06
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00140243
Message ID:
00140719
Vues:
25
Cetin,

>Unfortunately activecontrol applies to form, page, toolbar, _screen not grid. form.activecontrol return the grid, not current active control of it. Thanks.

Thats very true. You'd probably hate me for this but the way out would be to store the column's currentcontrol's object reference to a property on the form from the GotFocus() event of each control in each column.
*-- Grid.Column.TextBox.GotFocus()
thisform.oLastControl = this
or
thisform.cLastControlPath = SYS(1272, this)
>
>>Hi Cetin,
>>
>>I would create an object which has an array. This array would store only a max of two object references.
>>
>>Use your code to get the currently active Object. Then call a method in the array object passing this object as a parameter. This method would push the last object out of the array and put the new one at position one. (LIFO)
>>
>>This way you get references to your last two objects. You might store into regarding the record to this array too... things like PKey etc.
>>
>>>Hi folks,
>>>Is there an easier way to determine active control in grid ? This code is from beforerowcolchange and already verified it's a rowchange (nColIndex has column value) :
with this
>>>  if !empty(.columns(nColIndex).dynamiccurrentcontrol)
>>>     cCurrentControl = ;
>>>        eval(.columns(nColIndex).dynamiccurrentcontrol)
>>>  else
>>>     cCurrentControl = .columns(nColIndex).currentcontrol
>>>  endif
>>>  with evaluate(".columns(nColIndex)."+cCurrentcontrol)
>>>	.value = .value && So we can evaluate table ruleexpression
>>>  endwith
>>>endwith
And next problem. Is there a way to determine last activecolumn in grid.valid, w/o saving it to some property ? MTIA
>>>Cetin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform