pythonui:
--------------------------------------------------------------------------------
Yes !
setCaretPos(x, y) working great but its not set the center of
editor ..
Any workaround ?
--------------------------------------------------------------------------------
Hi,
you could probably use something like the following hack
cite:
--------------------------------------------------------------------------------
actEd.setCaretPos(1, 1)
actEd.setCaretPos(1, 94+20)
actEd.setCaretPos(7, 94)
--------------------------------------------------------------------------------
i.e. set the caret to the top to ensure the direction of the scrolling
(top-bottom, aligning to the bottom margin)
- set the caret about half the visible line count further
- set the caret to the needed coordinates
(tweek the number of the extra lines to scroll for you needs; I guess
determining this could be possible e.g. by simulating pageUp/Down (
actEd.command("ecScrollUp"); ...) and checking the changed caret coordinates,
but this would likely cause flicker and might not be worth the hassle).
hth,
vbr
--
<http://forum.pspad.com/read.php?2,65966,65973>
PSPad freeware editor http://www.pspad.com