Looping over itemRenderers in a List
Problem
Looping over the data used by a Flex List component is easy enough, but what if you need to loop over the actual itemRenderers in the List? Recently I needed to do just that.
Solution
The key is understanding the mx_internal namespace
Detailed explanation
Looping over the data used by a Flex List component is easy enough, but what [...]
Tags: flex air, flex ria, software development
December 16th, 2009 by Manish | Posted in Development Tips | Comments (0)
Flex Basics – ArrayCollection
Array Designed to store data of various types accessible via a numbered index, the Array class provides a useful mechanism for data storage and retrieval.
To understand an ArrayCollection, one must first understand an Array.
Array
From Wikipedia, an Array “is a data structure consisting of a group of elements that are accessed via indexing”. Arrays can store [...]
Tags: addEventListener, addItem, addItemAt, Array, ArrayCollection, Basics, contains, filterFunction, flex, getItemAt, getItemIndex, length, list, refresh, removeAll, removeItemAt, setItemAt, sort, source
November 8th, 2009 by Manish | Posted in Development Tips | Comments (0)
How to add context menu in flex
Here is the sample code to add context menu in you flex application
I have a tree control on which I need to show a context menu for cut, copy and paste
Here is the code for that
[Bindable]
private var cm:ContextMenu=new ContextMenu();
// This function initializes a new Context Menu
private function createContextMenuItems():void {
try
{
// Declare ContextMenuItem variable
var deleteMenu:ContextMenuItem = new [...]
Tags: context menu, flex, RIA, treecontrol
August 25th, 2009 by Manish | Posted in Development Tips | Comments (0)
How to add shortcut keys in flex-RIA custom context menu
To add a shortcut like ctrl+c for copy,ctrl+v for paste and kep it right alinged simply write the text you want to appear in your context menu hit “TAB” key and write the shortcut like ctrl+c thats it.
Yes you need to handle this shortcut in your flex ria
I kept it here as referrence for myself , if it [...]
Tags: context menu, flex, RIA, shortcut
August 25th, 2009 by Manish | Posted in Development Tips | Comments (0)
