Skip to main content
Known Participant
Feb 26, 2009 8:15 PM UTC
Answered

verticalScrollPolicy = 'off' don't keep cursor in focus.

When you set DisplayObjectContainerController.verticalScrollPolicy = 'off', and Configuration.manageEnterKey = false, and type until the cursor end of the container, the cursor continues out of view, and the horizontalScrollPosition is not updated. With verticalScrollPolicy at it's default, it does keep the cursor in focus. Also is there a property to prevent line breaks from being displayed? Setting these 2 properties still allows you to paste text with line breaks and mess things up. I want line breaks to be ignored altogether.

Thanks,
Sean.
This topic is closed to new replies. Start a new post to keep the conversation going.
brian_thomas2
brian_thomas2Correct answer
Adobe Employee
Mar 6, 2009 10:24 PM UTC
Hi Sean,

There is no option to disable line breaks at the moment. You may need to look at stripping out all line breaks manually. Does anyone else have a better solution for this?

This is the functionality I am seeing, let me know if this what you are considering the bug: With lineBreak = 'explicit' and DisplayObjectContainerController.verticalScrollPolicy = 'off', horizontal scrolling will not occur as result of typing regardless of the value of DisplayObjectContainerController.horizontalScrollPolicy.

I am reporting this as a bug, let me know if you are seeing something different.

7 replies

Adobe Employee
Apr 7, 2009 11:03 PM UTC

Can you recheck this in a build after 393? If verticalScrollPolicy is off, we won't be able to scroll vertically to keep the cursor in view, but if the cursor goes off to the left or right and horizontalScrollPolicy is on or auto, then we should be scrolling. If this is still a problem for you, or if your expectations were different, please let us know.

Thanks!

- robin

Translate
Participant
Apr 8, 2009 5:18 AM UTC

sorry for the late reply.. this is actually what I want

I am using flex SDK 3.3.0.4852

I have a canvas with

canvas.horizontalScrollPolicy = "off";

canvas.verticalScrollPolicy = "off";

This canvas has an image in it, and I set the horizontal and vertical scroll positions programitically.

canvas.horizontalScrollPosition = canvas.maxHorizontalScrollPosition;

canvas.verticalScrollPosition = canvas.maxVerticalScrollPosition;

then I save the scroll values in an xml file, and then on reopening of the xml file.. I do the following

canvas.addEventListener("creationComplete", setScrollPositions);

and in the method setScrollPositions(event) i do the following again

canvas.horizontalScrollPosition = canvas.maxHorizontalScrollPosition;

canvas.verticalScrollPosition = canvas.maxVerticalScrollPosition;

But unfortunately it does not show any change in the scroll positions visually, and the default scroll positions persists. Though if i call an alert

Alert.show(canvas.verticalScrollPosition.toString()); //it does show me some value, e.g. 56

Now if i only set horizontal and vertical scrollPolicy = "on" ... all works fine. But the problem is that I want to hide my scrollbars and there is no other way I can do it. So please if there is any solution to it or if there is any workaround, do let me know. Thanks.

Translate
Known Participant
Feb 26, 2009 9:49 PM UTC
I have lineBreak set to 'explicit', but that's not what I want, I want line break to have an option for none.

For the bug, the problem is that the cursor does not stay visible. When you type in an html input, the text scrolls horizontally to keep the cursor in focus. This happens when you set lineBreak = 'explicit' and verticalScrollPolicy = 'auto', but not when you set verticalScrollPolicy to 'off'/'on'.

Thanks,
Sean.
Translate
brian_thomas2
Adobe Employee
brian_thomas2Correct answer
Adobe Employee
Mar 6, 2009 10:24 PM UTC
Hi Sean,

There is no option to disable line breaks at the moment. You may need to look at stripping out all line breaks manually. Does anyone else have a better solution for this?

This is the functionality I am seeing, let me know if this what you are considering the bug: With lineBreak = 'explicit' and DisplayObjectContainerController.verticalScrollPolicy = 'off', horizontal scrolling will not occur as result of typing regardless of the value of DisplayObjectContainerController.horizontalScrollPolicy.

I am reporting this as a bug, let me know if you are seeing something different.
Translate
brian_thomas2
Adobe Employee
Adobe Employee
Mar 13, 2009 10:39 PM UTC
This bug is fixed as of build 393.
Translate
Adobe Employee
Feb 26, 2009 8:46 PM UTC
If you don't want the text to wrap at the end of the line, set lineBreak="explicit" on the TextFlow. By default this is "toFit".

I'm a little confused by your earlier statement about scrolling. Is this scrolling vertically, but you expected it to also scroll horizontally?

Thanks!
Translate