Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Column Order & ActiveColumn Property
Message
De
13/04/1999 11:27:11
 
 
À
13/04/1999 02:24:01
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00206045
Message ID:
00207830
Vues:
23
>>Nope. Won't work. ColumnOrder values do not have to be contiguous. That is, columnorder values can be 1,5,12,19; all that happens is that VFP displays the columns in that order. The absolute values are not used, just the values relative to one another.
>>
>>Thanks
>What ? Reread the code. Of course columnorders need not be in order otherwise just using this.columns(this.activecolumn) would be sufficient. This method finds original columns collection index. That is : If you have columns named Column1, Column2..ColumnN, put this code to ARCC and add and textbox control named text1 and mix their order anyway on the fly :
LPARAMETERS nColIndex
>local ix
>with this
>  nActiveColumn = .ActiveColumn
>  for ix = 1 to .columncount
>	if .columns(ix).ColumnOrder = nActiveColumn
>             ThisForm.txtbox1.value = .columns(ix).name
>             exit
>	endif
>  endfor
>endwith
This at least works in VFP5 and part of my grid class for the same purpose. I just got VS6 package and don't know if something has changed yet(hope not).
>Cetin
Still don't get it, Cetin.
Lets do an example. I have three columns named Column1 with columnorder = 6, column2 with columnorder = 4, and column3 with columnorder = 56. Silly, but you can do this. The columns will appear on the screen in the order column2, column1 and columnn3.

If I click on the text box in column2, this.ActiveColumn will be 2. But NONE of the columns in the collection have a ColumnOrder property with the value of 2.
Thus the IF statement will never find a match.

It WILL work if the columnorder properties are (in my example) 2,1 & 3. But when they are 6,4 & 56, there is no match.

Or am I really missing something here?

Larry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform