Flex: change item Style on certain Tree based ItemRenderers - apache-flex

I have a question concerning Tree items. I want to show where a drop action would be placed... The item will be placed in between two existing elements. So what I want to do is, to take the upper item and draw a line underneath it. But I struggling to address the itemRenderer...
I have the index for the itemrenderer, but I dont get a instance of that object.
Any help is appreciated!
Markus

If you're doing drag & drop right, it should be showing a line where you are going to drop the dragItem. That is standard behavior. You shouldn't have to do that in the itemRenderer.

Related

How to hide clr-dg-placeholder

I have a datagrid that always show the clr-dg-placeholder even if I did not ask for it.
Is there a way to avoid having it displayed? Right now, if my grid has only one line, I can see a second one that corresponds to the clr-dg-placeholder item.
Thanks

How to overlapping report items in BIRT?

For some reason I need to overlap 2 report elements in BIRT. For example I need to put 2 labels one on top of another. Is this possible in BIRT? I am using BIRT 4.3. Normally when we place elements in report designer each item is occupying one full row. Some times i need to overlap elements and sometimes i need to place elements side by side. side by side can be achieved with Grid but I am not sure how to overlap report items? Please help and thanks in advance.
You can put two labels in the same cell of a graph or table, then define when to "hide element" with the "Visibility" property.
OR
In order to have both display at the same time, you can use a grid to define where the top label will go, then add the back label as an image using the background (advanced property)

highlight item in spark list

I have two spark lists and want to drag items from one list to the other. When im dragging an item and over the other list item, i want the target item to change the background coloer.
Basically instead of showing the black line indicating that I will drop between elements, I want to see the target item highlight.
Thanks in advance.
Edit: Something that would look similar to this drag and drop:
(source: blogspot.com)
I would ask you to point out a UI precedent where this is standard / expected behavior.
When you drag an itemA onto itemB; and itemB is highlighted somehow, it usually means you're dragging into ItemB. But, in this case you are not dragging item from List1 into the item from List2. [I assume at least].
You'd have to override the list code drag and drop features to make this happen.

How to add separator between items in a Spark List control

I have a s:List where I've defined my own itemRenderer, and would like to insert a horizontal line separating items, similar to the way the mx:LinkBar works. I don't want to have a line at the top or bottom of the list, so I can't just include an upper or lower border in the itemRenderer. I was hoping the itemRenderer could be made aware of its index in the list, but I don't see how. Is there a way to do this?
" I was hoping the itemRenderer could be made aware of its index in the list, but I don't see how. Is there a way to do this?"
If your itemRenderer implements the IDropInListItemRenderer interface, you can just access the rowIndex property of the listData object.
The cleanest solution I've found to this is to put a gap between the items and let a background Rect (or something) show through between the items. To do this on List you can just reskin it and customize the VerticalLayout to have a gap.

Flex Advanced data grid:column visibility

HI
I am new to Flex and was wondering, when we use an advanced data grid, only when we click on the parent element the children details get populated in the corresponding columns, right?..SO now i have made the empty columns invisible(at design) now how do i make them visible at run time when the parent element is expanded..similarly once the columns are visible, how can i make them invisible again when the parent element is closed.
Please help me out
Thanks
I think the event you want to listen for is "itemOpen" then the function you want will be something like:
MyADG.columns[invisible column index].visible=true;

Resources