DataGrid in inlinegraphic element

As I heard of tlf, I dreamed of a wysiwyg with chart and datagrid editor integrate to some cms development, unfortunally I can't find an appropriate way to add datagrid in an inlinegraphic element.

I tried to use the SimpleEditor example provided with the example flex3.2 and it does not work, when I "updateAllContainer", I get a strange error as 'list has reached the maximum index '.
I guess I don't understand something correctly, someone could give me an explanation? : P

Thanks for the reply

@Fdecampredon

I had similar thoughts a bit back and attempted to do something similar to what you think, what about creating a special container for flex objects. I created this special container class and was able to get Flex components to render inside InlineGraphicElements. Rich is correct that TextLine will be the eventual parent of the component Flex that you can specify the source of the InlineGraphicElement.

I had success with it by extending the Sprite class and then substitution addChild/removeChild, adding all of the logic of the UIComponent class in the Flex Framework, which is where it is made to lift heavy objects for the initialization of the Flex components when they are added to the display list. Includes things like calling createChildren() () and by setting the document property, etc. Ended up being worth about 400 lines of code.

That said, even if I was able to make the inline with the text document flex components, it was difficult to manage the size of the graphic element in a line with the size of the flex component. In addition, keyboard and mouse interactivity is difficult to maintain inside your flex components due to how TLF treats such things for editing.

Anyway, I just wanted to confirm that it * is * possible to do what you suggest, but it takes some work and trial/error, if it works.

Good luck!
Brent

Tags: Adobe Open Source

Similar Questions

  • DataGrid has fallen - element deleted accessories

    I'm moving to a DataGrid to another... I drop on the second and HOW do I know what one I just dropped? (not know programmitically)

    Thank you

    On the data grid that is the beneficiary of the fall, you can listen for the dragDrop event:

    The handleDrop function has a DragEvent event type. When the handleDrop function is called, the event contains a DragSource property. Find the DragSource class in the Flex documentation. You will find that the drag initiator has stored its data in a format called, typically 'points' for DataGrid and lists. Everything you do is ask the DragSource data associated with the format.

  • DataGrid row selection index-Z & amp; itemRenderer background

    Hi, I have a datagrid with custom element converters (HBox). Now if I change the color of information Hbox and move the mouse over a few lines in the datagrid control, actually target line visualization (blue line) is UNDER the itemrenderer background color so I do not see what line is focused with the mouse. I wish I had this selection of lines above the item converter.

    Thanks for help.

    Solved. Made by the substitution of a function in the custom itemRenderer class updateDisplayList.

  • DataGrid box renderer

    Hi all

    I have a datagrid with checkbox element converters and a checkbox in the header is rendered in one of its columns.
    I created a custom extending column of the DataGrid datagrid column.

    The visible property of the checkbox of the line is based on a condition.
    Everything works very well, if there are 7 lines in a datagrid, I get three rows with the box and the other without box.
    but, if I have more than 7 lines (with vertical scroll bar) I see all the boxes visible that shouldn't happen.

    Thank you









    I'm sorry. My bad. I thought through.

    The boxes become visible, as this property is set to true by the DG.

    You have two options:

    1. instead of visible use, use the enabled property.
    2. replace updateDisplayList and set the visible property there.

  • Problem with text of ItemRendered DataGrid highilght

    I have a datagrid with some elements which are defined as using an itemrenderer:

    < mx:DataGrid id = "dg" dataProvider = "{dp}" >
    < mx:columns >
    < mx:DataGridColumn headerText = "header" dataField = "Element" itemRenderer = "dgRenderer" / >

    Now, the converter of element lists all of this text should be here:

    override public function set data(value:Object):void
    {
    This.Text = "new text";
    }

    Then, as it goes, it works very well (all the stuff ripped off specific app, but you get the idea). The text appears in the DataGrid correctly. However, when I mouse over the data grid, normal items (i.e. non-element-made) get a dark background and change their policy to a gray color. However, the element rendered objects appear in black text, always.

    Does anyone know why this is, or how I can fix it?

    Thanks for any help you can provide.

    -Brand

    "BrandG" wrote in message
    News:g7i3ne$8C4$1@forums. Macromedia.com...
    > I have a datagrid with some elements which are defined using a
    > itemrenderer:
    >
    >
    >
    >
    > itemRenderer = "dgRenderer" / >
    >
    > Converter element of list just now, this text should be here:
    >
    > override public function set data(value:Object):void
    > {
    > this.text = "new text";
    > }
    >
    > Then, as it goes, it works very well (all the app own stuff ripped off,)
    > but
    (> you get the idea). The text appears in the DataGrid correctly.
    > However,.
    > When I mouse over the DataGrid, normal items (i.e. non-element-rendering) is
    > a
    > dark background and change their font to a gray color. However,.
    > item-rendering
    > objects appear in black text, always.
    >
    > Is - anyone know why this is, or how I can fix it?
    >
    > Thanks for any help you can provide.

    Here are a few options:

    (1) just use a labelFunction
    (2) extend the default itemRenderer
    (3) look at the code for the default itemRenderer and see how it handles
    This

    HTH;

    Amy

  • DataGrid with Delete buttons?

    I want a variable list of items (where the DataGrid) where each element has a button Delete, or link or something that will remove this item from the list. Something like this:

    My list of things
    |----------------------------------------|
    | Point 1 | [delete list] |
    | Point 2 | [delete list] |
    | Point 3 | [delete list] |
    |----------------------------------------|


    I * think * the DataGrid is the starting point, but what I need to design a custom component? Or important something like that already exists? Where should I start? Maybe there's a better way to solve this problem?

    You ant to remove the item from the dataProvider. This code can help:

  • A centering alert box.

    I have a flex web application in which the flex components are integrated within the portal jsps. When the user clicks a DataGrid (clicks on element within the data grid converter), the alert box to notify the user. However, the alert box is centered wrt the flex application and it is out of sight of the user. Because the user can view only part of the large grid of data at any given time (the page scroll bars are not present for the datagrid control).

    I tried assigning relative and absolute values, but nothing seems to work.

    Any suggestions would be greatly appreciated.

    Thanks in advance.

    You can use ExternalInterface to know if the size of the viewport jsp?

  • How to get the element highlight DataGrid?

    Hello everyone...

    I've already looked in a lot of sites and forums, and I can't find anything...

    I need to get data on the element (not selected) highlighted on my DataGrid (I intend to use the MouseOver event)...

    does anyone have an idea on how to do it?

    PS Sorry for the grammar errors... my English is not very good...

    Hello

    Add an event listener for the itemRollOver event of the datagrid to get the index of the item highlighted.

    
    
    protected function dataGrid_itemRollOverHandler(event:ListEvent):void
    {
         var item:Object = dataGrid.dataProvider[event.rowIndex];
    }
    
  • Maybe Flex SDK bugs: visible converters element DataGrid control

    Hi all, I'm still a noob to flex, but this seems a little strange to me.

    I tried to hide a converter button in a DataGrid control, but he would just hide.  I was setting visible inside the mxml and also in the class that extends the buttonbut would just hide.  Then, I overloaded the property visible set/get back what was setting the property and found that inside the DataGridBase.as the setupColumnItemRenderer function sets still visible of the renderes to true.

    DataGridBase.as
    protected function setupColumnItemRenderer (c:DataGridColumn, contentHolder:ListBaseContentHolder,
    rowNum:int, colNum:int, uid:String, data: Object): IListItemRenderer
    {
    var listItems:Array = contentHolder.listItems;
    var point: IListItemRenderer;
    var rowData:DataGridListData;

    Item = listItems [rowNum] [colNum];
    If (! point | itemToUID (item.data)! = uid)
    || columnMap [item.name]! = c)
    {
    Item = createColumnItemRenderer (c, false, data);
    If (point == null)
    Returns a null value.
    If (item.parent! = contentHolder)
    contentHolder.addChild (DisplayObject (item));

    a space is used if there is no so text widgets get a default size
    columnMap [item.name] = c;
    If (listItems [rowNum] [colNum])
    addToFreeItemRenderers (listItems [rowNum] [colNum]);
    listItems [rowNum] [colNum] = item;
    }

    [Mat] left in the above block out because
    the element is without a doubt at this stage and still need
    its up-to-date information
    rowData = DataGridListData (makeListData (data, uid, rowNum, c.colNum, c));
    rowMap [item.name] = rowData;
    If (item is IDropInListItemRenderer)
    IDropInListItemRenderer (point) .listData = data? rowData: null;
    Item.Data = data;
    item.Visible = true;

    If (uid & & colNum == 0)
    contentHolder.visibleData [uid] = item;
    return item;
    }

    Why would he do that?  If it should not respect the visible property for the mxml rendering engine already set and not force it to true on init?

    Converters use the visible property to recycling.  Invisible rendering engines are not supported.  The attack detection logic he would find the cell, it belongs to the same if it were invisible.  You can set alpha = 0, but that does not block the attack detection logic.

    Why are you trying to hide a converter?

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • DataGrid with Custom Component does not show under elements

    I hope someone can enlighten me on this matter.

    I have a datagrid with a column that has an element of rendering. No matter if the data 'text' comes from a dataProvider or are static.

    If I do the following, only the first label will appear.


    < mx:DataGridColumn headerText = "Column Title" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:VBox >

    < mx:Label text = "{data.data1}" / > "
    < mx:Label text = "{data.data2}" / > "
    < / mx:VBox >
    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >

    However, if I change the VBox for a HBox both labels will appear.

    < mx:DataGridColumn headerText = "Column Title" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:HBox >

    < mx:Label text = "{data.data1}" / > "
    < mx:Label text = "{data.data2}" / > "
    < / mx:HBox >
    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >

    I use:

    Flex Builder 3 standalone
    Version: 3.0.214193

    OS: Vista

    Any ideas or comments would be appreciated.

    the variableRowHeight = "true" DataGrid value. VBox you are using is not being correctly displayed.

  • Limit all text in a datagrid entry without having to create element custom converters

    Is there a way to limit all text in a datagrid entry without having to create converters of custom for each column element?

    How are you trying to limit? If you try to restrict it evenly, for example, to fully digital entries, then the best way I know to do is with an itemEditor. You can simply add the same itemEditor for each column in this way.

    This saves only work on rendering engines custom if you try to limit multiple columns in the same way, but for digital-only tables, it is pretty short.

    You can probably also do it with itemEdit and itemEditBeginning event, but which would be probably more work then just stating a unique global itemEditor and use it in all your columns.

  • Question about the use of the States in the DataGrid element converter

    I have a DataGridColumn with an ItemRenderer that extends the component of the box. The default view is a text element. When the user clicks on the text component, I change the State to add a PopUpMenuButton child and make the invisible text component. It works very well. However, I want to only allow a PopUpMenuButton is visible in the DataGrid at a time (similar to the works of an itemEditor). I don't want to use an itemEditor, because I've met too many problems trying to get that to work in this instance.

    I implement IDropInListItemRenderer in my itemRenderer, to gain access to the listData property, who will give me the owner (DataGrid), but I don't know how to 'turn off' the State 'edition' in other itemRenderers in DataGrid.

    How can I accomplish this?

    Thank you.

    Here go us. I simply added a listener for the change of the listData.owner events - if it is triggered, I updated the currentState null. Works like a charm. Much easier that trying to access the itemRenderers in the column and reset all. Better performance too.

  • DataGrid with a dataField as an [object Object] to empty XML elements

    If I got an emty element in my XML DataGrid having a dataField as an [object Object].
    Quote:
    elements <>
    < NMFC > < / NMFC >
    < SUP > 02 < / Sub >
    < FreightClass > 200 < / FreightClass >
    < description > (PANEL de CUSTOS) IN THE BOXES OR CRATES, BODY, SEPARATE OR COMBINED < / Description >
    < / object >
  • How to disable the elements (gray out) in the DataGrid control?

    Hello

    I need to implement a component custom for a selectable list with a maximum selected items.

    in other words, when the selected items reached the maximum, all unselected items will be gray outside.

    Now I am able to use the DataGrid control to display a selectable (by itemRenderer) "checkbox" to the first column, to let the user select the item.

    And the name of the list in the second column.

    But I can't find a way to grey out (disable) these no selected item when max is reached.

    Can someone give advice?

    Here is my code snippet:

    SelectableListView.mxml

    < mx:VBox ' xmlns:mx = ' http://www.Adobe.com/2006/MXML " " width ="100%" height = "100%" "visible ="true">

    "" " < mx:DataGrid id ="list_datagrid"dataProvider =" {} {this.stringList}"showHeaders ="false"

    "" "" editable = "false" "selectable ="true"verticalGridLines ="false"borderStyle ="No"alternatingItemColors = '[#F8F8F0, #FFFFFF]"

    "" "" left = "5" rowCount ="16" rowHeight = "20" height ="83" width = "100%"top ="0"doubleClickEnabled = "true" doubleClick ="onDoubleClick (event)" >

    < mx:columns >

    " < mx:DataGridColumn id ="listCheckBox_col"dataField ="selected"editable ="false".

    "itemRenderer ="ListRenderer"width ="18"headerText =" ' resizable ="false" draggable = "false"/ > "

    " < mx:DataGridColumn id ="listName_col"dataField ="name" / >

    < / mx:columns >

    < / mx:DataGrid >

    < / mx:VBox >

    ListRenderer.mxml

    < mx:Canvas ' xmlns:mx = ' http://www.Adobe.com/2006/MXML " " width ="100%" height = "60" > "

    < mx:Script >

              <! [CDATA]

    private function setInUse(): void

                   {

    _data.selected = listInUse.selected;

                   }

    []] >

    < / mx:Script >

    "" " < mx:CheckBox id ="listInUse"width ="18"height ="18"click ="setInUse()"selected =" _data.selected{}"/ > "

    < / mx:Canvas >

    What is listInUse insdie the itemRenderer? I'm not very clear on how you use

    it. However, there are 2 ways to do this. Do not know if data.selected can be used

    to toggle the itemrenderer. I'll so guess not. Have a bindable extra

    "enabled" in your model of dataProvider property. Thus, when you reach the maximum of

    selected items through the collection and defined the set of the activated

    as a result. The enabled property of the renderer is linked to active so model

    It should be updated accordingly. The other way is to bind the license of the

    rendering engine on the selected. But as I said I don't know how your code works...

    HTH,

    C

  • Problem with checkbox in datagrid element converter

    I have a data grid with the box as part of rendering. I've seen a lot of posts on this forum but nothing useful in my case. I'm couldn't link my checkbox itemrenderer for datagrid with the field in the dataprovider that is listUnitMovement.CHECK_PATH. So, I have to cross the data provider to check which boxes are checked.

    [Bindable]
    var listUnitMovement:XMLList = null;

    In a function call

    public void init(event:ResultEvent):void

    {

    listUnitMovement = event.result.unitmovement;

    }

    < mx:DataGrid id = "dg_country".
    dataProvider = "{listUnitMovement}".
    enabled = "true" >
    < mx:columns >

    < mx:DataGridColumn >
    < mx:itemRenderer >
    < mx:Component >
    < mx:CheckBox selectedField = "CHECK_PATH" / >
    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >

    < mx:DataGridColumn headerText = "Latitude" dataField = "NEW_LAT" visible = "false" / >
    < mx:DataGridColumn headerText = "Longitude" dataField = "NEW_LONG" visible = "false" / >

    < mx:DataGridColumn >
    < mx:itemRenderer >
    < mx:Component >
    < mx:Button label = "Détails" / >
    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >


    < / mx:columns >
    < / mx:DataGrid >

    Hello

    You want to just check/uncheck the check boxes on the CHECK_PATH field.

    Do you want something like that...

    <>

    xmlns:MX ="http://www.adobe.com/2006/mxml" layout = "absolute" > "

    Import mx.collections.ArrayCollection;

    [

    Bindable]

    private var listUnitMovement:ArrayCollection = new collection ArrayCollection ([{CHECK_PATH:true, NEW_LAT:109.233, NEW_LONG:232.22}, {CHECK_PATH:true, NEW_LAT:109.233, NEW_LONG:232.22}, {CHECK_PATH:false, NEW_LAT:133.233, NEW_LONG:702.22}]);

    ]]>

    Please let me know clearly what your problem is... You just want to link the box based on XmlList or something else... ?

    Thank you

    Jean Claude Chari.S

Maybe you are looking for

  • updates and compatibility

    I have a 2011 macbook pro using os 10.7.5. because Safari is old I'm starting to get some grief from websites, so finally, I think I might have to upgrade the operating system. As most of you know, this can cause a thousand problems with programs and

  • Tecra A2 crashes when you are disconnected from the internet

    We have a customer with a Tecra A2 provided by ourselves that, after 5 months without a problem from time to time, hangs when it is disconnected from the internet.Reboot the laptop and the internet can be found sometimes up to 20 times and then it bl

  • 14AC132LA: 14ac132la

    Hello, I just bought a laptop 14AC132LA I want upgadre RAM memory. I couln can't find any manual with instructions on how to install the new memory, and also there I could not find anywhere the type of memory supported, max capacity, etc.. It's the p

  • autofocus, manual video mode? Alpha 77

    Hello! I would like to know if sony will make a new firmware (1.07) and to have an auto focus in video mode? Thank you if you can tell me something - it is very very important I think... Coll F.

  • Acer ft200hql touch screen does not work w / HP Pavilion dv7-5000, Win 7 Pro 64-bit

    After searching for and buying touch screen FT200HQL, it does work with my HP Pavilion laptop dv7-5000, Windows 7, 64-bit.  I have the USB cable is connected (even if it says that it is optional in user's Guide - not an option if you want the touchsc