Professor_Bernd Posted March 2, 2020 Posted March 2, 2020 I am working on a CallTipViewer for PSPad4AutoIt3. If the CallTip is very wide, it might be moved so that a scrollbar on the right side is not visible. Therefore I am looking for a way to place a scrollbar on the left side of the RichEdit. I have seen in another thread a solution with $WS_EX_LAYOUTRTL for a listview. I tried it, but it does not work in this case because text is displayed backwards and other problems. How can I create a RichEdit with scrollbar left? Here is a demo code with the scrollbar on the right, so helpers will find it easier to help. _GUICtrlRichEdit_Create 4.au3
Musashi Posted March 2, 2020 Posted March 2, 2020 2 hours ago, Professor_Bernd said: I have seen in another thread a solution with $WS_EX_LAYOUTRTL for a listview. I tried it, but it does not work in this case because text is displayed backwards and other problems. Probably not the perfect solution, but at least in your example it seems to work. Instead : $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 100, BitOR($ES_MULTILINE, $WS_VSCROLL)) use : $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 100, BitOR($ES_MULTILINE, $WS_VSCROLL), $WS_EX_LAYOUTRTL) _GUICtrlRichEdit_SetParaAlignment($hRichEdit, "l") "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
Professor_Bernd Posted March 2, 2020 Author Posted March 2, 2020 (edited) Hello, Musashi. Your code is exactly what I've already tried. Here is a screenshot of the result. Unfortunately, it solves one problem but creates another. The text is partly transposed or displayed backwards. In the first line the dot is at the beginning instead of the end. In the third line it is "2 - 1" instead of "1 - 2". Thanks for your effort. 👍 Bernd. Edited March 2, 2020 by Professor_Bernd
Nine Posted March 5, 2020 Posted March 5, 2020 $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 100, BitOR($ES_MULTILINE, $WS_VSCROLL), $WS_EX_LEFTSCROLLBAR) Works for me correctly. French setting / KB. Professor_Bernd and Musashi 2 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Multi-Threading Made Easy
Musashi Posted March 5, 2020 Posted March 5, 2020 (edited) 2 hours ago, Nine said: Works for me correctly. French setting / KB. Works for me as well, German setting. But this style ($WS_EX_LEFTSCROLLBAR) is not documented here (or am I blind?) Otherwise it would have been much easier to find it, of course . Edited March 5, 2020 by Musashi "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
Nine Posted March 5, 2020 Posted March 5, 2020 Found it on MSDN : https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Multi-Threading Made Easy
Musashi Posted March 5, 2020 Posted March 5, 2020 1 hour ago, Nine said: Found it on MSDN : Thanks, Nine. I had found it there in the meantime as well. The info for WS_EX_LEFTSCROLLBAR states : "If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored." No idea for which 'other' languages it is ignored, but in FR and DE it obviously works . I will suggest, that it should be included in German help. There we have a member, who is sacrificially working to improve it. In the end, however, this style is probably of little importance for the majority. "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
Nine Posted March 5, 2020 Posted March 5, 2020 Well, my understanding is that the MSDN explanation applies to a generic windows. But in our case, we use it on a control. I think the comment about shell language is not pertinent when it concerns a control. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Multi-Threading Made Easy
Professor_Bernd Posted March 5, 2020 Author Posted March 5, 2020 (edited) @Nine I can also confirm that it works with DE Layout. A little worried about the limitation "for other languages". And I wonder if there is an important reason why it is not documented in the AutoIt help. If the comment about the shell language is not relevant when it is a control, this would be a very simple and clean solution. Many thanks for this tip. 👍 @Musashi Thanks for testing and additional information. Bernd. Edited March 5, 2020 by Professor_Bernd
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now