Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Current left column to right of locked columns
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01364611
Message ID:
01364771
Vues:
18
OK, now I'm confused. How does the splitter bar mess up objtoclient for you? What you're saying doesn't make sense. The split bar doesn't cause additional columns to disappear to the left of the lock in the right partition... if anything they would disappear to the right of the grid. Which partition are you locking (left or right or both)? Are both partitions synchronized or do you have them PanelLink set to .F.? (might be easier if you just provided a simple repo).

In any event, I don't see how the split bar would make a difference. The only thing I can think of is that you have reordered the columns and Cetin's original code doesn't step through the columns in column order (which it should as noted in an earlier discussion in this thread). But, I might just be bloody confused about what you're trying to accomplish... As I understood it, you are locking 2 columns in the right partition and then scrolling to the right which causes columns 3 and 4 (for instance) to disappear and now column 5 is just to the right of the locked columns... and as far as I can tell (other than the column order thing) Cetin's code will give you the index of column 5 within MyGrid.Columns(indexreturned) as long as it is visible and you haven't moved the splitter all the way to the right making none of the columns visible in which case you may need to work with MyGrid.Partition which will tell you how large the user has made the partiion. If they've made it large enough that there isn't room on the right for any of your unlocked columns, well then you know that there isn't a column visible to the right of the locked columns.

Another thing that would really help here is what you are trying to accomplish. I mean what is the business requirement that necessitates the need to know what the column is that is just to the right of the locked columns?

>Hi Cetin
>
>In my test form when I scroll the second half of my split grid (2 locked columns), the code tells me that the left most column is 3, but in my test column 3 is not visible?
>
>The code steps from column3, and reports that the left is 951 not less than zero?
>
>Not sure what i'm missing here?
>
>Robin
>
>
>
>>Robin,
>>Exactly that.
>>The code would return you the first 'human' visible column's 'index' after the locked columns. All you need is to:
>>
>>lnIndex = GetColumnOnLeft( thisform.myGrid )
>>oColumn = thisform.myGrid.Columns( m.lnIndex )
>>
>>Cetin
>>
>>
>>>Hi Cetin
>>>
>>>I want to know what the 1st visible column is after the locked columns, even if the user has used the vertical scrollbar.
>>>
>>>When I say visible I dont mean the property, I mean that the user can see in the grid.
>>>
>>>Robin
>>>
>>>
>>>>>If I have a grid with several columns locked, is it possible work out what the first visible column on the right of the split is?
>>>>
>>>>From http://www.foxite.com/archives/column-locking-in-a-grid-0000198556.htm
>>>>
* GetColumnOnLeft.prg
>>>>LPARAMETERS toGrid
>>>>Local ix
>>>>With toGrid
>>>>  For ix = .LockColumns+1 To .ColumnCount
>>>>    If Objtoclient(.Columns(m.ix),2) > 0
>>>>      Return m.ix
>>>>    Endif
>>>>  Endfor
>>>>Endwith
>>>>return -1
>>>>Cetin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform