TsScrollBox Scrollbar not updated when position set

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35979
    ralfiii
    Participant

    When I set the position of a scrollbar of a scrollbox (either TsScollBox or a skinned TScrollBox) then the content of the scrollbox is properly moved, but the scrollbar is not updated.

    When I afterwards hover the mouse over the scrollbar it's updated and painted at the correct position.

    Demo app attached…

    (the right scrollbox in the demo is an unskinned TScrollBox, there it works)

    Cheers!

    #51358
    Support
    Keymaster

    Thank you for the demo.

    ScrollBox does not receives any messages about a scroll pos changing and we can't catch it.

    You can use this manual scrolls updating while I'm in searching of solution:

    uses acSBUtils;

    with sScrollBox1.VertScrollBar do

    Position := Position+10;

    UpdateScrolls(sScrollBox1.ListSW, True);

    #51628
    ralfiii
    Participant

    Any news on that issue?

    Now I do have a problem with a skinned VCL-scrollbox (so a TScrollbox).

    When it's not skinned it works, when it's skinned it shows the same problem as the AC-scrollbox.

    And with the standard VCL-component the workaround doesn't compile.

    (I just tried with AC V8.53 – no improvement)

    #51651
    Support
    Keymaster

    I can't receive any message from system about changing of position.

    You can use universal method for scrolls repainting:

    SendMessage(sScrollBox1.Handle, WM_NCPAINT, 0, 0)

    #51688
    ralfiii
    Participant

    Top, that does the job.

    Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.