Jump to content

RichEdit Vertical Scroll Problem


Recommended Posts

Hi,

I have a problem with vertical scroll.

Run the attached script and click on horizintal slider, vertical slider etc.

the text jumps up and down.

Is there a way to get rid of this?

Thanks for help.

Cheers mike.

#include <GUIConstantsEx.au3>
#include <GuiRichEdit.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
        Local $hGui, $hRichEdit, $iMsg, $sText

        $sText = "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text:" _
        & @CRLF & "This is a text: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

        $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, StringLen(".exe")) & ")", 320, 350, -1, -1)
        $hRichEdit = _GUICtrlRichEdit_Create($hGui, $sText, 10, 10, 300, 220, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL))
        GUISetState(@SW_SHOW)

        While True
                $iMsg = GUIGetMsg()
                Select
                        Case $iMsg = $GUI_EVENT_CLOSE
                                _GUICtrlRichEdit_Destroy($hRichEdit)
                                Exit
                EndSelect
        WEnd
EndFunc   ;==>Example

 

Link to comment
Share on other sites

I can also reproduce this on windows 7, the last line gets hidden when you click the horizontal slider button, but only after having pushed one of the vertical scroll buttons, it doesn't do it right away for me, if I haven't pushed one of those first.

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Link to comment
Share on other sites

2 hours ago, mike1950r said:

So it seems to be a windows problem?

I'm on windows7.

Thanks for testing.

Cheers mike

I don't know, maybe. I simply don't see this behavior on my machine with Win 11. Hope anyone else can confirm.

Edited by Andreik

When the words fail... music speaks.

Link to comment
Share on other sites

Okay, sorry, I misunderstood. But I can reproduce that too. As for a fix, I unfortunately can't offer any suggestions.

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...