SetSelection with scrolling
----boundary-LibPST-iamunique-1424435199_-_-
Content-type: text/plain
Folks,
Under program control, I would like to have the screen scroll to the
position at which I have set a 'selection'. I am able to accomplish this
for text that is visible on the screen but setting the selection before
or after the visible text does not cause automatically scrolling to that
location. I set up the situation by:
c := TextControllers.Focus();
IF c # NIL THEN
rd := c.text.NewReader(NIL);
c.SetCaret(TextControllers.none);
c.SetSelection(none, none);
rd.SetPos(0);
END
and then I create a new selection by:
(* highlight current word found *)
pos := rd.Pos();
beg := pos-LEN(name$);
c.SetCaret(beg);
c.SetSelection (beg, pos);
but no scrolling occurs. It would be nice to see how the CP compiler
does its scrolling when it finds an error or how Find does its
scrolling. I don't want to get down to 'message passing' and 'frame'
handling. Surely there is a level just above this that does the
scrolling automatically? I do not know how to see or quarentee that the
Focus does not have the "noAutoScroll" bits set (whatever that actually
means).
Any help would be appreciated.
-Doug
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list owner at
owner-blackbox{([at]})nowhere.xy
Current posting policy:
a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.
b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.
----boundary-LibPST-iamunique-1424435199_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5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iBwYXJ0aWN1bGFyIG92ZXIgd2Vla2Vu
ZHMgb3IgaG9seWRheXMuXHBhcg0KXHBhcg0KfQ==
----boundary-LibPST-iamunique-1424435199_-_---
Received on Mon Mar 29 2004 - 18:38:44 UTC
This archive was generated by hypermail 2.3.0
: Thu Sep 26 2013 - 06:28:48 UTC