Problems with vertical scrollbar |
Post Reply |
Author | ||||
farr02
Groupie Joined: 10 May 2005 Status: Offline Points: 51 |
Post Options
Thanks(0)
Posted: 03 November 2005 at 7:39am |
|||
Hello,
I have two problems with the vertical scrollbar in the property-grid. I have added two more categories to the GridSample. They only hold one variable height item each. When these categories are expanded and another category will be expanded so that the visible grid becomes bigger than the corresponding window the vertical scrollbar does not appear. The image below shows this problem: The second problem may have the same cause as the first one. After expanding another category the vertical scrollbar appears but its length is incorrect. When I click it, the scrollbar gets shorter. See the second picture. It looks like a problem in calculating the correct height of the grid. I hope someone can help me. Best regards, Holger |
||||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|||
Hmmm... using 9.80 I can't reproduce it... Can you download evaluation version and check if problem was fixed?
|
||||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||||
farr02
Groupie Joined: 10 May 2005 Status: Offline Points: 51 |
Post Options
Thanks(0)
|
|||
Hello Oleg,
I am already using XTP v. 9.80 together with Visual Studio 6.0. I can produce the problem as follows: I add the following code pCustom = m_wndPropertyGrid.AddCategory(_T("Height: 72"));
pItem = pCustom->AddChildItem(new CXTPPropertyGridItem(_T("Variable Height 1"), _T("Height 72"))); pItem->SetHeight(72); pCustom = m_wndPropertyGrid.AddCategory(_T("Height: 144")); pItem = pCustom->AddChildItem(new CXTPPropertyGridItem(_T("Variable Height 2"), _T("Height 144"))); pItem->SetHeight(144); to the OnInitDialog-function of CPropertyGridDlg-class (in file PropertyGridDlg.cpp of GridSample, right behind the "Custon Buttons"-category). Then I run the application, enlarge the window a little bit (currently it has a height of 510 pixel, width doesn't matter), expand the "Height: 72"-category, after that expand the "Height: 144"-category and get no scrollbar but nearly half of the "Height: 144"-item is invisible. If you collapse "Height: 72"-category and expand it again a scrollbar occurs but it has a wrong length as you can see the length of the bar changing, when clicking on it. BTW if the window is a little bit bigger (lets say height about 520 pixel) no scrollbar occurs when expanding/collapsing "Height: 72"-category ("Height: 144"-category remains expanded). But also half of the "Height: 144"-category is not visible. Hope this helps you to reproduce the error. Bye Holger |
||||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|||
Yes, catched it. Actually seems it is standard ListBox control bug - it not refresh scrollbar after SetItemHeight for LBS_OWNERDRAWVARIABLE items. Trying to find workaround. |
||||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||||
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
|||
Did you ever find a solution for this problem?
It is even more visible when using the CXTPMarkupListBox control.
-cpede
|
||||
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
||||
farr02
Groupie Joined: 10 May 2005 Status: Offline Points: 51 |
Post Options
Thanks(0)
|
|||
Hello cpede,
sorry for the delay but I have to do some Java programming since a couple of weeks... No, I haven't found a solution or workaround for the problem you mentioned. To be honest I haven't looked for a solution very hard because it is marked as a minor and hard to detect problem in our software. (And I relied on Oleg;-) But I am still interested in a solution. Best regards, Holger. |
||||
Product: Xtreme Toolkit Pro version 16.3.1, 18.4.0
Platform: Windows 10 (64 Bit) Language: Visual C++ 15.0 (Visual Studio 2017) |
||||
farr02
Groupie Joined: 10 May 2005 Status: Offline Points: 51 |
Post Options
Thanks(0)
|
|||
Hello again,
when I add the following code to the OnGridNotify function of the PropertyGrid sample (together with the above mentioned variable heights items) I get a correct scrollbar behavior:
I don't know what side effects the above code has, but during debugging the PropertyGrid sample I saw that CListBox::SetTopIndex recalculates the scrollbar. So I just gave it a try. It is not what I would tell a good solution but maybe it can be a hint for the CodeJock team on how to improve the library code. Bye Holger. |
||||
Product: Xtreme Toolkit Pro version 16.3.1, 18.4.0
Platform: Windows 10 (64 Bit) Language: Visual C++ 15.0 (Visual Studio 2017) |
||||
farr02
Groupie Joined: 10 May 2005 Status: Offline Points: 51 |
Post Options
Thanks(0)
|
|||
Hello,
it also works when replacing the
Maybe one can add
This should fix the problem. Bye Holger. |
||||
Product: Xtreme Toolkit Pro version 16.3.1, 18.4.0
Platform: Windows 10 (64 Bit) Language: Visual C++ 15.0 (Visual Studio 2017) |
||||
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 |