I thought I had this bookmarked, but I didn’t. So I figured I would add a reference to it in my blog. I often go to this post for reference when I am reconfiguring fresh installs of Flex with Integrated Jrun on my machine.
Here is the url: http://www.bpurcell.org/blog/index.cfm?mode=entry&entry=1064
No Comments »
I have used mx_internal a few times, but in between my instances of use, forget exactly what I have to do to use it. Here is a link to a good blog article that describes what to do.
No Comments »
I recently had a request from a customer to demonstrate how a RadioButton in a DataGrid ItemRenderer could select and entire row and indicate that a row is selected. I also had a notion to put code on my blog that demonstrated a simple ItemRenderer that implemented mx.controls.listClasses.IDropInListItemRenderer since that allows you to access data and datagrid properties easily. I seem to often be looking around for a simple example to use as a starting point for many ItemRenderer examples I produce, but can never find a “template” starting point. This entry should take care of both these things. Here is what I came up with:
Here is the code for a simple app that demos a datagrid (this is straight from the docs, but I added a bit more data to the grid):
<?
xml version=
"1.0"?>
<mx:Application xmlns:mx=
"http://www.adobe.com/2006/mxml">
<mx:Script>
<!
[CDATA
[
import mx.
collections.
ArrayCollection;
[Bindable
]
public var employees:ArrayCollection =
new ArrayCollection
([
{name:
‘Bob Jones’, phone:
‘413-555-1212′,
email:
‘bjones@acme.com’},
{name:
‘Sally Smith’, phone:
‘617-555-5833′,
email:
’ssmith@acme.com’},
{name:
‘Bob Jones’, phone:
‘413-555-1212′,
email:
‘bjones@acme.com’},
{name:
‘Sally Smith’, phone:
‘617-555-5833′,
email:
’ssmith@acme.com’},
{name:
‘Bob Jones’, phone:
‘413-555-1212′,
email:
‘bjones@acme.com’},
{name:
‘Sally Smith’, phone:
‘617-555-5833′,
email:
’ssmith@acme.com’},
{name:
‘Bob Jones’, phone:
‘413-555-1212′,
email:
‘bjones@acme.com’},
{name:
‘Sally Smith’, phone:
‘617-555-5833′,
email:
’ssmith@acme.com’},
{name:
‘Bob Jones’, phone:
‘413-555-1212′,
email:
‘bjones@acme.com’},
{name:
‘Sally Smith’, phone:
‘617-555-5833′,
email:
’ssmith@acme.com’},
{name:
‘Bob Jones’, phone:
‘413-555-1212′,
email:
‘bjones@acme.com’},
{name:
‘Sally Smith’, phone:
‘617-555-5833′,
email:
’ssmith@acme.com’},
{name:
‘Bob Jones’, phone:
‘413-555-1212′,
email:
‘bjones@acme.com’},
{name:
‘Sally Smith’, phone:
‘617-555-5833′,
email:
’ssmith@acme.com’},
{name:
‘Bob Jones’, phone:
‘413-555-1212′,
email:
‘bjones@acme.com’},
{name:
‘Sally Smith’, phone:
‘617-555-5833′,
email:
’ssmith@acme.com’},
{name:
‘Bob Jones’, phone:
‘413-555-1212′,
email:
‘bjones@acme.com’},
{name:
‘Sally Smith’, phone:
‘617-555-5833′,
email:
’ssmith@acme.com’},
{name:
‘Bob Jones’, phone:
‘413-555-1212′,
email:
‘bjones@acme.com’},
{name:
‘Sally Smith’, phone:
‘617-555-5833′,
email:
’ssmith@acme.com’}
]);
]]>
</mx:Script>
<mx:Panel title="DataGrid Control Example" height="100%" width="100%"
paddingTop="10" paddingLeft="10" paddingRight="10">
<mx:DataGrid id="dg" width="100%" height="100%"
rowCount="5" dataProvider="{employees}" change="dg.invalidateList();">
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="Name"/>
<mx:DataGridColumn dataField="phone" headerText="Phone"/>
<mx:DataGridColumn dataField="email" headerText="Email"/>
<mx:DataGridColumn width="80" textAlign="center" editable="false"
headerText="Select" itemRenderer="RBRenderer"/>
</mx:columns>
</mx:DataGrid>
<mx:Form width="100%" height="100%">
<mx:FormItem label="Name">
<mx:Label text="{dg.selectedItem.name}"/>
</mx:FormItem>
<mx:FormItem label="Email">
<mx:Label text="{dg.selectedItem.email}"/>
</mx:FormItem>
<mx:FormItem label="Phone">
<mx:Label text="{dg.selectedItem.phone}"/>
</mx:FormItem>
</mx:Form>
</mx:Panel>
</mx:Application>
Read the rest of this post»
2 Comments »
I had a customer request some help in trying to restrict the movement of a popup window.
Initially I was looked at all the drag and drop functionality, but realized that Panel and TitleWindow “roll their own” drag and drop stuff when used as a popup. I decided to take a simpler approach.
Read the rest of this post»
No Comments »
Recent Comments