Property Grid VScroll Notify Message |
Post Reply |
Author | ||
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
Posted: 06 April 2016 at 5:13am |
|
I find it useful to have a notification whenever the Property Editor is scrolled vertically.
This way I can ensure that when I update the control the scroll position is kept. But the Property Editor does not send notification when scrolled. Therefore I added a call to
last in the functions
Can you make an official notification message, so I don't have to add this every time the XTToolkit changes version. -cpede
|
||
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
||
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
|
Can anyone confirm that this will be added in v17.3?
-cpede
|
||
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
||
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
|
Still not changed in v19 ??
OK, why is this so important? If you have a long Property Grid which requires the vertical scrollbar to be visible, and you change a property value in the lower part of the property grid, it tends to scroll up to the beginning, hiding the property just edited. I propose the following changes in XTPPropertyGridView.cpp:
and
-cpede
|
||
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
||
cluster
Groupie Joined: 22 January 2015 Status: Offline Points: 91 |
Post Options
Thanks(0)
|
|
Hi cpede, I have solved this problem like this: void CPropertyManager::UpdateContent(DWORD dwContentType) { ASSERT(m_wndPropertyGrid.GetSafeHwnd()); int nTopIndex = -1; if (dwContentType == m_dwLastContentType) { nTopIndex = m_wndPropertyGrid.GetTopIndex(); } CXTPPropertyGridUpdateContext GridContext; m_wndPropertyGrid.BeginUpdate(GridContext, FALSE); ... Do all modifications and updates m_wndPropertyGrid.EndUpdate(GridContext); if (nTopIndex >= 0) m_wndPropertyGrid.SetTopIndex(nTopIndex); // Verhindert das Scrollen } it works perfekt for me....
|
||
Windows 7
Visual Studio 2013 CodeJock 18.6 |
||
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
|
Thanks for the code idea. I did the same code, and it works great for one element.
But consider the following: You have e.g. 2 elements that you want to show properties for. When you click on the first element the property editor is populated with items. Now the topindex will be at 0. If the item list is long you have to scroll down to look at the last items, and the topindex will change to "X". Then you click on the second element, and the property editor is populated with properties for that element. Now the topindex will be at 0 again, since the number of items are different from the two elements. Now if I change back to the first element the the property editor is populated and the topindex will be at 0 again. In this case I would prefer it to scroll down to topindex "X". So, I need a way to get notified when the property editor item list is scrolled, and then store the topindex for that element. -cpede
|
||
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |