Print Page | Close Window

Programatically scroll Propertygrid

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=23325
Printed Date: 19 April 2024 at 6:28pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Programatically scroll Propertygrid
Posted By: TomasS
Subject: Programatically scroll Propertygrid
Date Posted: 25 April 2017 at 7:01am
Has anyone done this successfully?
I have not found any property to scroll the grid from code.
The reason I want to do this is to work around the bug with the property grid scrollbars not submitting to the control theme. 
I have tried GetScrollPos and SetScrollPos API's on the propertygrid.hwnd with no success.


-------------
Xtreme SuitePro (ActiveX) version 17.3.0, 16.3.1
Windows 10 64-bit
Visual Basic 6.0



Replies:
Posted By: jpbro
Date Posted: 25 April 2017 at 9:08am
Would the EnsureVisible method work for your purposes?


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: TomasS
Date Posted: 25 April 2017 at 9:20am
No, I don't think so. I'm trying to replace or override the scrollbar all together. So I would need a little more control than just ensuring a particular row is visible. At least I would need to know from the outside of the control what is currently visible and a way to set it. I think the EnsureVisible option is a little to rough.

-------------
Xtreme SuitePro (ActiveX) version 17.3.0, 16.3.1
Windows 10 64-bit
Visual Basic 6.0


Posted By: TomasS
Date Posted: 25 April 2017 at 10:37am
EnsureVisible could take me as far as making sure the scrollbar does set a certain item as visible. There is however no means to tell if an item IS visble or not in the first place. This would be needed to set the scrollbar on or off. If some items are not visible I would also need to know this information to be able to set the scrollbar max and value properties.Unhappy

-------------
Xtreme SuitePro (ActiveX) version 17.3.0, 16.3.1
Windows 10 64-bit
Visual Basic 6.0


Posted By: cpede
Date Posted: 25 April 2017 at 2:12pm
Similar problem in  http://forum.codejock.com/forum_posts.asp?TID=22989" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=22989 .

I add this message to store the top item in the property grid. Then I can set the top item again later making it scroll to that position.

-cpede



-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net