Duilib Listui When scrolling the list appears outside the list

Source: Internet
Author: User

Do today use Listui to see a bug in the data discovery: when the scroll bar of the list control is moved, only a portion of the item is displayed on top of it, and the remainder is occasionally displayed outside the bounds.

When I first looked at Listui, I thought it was time for setpos to calculate the problem caused by the error. This is based on the fact that when you move the scroll bar, a refresh occurs and then the redraw is triggered. The SetPos is then raised to update the list. But when I went in there, I found that all the calculations were correct.

Now that the calculations are correct, it should be that the update was triggered after the setpos. Then continue to follow, and the discovery will cause the OnPaint operation to update all the controls accordingly. But in OnPaint, I found a strange situation. Each time you call OnPaint, you draw using the rect of the control itself instead of the intersection of its own control's rect with the area of the control itself. So the Pcontrol->dopaint (HDC, rcpaint) should be modified to pass through:: Intersectrect (&rctemp, &RC, &pcontrol->getpos ()) Calculates the completed rctemp instead of the rcpaint.

As a result, some of the data that is caused by the error of the calculation refresh area when using OnPaint is displayed to the outside world.

Duilib Listui When scrolling the list appears outside the list

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.