I created a TextCtrl widget to display text strings. Sometimes, a text string can be longer than the designated width of the TextCtrl widget, as shown in the screenshot below where the full string is “Desserts from England and France”.
I wonder if it is possible to display the string from the very beginning of the text string (as shown in the screenshot below) as opposed to somewhere in the middle of the string.
You can try ShowPosition to tell it to show position #0, but I
suspect that only handles vertical scrolling. You will probably
need SetInsertionPoint. The control does its best to make sure the
insertion point is always visible.
···
Alex wrote:
I created a TextCtrl widget to display text strings.
Sometimes, a text string can be longer than the designated
width of the TextCtrl widget, as shown in the screenshot below
where the full string is “Desserts from England and France”.
I wonder if it is possible to display the string from the
very beginning of the text string (as shown in the screenshot
below) as opposed to somewhere in the middle of the string.
SetInsertionPoint() and SetFocus() did exactly what I wanted. Thanks!
···
On Wednesday, March 30, 2016 at 10:54:48 AM UTC-7, Tim Roberts wrote:
Alex wrote:
I created a TextCtrl widget to display text strings.
Sometimes, a text string can be longer than the designated
width of the TextCtrl widget, as shown in the screenshot below
where the full string is “Desserts from England and France”.
I wonder if it is possible to display the string from the
very beginning of the text string (as shown in the screenshot
below) as opposed to somewhere in the middle of the string.
You can try ShowPosition to tell it to show position #0, but I
suspect that only handles vertical scrolling. You will probably
need SetInsertionPoint. The control does its best to make sure the
insertion point is always visible.
-- Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.