7/30/2010 12:15:57 AM
Title:
Cursor issue
Hi All
I have a cursor issue.
I am working in text layout framework.
The normal scenario is when the mouse cursor is inside the text area it is shaped as text cursor(like a vertical line in between two horizontal lines) and when mouse moves and come out of text, it changed to a pointer...this is the right behavior that mouse cursor should show.
Now the problem...
As I working in the text layout framework, when I made the text of the text flow read only by selecting a entry from the combo box which has other entries like read-select only,read - write both....If I place the cursor inside the text after opening the combo box and then select the read only option by using up arrow or down arrow and then enter key....the cursor become a text cursor permanently..i.e it does not change when it moved out of text area and rolled over the buttons of the component....which looks very ugly that a text cursor over the button or any other component.
Same problem is there if I use any key board shortcut to make text read only.
You can see that when I am writing this question if mouse cursor is over the text area it is text cursor and I am moving mouse to Ask Question button...it changes to pointer....I think now the issue is clear.
Tyler
Points: 430
Posts:0
7/30/2010 12:35:29 AM
you should move the focus out of the textBox before setting it read Only.
use this to remove focus from textbox
this.stage.focus = null;
7/30/2010 12:49:09 AM
you can use the CursorManager class to set the cursor back to normal cursor on rollout event of textBox
see this link for more info on cursorManager class
http://livedocs.adobe.com/flex/3/langref/mx/managers/CursorManager.html#setCursor()