Tag Archive for 'alert'

01
May

Detecting when an Alert control is closed in Flex

The following example shows how you can detect when a Flex Alert control is closed by listening for the close event by specifying the closeHandler parameter in the static Alert.show() method.

Full code after the jump.

Continue reading ‘Detecting when an Alert control is closed in Flex’

06
Apr

Centering a pop up window when a Flex application is resized

The following example shows how you can center a pop up window (in this case an Alert control) when the Flex application is resized by using the resize event on the <mx:Application /> tag and using the static PopUpManager.centerPopUp() method.

Full code after the jump.

Continue reading ‘Centering a pop up window when a Flex application is resized’

21
Mar

Creating an undraggable Alert control in Flex

The following example shows how you can create a Flex Alert control that isn’t draggable by listening for the mouseDown event and calling the stopImmediatePropagation() method in the event handler.

Full code after the jump.

Continue reading ‘Creating an undraggable Alert control in Flex’

29
Feb

Styling Alert controls in Flex using the StyleManager class and setStyle() methods

The following example shows how you can style a Flex Alert control using the static StyleManager.getStyleDeclaration() method, and the setStyle() method.

Full code after the jump.

Continue reading ‘Styling Alert controls in Flex using the StyleManager class and setStyle() methods’

04
Jan

Adding filters to an Alert control in Flex

The following example shows how you can add a GlowFilter to a Flex Alert control by setting the filters property on the Alert object reference returned by the static Alert.show() method.

Full code after the jump.

Continue reading ‘Adding filters to an Alert control in Flex’

03
Jan

Styling the Alert control’s status message

The following example shows how you can customize the appearance of the status message in an Alert control in Flex by setting the statusStyleName style and status property.

Full code after the jump.

Continue reading ‘Styling the Alert control’s status message’

03
Jan

Styling the Alert control’s nested buttons

The following example shows how you can customize the appearance of the buttons in an Alert control in Flex by setting the buttonStyleName style.

Full code after the jump.

Continue reading ‘Styling the Alert control’s nested buttons’

03
Jan

Styling the Alert control’s message text

The following example shows how you can customize the appearance of the message text in an Alert control in Flex by setting the messageStyleName style:

Full code after the jump.

Continue reading ‘Styling the Alert control’s message text’

03
Jan

Styling the Alert control’s title bar

The following example shows how you can customize the appearance of the title in an Alert control in Flex by setting the titleStyleName style:

Full code after the jump.

Continue reading ‘Styling the Alert control’s title bar’

23
Dec

Customizing the background alpha and background color of the Alert control in Flex

The following example shows how you can customize the background alpha and background color of a Flex Alert control by setting the backgroundAlpha, backgroundColor, borderAlpha, and borderColor styles.

Full code after the jump.

Continue reading ‘Customizing the background alpha and background color of the Alert control in Flex’

13
Dec

Creating nonmodal Alert dialog boxes in Flex

The following example shows how you can use the Alert.NONMODAL constant to toggle whether a Flex Alert control is modal or non-modal.

Full code after the jump.

Continue reading ‘Creating nonmodal Alert dialog boxes in Flex’

23
Oct

Adding a status message to a Flex Alert control

The following example shows how you can set and style a status message in a Flex Alert control by simply setting the status property (and statusStyleName style if you want to style the status message).

Full code after the jump.

Continue reading ‘Adding a status message to a Flex Alert control’

22
Oct

Adding a title icon to a Flex Alert control

The following example shows how you can set both the titleIcon property and iconClass property for a Flex Alert control.

Full code after the jump.

Continue reading ‘Adding a title icon to a Flex Alert control’

22
Oct

Programmatically removing an Alert using the PopUpManager

The following example shows how you can close an Alert control by calling the PopUpManager class’s removePopUp() method.

Full code after the jump.

Continue reading ‘Programmatically removing an Alert using the PopUpManager’

12
Oct

Globally setting modal styles in a Flex application

The topic of setting modal styles came up again today so I thought I’d re-share this tip (I previously covered controlling modal styles for the Alert control in an earlier post, “Changing a modal Alert control’s blur, transparency and transparency color”).

The following example shows how you can set the various modal styles (modalTransparencyBlur, modalTransparency, modalTransparencyColor, and modalTransparencyDuration) on the global selector so it propogates to both the Alert control and pop-ups created using the PopUpManager.

Full code after the jump.

Continue reading ‘Globally setting modal styles in a Flex application’