Jump to content

Richedit horizontal scroll right arrow problem


Go to solution Solved by pixelsearch,

Recommended Posts

Hi,

I have a problem with the horizontal scroll right arrow in richeditcontrol.

If i scrool to the right with the horizontal slider evrything works fine, the scroll is limited by the length of longest line.

But if I use the horizontal scroll right arrow and click on it, it scrolls further without limit.

$hStyle = BitOR($ES_MULTILINE, $ES_WANTRETURN, $ES_NOHIDESEL, $WS_VSCROLL, $WS_HSCROLL)
    $hExStyle = $WS_EX_CLIENTEDGE

    $hWE_Control = _GUICtrlRichEdit_Create($hWE_GUI, "", 0, 0, $iWidth, $iHeight, $hStyle, $hExStyle)

Thanks for assistance.

Cheers mike

Link to comment
Share on other sites

  • Moderators

mike1950r,

Scrollbar works just fine for me:

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <EditConstants.au3>
#include <WindowsConstants.au3>
#include <ScrollbarConstants.au3>
#include <GuiRichEdit.au3>

$sText = "XXXXXXXX xxxxxxxxxxx xxxxxxxxxxx XXXXXXXXXXXXXX xxxxxxxxxxxxx XXXXXXXXXXXXXXXXXX"

$iStyle = BitOR($ES_MULTILINE, $ES_WANTRETURN, $ES_NOHIDESEL, $WS_VSCROLL, $WS_HSCROLL)
$iExStyle = $WS_EX_CLIENTEDGE

$hGUI = GUICreate("Test", 500, 500)

 _GUICtrlRichEdit_Create($hGUI, $sText, 10, 10, 400, 300, $iStyle, $iExStyle)

GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hi Melba23,

thanks for your post.

Youre script does exactly the same error like mine.

Scroll with slider to max right and everything is fine.
It stopes scrolling to the right at the value of longest line.

Now click right arrow button horizontal and you will see:

It keeps on scrolling even if the max line length has been reached.
It has to stop there like the horizontal slider does, but it doesn't.
As if it would not know that the longest length has been reached.

This is my problem.
 

Cheers mike

Link to comment
Share on other sites

  • Moderators

mike1950r,

Quote

and you will see:

It keeps on scrolling even if the max line length has been reached.

I completely understood your problem and this script does not display the same problem when I run it. I get the scroll until the end of the line and then it stops, just as it should. It makes no difference whether I use the scrollbar thumb or the arrows - the right scroll is limited by the length of the line.

Are you are telling me that running the exact script that I posted above allows you unlimited scrolling to the right when using the arrow?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

10 hours ago, Melba23 said:

mike1950r,

I completely understood your problem and this script does not display the same problem when I run it. I get the scroll until the end of the line and then it stops, just as it should. It makes no difference whether I use the scrollbar thumb or the arrows - the right scroll is limited by the length of the line.

Are you are telling me that running the exact script that I posted above allows you unlimited scrolling to the right when using the arrow?

M23

Hi Melba23,

thanks for your answer.

Yes indeed, I ran exactly your script.

Do you think it can be a windows problem?
I'm on windows 7pro 64bit.

It's strange, I did not pay attention for this before.

This problem is not in notepad but it is the same thing in notepad++ and in wordpad.

Strange issue though.

Cheers mike

Link to comment
Share on other sites

  • Moderators

mike1950r,

Both Notepad and Wordpad scroll horizontally in a completely normal manner for me, so I would suggest that there is something in your setup that is causing the problem - although I have absolutely no idea what it could be.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Are you aware that since this issue appear across many applications it has nothing to do with AutoIt? So @Melba23 is right, this forum is about AutoIt not to fix some OS issues.

 

Edit: in notepad++ I know that it's an option or plugin to allow scrolling beyond the EOF. Check if you have such settings on the apps with this issue.

Edited by Andreik

When the words fail... music speaks.

Link to comment
Share on other sites

 

Andreik,

Melba said he has absolutely no idea what it could be.
BTW even if it was no autoit issue, autoit could be able for a workaround to solve this problem.

Thanks for the info concerning notepad++
Still could not find such a setting, atleast i would not have enabled such a setting, which makes not sense.

Thanks anyway.

Cheers mike

 

Link to comment
Share on other sites

Andreik,

updated notepad++ to newest version and issue was gone.

Anyway the problem in richedit control still exists.
I tried to compile 32bit and 64bit, but in both exe still exists.

So I would be very thankful for any suggestions.

Thanks so far.

Cheers mike

Link to comment
Share on other sites

Just now, mike1950r said:

I tried to compile 32bit and 64bit, but in both exe still exists.

As I said, I doubt it's something related to AutoIt so you can compile for 8-bits processors as well, you still have to figure it out what's going on with these apps. Try to reinstall WordPad.

When the words fail... music speaks.

Link to comment
Share on other sites

Andreik,

BTW it's not happening in this script:

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

Example()

Func Example()
        GUICreate("My GUI edit") ; will create a dialog box that when displayed is centered

        Local $idMyedit = GUICtrlCreateEdit("First line" & @CRLF, 176, 32, 121, 97, $ES_WANTRETURN + $WS_VSCROLL + $WS_HSCROLL + $ES_AUTOVSCROLL + $ES_AUTOHSCROLL)

        GUISetState(@SW_SHOW)

        Send("{END}")

        ; will be append dont' forget 3rd parameter
        GUICtrlSetData($idMyedit, "Second line", 1)

        ; Loop until the user exits.
        While 1
                Switch GUIGetMsg()
                        Case $GUI_EVENT_CLOSE
                                ExitLoop

                EndSwitch
        WEnd
        GUIDelete()
EndFunc   ;==>Example

This is normal editor and not rich editor.

Cheers mike

Link to comment
Share on other sites

How do you think RichEdit control works in AutoIt, by magic? If some dlls are broken or missing or whatever, by reinstalling wordpad you might get a fix and the result will be seen in AutoIt as well. And really, do a basic google search to learn how to install/reinstall wordpad.

When the words fail... music speaks.

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...