Tutorial Button in Flex will illustrate various features of Button, A Button is usually in rectangular shape and it looks like it can be pressed, it could have a text, an icon, or both.A Button could be a normal button or toggle button. A normal button persists in deselected mode after clicking, but in the case of toggle button it has two states selected and deselected. Example will helps you to learn it more preciesely.
Tutorial Button in Flex will illustrate various features of Button, A Button is usually in rectangular shape and it looks like it can be pressed, it could have a text, an icon, or both.A Button could be a normal button or toggle button. A normal button persists in deselected mode after clicking, but in the case of toggle button it has two states selected and deselected. Example will helps you to learn it more preciesely.Button:
A Button is usually in rectangular shape and it looks like it can be pressed, it could have a text, an icon, or both.
A Button could be a normal button or toggle button. A normal button persists in deselected mode after clicking, but in the case of toggle button it has two states selected and deselected.
Buttons typically use event listeners to perform various tasks. When a user click a button either by mouse pointer or using the keyboard, it dispatches a click event. A button dispatches various events like mouseMove, mouseOver, mouseOut etc.
Following example shows a Button control:
Example:::::::strong> <?xml version="1.0" encoding="utf-8"?> <mx:Application
<mx:Script>
<![CDATA[
public function dispMsg(event):void{btnTxt.text+=
" "+event.target.label+" is clicked"+'\n';}
]]>
</mx:Script>
<mx:Panel
width="400" height="200" title="Button click Events"> <mx:HDividedBox height="100%" width="100%"> <mx:VBox></mx:Application>
Output:
