Posts tagged as:

preventDefault()

The following example shows how you can prevent item selection in the Spark List control in Flex 4 by listening for the changing event and calling the preventDefault() method on the IndexChangeEvent event object instance.

[click to continue…]

{ 1 comment }

The following example shows how you can create a non-draggable Spark TitleWindow container in Flex 4 by listening for the windowMoving event and calling the stopImmediatePropagation() and preventDefault() methods.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can create a clickable link which pops up an Alert control in a Spark RichEditableText object’s text flow by using the <a /> tag and defining a click handler to the LinkElement.

Full code after the jump.

[click to continue…]

{ 6 comments }

The following example shows how you can prevent selection of specific items in a Spark DropDownList control in Flex 4 by listening for the changing event and calling the preventDefault() method.

[click to continue…]

{ 0 comments }

The following example shows how you can prevent a user from pressing Enter in a Flex TextArea control by listening for the textInput event and checking the TextEvent object’s text property for a newline character (“\n”).

[click to continue…]

{ 16 comments }