In the attached project, the code has been adapted from the Expandable CLV Erel posted on the forum.
When the arrow on an expandable item is clicked, the expansion panel opens with another clv containing TextItems. The goal is that if the new clv only contains a few items, it will fit neatly between two items in the parent CLV. If it contains, say, 20 items, its height will be limited so it can be fully visible between two items in the parent, and have its own scroll bars to allow the user to scroll through the child items.
The essential code is in the clExpclv class module, the dtmm_Schemes is only used for setup of colors.
I am seeing these problems:
When I click on any of the parent items except the bottom two, the child opens and loads, and there is a space on the right of the text items where the Scrollbar should be - but no scrollbar is visible. Clicking on the arrow to close it, then clicking again to reopen it shows the same child items (as it should) but this time there is no scrollbar and the space for the scrollbar has disappeared. The user can still scroll through the child items by using the mouse wheel.
When I click on either the bottom item or the bottom but one, I see the child items loaded properly with the scrollbar present. However, clicking and clicking again on this item is unpredictable - sometimes I see the item fully loaded but into the space a single item normally fills, other times it will fill all the space as it should.
The screenshots I have uploaded show some of these results.
Been working on this for a while with different compinations in my code and I feel as though I almost have it - but sadly not there yet.
It's would be a pretty powerful combination if it could be made to work.
When the arrow on an expandable item is clicked, the expansion panel opens with another clv containing TextItems. The goal is that if the new clv only contains a few items, it will fit neatly between two items in the parent CLV. If it contains, say, 20 items, its height will be limited so it can be fully visible between two items in the parent, and have its own scroll bars to allow the user to scroll through the child items.
The essential code is in the clExpclv class module, the dtmm_Schemes is only used for setup of colors.
I am seeing these problems:
When I click on any of the parent items except the bottom two, the child opens and loads, and there is a space on the right of the text items where the Scrollbar should be - but no scrollbar is visible. Clicking on the arrow to close it, then clicking again to reopen it shows the same child items (as it should) but this time there is no scrollbar and the space for the scrollbar has disappeared. The user can still scroll through the child items by using the mouse wheel.
When I click on either the bottom item or the bottom but one, I see the child items loaded properly with the scrollbar present. However, clicking and clicking again on this item is unpredictable - sometimes I see the item fully loaded but into the space a single item normally fills, other times it will fill all the space as it should.
The screenshots I have uploaded show some of these results.
Been working on this for a while with different compinations in my code and I feel as though I almost have it - but sadly not there yet.
It's would be a pretty powerful combination if it could be made to work.
Would appreciate it if someone could look at this and see if there is a solution.
Attachments
-
Expandable CLV Color Problem.zip5.3 KB · Views: 208
-
CLV1_Item 2 10 Rows of 20 showing after 1st click, space for scroll bar but no bar showing.PNG177.7 KB · Views: 256
-
CLV1_Item 2 10 Rows of 20 showing after 3rd click, no space for scroll bar, no bar showing.PNG174.1 KB · Views: 258
-
CLV1_Item 199 10 Rows of 20 showing with scroll bar as expected.PNG177.1 KB · Views: 282
-
CLV1_Item 199 only 1 Row of 10 showing.PNG63.9 KB · Views: 224
-
CLV1_Item 200 10 Rows of 20 showing with scroll bar as expected.PNG179.9 KB · Views: 250