RE: SetSelection with scrolling
----boundary-LibPST-iamunique-1071331214_-_-
Content-type: text/plain
Doug,
if I get you right, the following might help:
TextViews.ShowRange(c.text, pos, pos, TextViews.focusOnly)
Regards,
Thomas,
Oberon microsystems, Inc.
-----Original Message-----
From: Douglas G. Danforth [mailto:danforth{([at]})nowhere.xy
Sent: Montag, 29. Marz 2004 19:39
To: blackbox{([at]})nowhere.xy
Subject: SetSelection with scrolling
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.
--------------------------------------------
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-1071331214_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIERvdWcsXHBhcg0KXHBhcg0KaWYgSSBnZXQgeW91
IHJpZ2h0LCB0aGUgZm9sbG93aW5nIG1pZ2h0IGhlbHA6XHBhcg0KVGV4dFZpZXdzLlNob3dSYW5n
ZShjLnRleHQsIHBvcywgcG9zLCBUZXh0Vmlld3MuZm9jdXNPbmx5KVxwYXINClxwYXINClJlZ2Fy
ZHMsXHBhcg0KXHBhcg0KVGhvbWFzLFxwYXINCk9iZXJvbiBtaWNyb3N5c3RlbXMsIEluYy5ccGFy
DQpccGFyDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLVxwYXINCkZyb206IERvdWdsYXMgRy4g
RGFuZm9ydGggW21haWx0bzpkYW5mb3J0aEBncmVlbndvb2RmYXJtLmNvbV1ccGFyDQpTZW50OiBN
b250YWcsIDI5LiBNYXJ6IDIwMDQgMTk6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FkLlxwYXINClxwYXINCmIpIElmLCBmb3Igc29tZSByZWFzb24sIHlvdSBjYW5u
b3QgcG9zdCBmcm9tIHRoZSBhZGRyZXNzLCBieSB3aGljaCB5b3UgYXJlIHN1YnNjcmliZWQsIHlv
dXIgbWVzc2FnZSB3aWxsIGJlIG1vZGVyYXRlZCB0byBhdm9pZCBzcGFtLiBQbGVhc2UgdW5kZXJz
dGFuZCB0aGF0IG1vZGVyYXRpb24gd2lsbCBvZnRlbiBjYXVzZSBzb21lIGRlbGF5LCBpbiBwYXJ0
aWN1bGFyIG92ZXIgd2Vla2VuZHMgb3IgaG9seWRheXMuXHBhcg0KXHBhcg0KfQ==
----boundary-LibPST-iamunique-1071331214_-_---
Received on Tue Mar 30 2004 - 09:10:54 UTC
This archive was generated by hypermail 2.3.0
: Thu Sep 26 2013 - 06:28:48 UTC