I use the following script to change Text Direction (LTR/RTL) in both Views.
notepad.menuCommand(MENUCOMMAND.EDIT_LTR) notepad.menuCommand(MENUCOMMAND.VIEW_GOTO_ANOTHER_VIEW) notepad.menuCommand(MENUCOMMAND.EDIT_LTR) notepad.menuCommand(MENUCOMMAND.VIEW_GOTO_ANOTHER_VIEW)
After the script is run, the Synchronized Scroll is turned off. What might be the cause?
Is there a better way to change Text Direction in both Views? I couldn't find a way to do that with editor1 and editor2.
Thank you.
It should be: notepad.menuCommand(MENUCOMMAND.VIEW_SWITCHTO_OTHER_VIEW)
Still, Is there a better way?
Thanks.
No, I don't think there is a better way. I've had a quick look at what MENUCOMMAND.EDIT_LTR does, and it alters the window style, which you can't do from Scintilla (at least not as far as I can see - there's no docs on it).
https://github.com/bruderstein/npp/blob/20bcc0ed34453894780e9aba40c2025fe795fb3b/PowerEditor/src/NppCommands.cpp#L2244
Dave
Thank you Dave.
I had read the excellent Python Script documentation, and couldn't find a different way. Your confirmation is important to me. I appreciate your time.
Regards.
Log in to post a comment.
I use the following script to change Text Direction (LTR/RTL) in both Views.
notepad.menuCommand(MENUCOMMAND.EDIT_LTR)
notepad.menuCommand(MENUCOMMAND.VIEW_GOTO_ANOTHER_VIEW)
notepad.menuCommand(MENUCOMMAND.EDIT_LTR)
notepad.menuCommand(MENUCOMMAND.VIEW_GOTO_ANOTHER_VIEW)
After the script is run, the Synchronized Scroll is turned off.
What might be the cause?
Is there a better way to change Text Direction in both Views?
I couldn't find a way to do that with editor1 and editor2.
Thank you.
It should be:
notepad.menuCommand(MENUCOMMAND.VIEW_SWITCHTO_OTHER_VIEW)
Still, Is there a better way?
Thanks.
No, I don't think there is a better way. I've had a quick look at what MENUCOMMAND.EDIT_LTR does, and it alters the window style, which you can't do from Scintilla (at least not as far as I can see - there's no docs on it).
https://github.com/bruderstein/npp/blob/20bcc0ed34453894780e9aba40c2025fe795fb3b/PowerEditor/src/NppCommands.cpp#L2244
Dave
Thank you Dave.
I had read the excellent Python Script documentation, and couldn't find a different way.
Your confirmation is important to me. I appreciate your time.
Regards.