Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

ScrollPos Property

I am having trouble setting the ScrollPos property. I can Get the property and it will give me an array with the top, left cell position showing on the edit table, but when I use Set_Property, it will not change the scroll position of the table at all. I did the following test to assure that nothing was going on in my code:
1) Create a non databound form and place OLE control - defined as SRP.EditTable.1
2) In CREATE event set the ARRAY property with data of 50 records/rows of test data
3) Use the following code to set the scroll position of the edit table: PosArray = "" PosArray<1> = 1 PosArray<2> = 20 Set_Property(@Window:".OLE_TABLE", "OLE.ScrollPos", PosArray) Result is the edit table scroll position still at column 1, row 1.

Something I'm missing?

Comments

  • You might be fighting with the ResetSelPos property. By default, this property is enabled because it emulates OI table behavior, which is to reset the position to the first cell as soon as the table gets focus.

    You can either set ResetSelPos to 0 or make sure you set the ScrollPos after ensuring the table has focus, which is not guaranteed during the CREATE event unless you set the FOCUS property to 1 first.
  • I have the ResetSelPos set to 0 and I have tested setting the ScrollPos with focus on the table and off the table and it still does not change the scroll position.
  • Oh, I forgot that I recently had to fix this. Go to our downloads page and get the latest version.
  • The new version works correctly. Thank you! :-)
Sign In or Register to comment.