Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setfocus to the visible first column, not the defined 1s
Message
From
16/09/2006 11:40:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01154356
Message ID:
01154385
Views:
13
>>>Yes, yes it will work this way. Visually add and extra column, by default it will be at the end all the columns. Now shift this latest (last) column to be the first column visually, setting the no. as 1 in the properties sheet. the it will stop working
>>
>>You mean you added a column and set its columnorder to 1? Borislav's code should still work.
>
>Unfortunately it won't :-(
>It set the focus to Column1 not to ColumnXX which is the last added column.

I had (in my mind, at least) a fix for these cases, where columnorder isn't equal to column index, but I'm quite busy at the moment, and I've done some changes to the app where I was testing the TotalGrid, so it won't work now.

The idea is to, well, in grid's init
this.addproperty("aCTab[1]",0)
dime this.aCTab[this.columncount]
for i=1 to this.columncount
   this.acTab[this.columns[i].columnorder]=i
endfor
Then we'd have an array addressable by the column order, which would return the index of the column. So the scroll loop would scroll until column[this.aCTab[1]] becomes the .leftcolumn. Not sure that'd work, though, but worth a try.

Um, assuming the columnorder numbers actually go from 1 to .columncount - I know they should, but did anyone really check that? :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform