List itemRenderer text position

Hello!
I have a list as depicted in the attached file.
The Image container has a max with and max height set to 100 and maintain the aspect ratio.
The first 10 are 100x75 because they are wide and it all looks good.
However, the last one which is square and so 100x100, overlaps the text.
If I was to set the text y right after the image ends, it would look bad for the first 10 images as the space would be too large.
I tried setting the text y to be imageContainer.contentHeight, but that doesn't work.
What would you do?
Thanks!

hi,
Here is a test app you can use to load images and 'play' with the renderer.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import mx.controls.Image;
import spark.events.IndexChangeEvent;
import mx.managers.DragManager;
import mx.events.DragEvent;
import mx.events.EffectEvent;
import mx.events.FlexEvent;
import mx.collections.ArrayCollection;
[Bindable] private var ImageCollection: ArrayCollection = new ArrayCollection();
private var fl:FileReferenceList=new FileReferenceList();
private var fr:FileReference = new FileReference();
private var ImageCount: int; 
private var ImageLoop : int;
private function loadImages(): void
fl.addEventListener(Event.SELECT, selectedImages);
var imagesFilter:FileFilter = new FileFilter("Images", "*.jpg;*.gif;*.png");
fl.browse([imagesFilter]);
private function selectedImages(e:Event): void
fl.removeEventListener(Event.SELECT, selectedImages);
ImageCount = fl.fileList.length;
ImageLoop  = 0;
loopList(0);
private function loopList(value:int): void
if (value < ImageCount)
fr = fl.fileList[value];
fr.addEventListener(Event.COMPLETE,getImage);
ImageLoop = ImageLoop+1;
fr.load();
else
imgList.dataProvider = null;
imgList.dataProvider = ImageCollection;
private function getImage(e:Event): void
fr.removeEventListener(Event.COMPLETE, getImage);
if (fr.data.length > 0)
var newData:Object = {
img: fr.data,
lbl: fr.name
ImageCollection.addItem(newData);
loopList(ImageLoop);
]]>
</fx:Script>
<s:List id="imgList" x="116" y="76" width="835" height="542" dataProvider="{ImageCollection}" itemRenderer="ImageRender">
<s:layout>
<s:TileLayout horizontalGap="3" verticalGap="3"/>
</s:layout>
</s:List>
<s:Button x="116" y="35" label="Button" click="loadImages()"/>
</s:Application>

Similar Messages

  • How to get the value from select list to text box

    Hi,
    I have a select list i want to retrieve the value from select list to text box.
    How can i do that???
    Regards,
    Sakthi.

    Hi Sakthi,
    Yo can use the Java script for that..
    Dynamically the value will come into text box.
    Use the below script.
    <script type="text/javascript">
    function disFormItems()
    var lReturn = $v(here your select list name)
    alert(lReturn);
    document.getElementById(here your text box name).value =lReturn; }
    </script>Cheers,
    Shan

  • How do I make a drop down list of text in numbers as it is made in the example spreadsheet for comparing cars for buying where you can choose a value from a dropdown list for each car?

    how do I make a drop down list of text in numbers as it is made in the example spreadsheet for comparing cars for buying where you can choose a value from a dropdown list for each car?

    Where is this example spreadsheet? Without seeing it I can only guess at what you are asking.
    To make a drop-down list (a pop-up menu in Numbers-speak), format the cell as a pop-up then edit and add to the list of items.
    If the example spreadsheet is pulling in a dollar value based on what car you chose in the pop-up, it is probably using LOOKUP or one of the other lookup functions, getting the information from another table (a lookup table). If, instead, these dollar values are what you are choosing in the pop-up, then you need to create a pop-up with these values in it.
    The Help menu includes a link to a page where you can download the Numbers Users Manual. It also has a link to the Formulas and Functions guide. Both are useful to new users.

  • How to get text position in a pdf?

    I need to get text position such has width, height, x, y and base position in a pdf.
    Can one help me to work further.

    i solved PDEForm issue thank you. Now i need to get the text from PDEElement.
    Can you help for this?
      PDEElement pdeElement;
        ASInt32 numElems = PDEContentGetNumElems (pdeContent);
        ASFixedRect bBox;
        for (ASInt32 i = 0; i < numElems; i++) {
            pdeElement = PDEContentGetElem (pdeContent, i);
            if (PDEObjectGetType((PDEObject)pdeElement) == kPDEForm)
                PDEForm form = (PDEForm)pdeElement;
                PDEContent content = PDEFormGetContent(form);
                GetCoOrdinate(content);
            else if(PDEObjectGetType((PDEObject)pdeElement) == kPDEText)
                PDETextState objPDETextState;
                PDEText aotextObject;
                memset(&objPDETextState, 0,sizeof(PDETextState));
                aotextObject = (PDEText)pdeElement;
                PDETextGetTextState(aotextObject,kPDETextRun,0,&objPDETextState,sizeof (PDETextState));
                if(objPDETextState.renderMode == kPDETextInvisible)
                    AVAlertNote("Invisible");
                else
                    PDEElementGetBBox (pdeElement, &bBox);
                    os.str("");
                    os << ASFixedRoundToInt32 (bBox.top) <<":" << ASFixedRoundToInt32 (bBox.bottom) << ":" << ASFixedRoundToInt32 (bBox.left) << ":" << ASFixedRoundToInt32 (bBox.right);
                    AVAlertNote(os.str().c_str());
            else
                os.str("");
                os << "Type: "<< PDEObjectGetType((PDEObject)pdeElement);
               // AVAlertNote(os.str().c_str());
                // Get the bounding box of the PDEElement and fill out the
                // selection structure to highlight the image.
                PDEElementGetBBox (pdeElement, &bBox);
                os.str("");
                os << ASFixedRoundToInt32 (bBox.top) <<":" << ASFixedRoundToInt32 (bBox.bottom) << ":" << ASFixedRoundToInt32 (bBox.left) << ":" << ASFixedRoundToInt32 (bBox.right);
                //AVAlertNote(os.str().c_str());

  • How can I apply text position attributes (e.g. lower third) to more than one title at a time?

    How can I apply text position attributes (e.g. lower third) to more than one title at a time?

    jhb3243
    What version of Premiere Elements are you using and on what computer operating system is it running?
    In the case of this theoretical lower third to be applied to more than one title at a time
    a. Is there text in the lower third besides a graphic of some kind?
    b. Are all the titles to which this lower third is to be applied all together on the Timeline or scattered?
    If no text in lower third and titles all together, then, with text titles on Video 1 and lower third on Video 2, drag out the lower third to cover the length of the text titles on Video 1.
    I do not find "lower third" title files to be in the same category as certain effects where the Copy and "Paste Attributes" or "Paste Effects and Adjustments" lend themselves so well.
    Let us see what others have to say about all this. I will continue to experiment with what you seek and how you would prefer to get there. I am not optimistic but I will try.
    Thanks.
    ATR

  • Getting the absolute text position from a DOM tree

    Does anybody knows how to get the absolute text position of a node inside the DOM tree? Is there any DOM implementation that keep track of the absolute text position of each Node element or I need to overload somo methods by hand?
    Regards,
    Daniel Oliveira

    The position() function in XSLT returns the order of the element.
    For an xml document with elements:
    <a>
    <b></b>
    <b></b>
    </a>
    <xsl:apply-templates select="b"/>
    <xsl:template match="b">
    Element b:
    <xsl:value-of select="position()"/>
    </xsl:template>

  • Extending a component which already extends a spark list ItemRenderer

    Hello everyone,
    I have the following situation: Im displaying lists of very similar data objects (they extend the same parent) so in order to avoid a lot of changes to many itemrenderers (if i need to change something in the common properties) when displaying this data, i defined a spark list ItemRenderer (in MXML) which displays the common properties (file called BaseRenderer.mxml):
    <s:ItemRenderer>
         //in the script section i override the set data property
         //some MXML labels, checkboxes, etc
    </s:ItemRenderer>
    Then i created a specific itemrenderer which extended it (file SpecificRenderer.mxml):
    <model:BaseRenderer>
         //again i override the set data property
         //some ADITIONAL MXML labels, checkboxes, etc
    </model:BaseRenderer>
    When i run the app, and when the specific renderer is used, it works (no errors are thrown) , but it only shows the content of specific renderer, nothing from base renderer is visible. Is this the right way to do this, or do i have to override some additional stuff in my specific renderers?
    Thank you.
    One more thing, i just noticed, if i remove all MXML tags from specific renderer, the content from base renderer becomes visible, seems as if specific content overrides base content. Is there a way to add mxml tags into the specificrenderer?

    Yes i suspected them to be merged, and you gave me a great idea. As you say this behavior is true across all mxml defined components, not just itemrenderers. I want to avoid actionscript renderers because i dont (and wont) have any performance issues anyway and i like flexibility in design view, so instead i found another solution which i slightly modified. Some spark components inherit property mxmlContent, which you can override. This is what i came up with in the end: I added the property override into specific renderer and everything is shown as expected (because base elements are merged with the ones from extended component).
    override public function set mxmlContent(value:Array):void {
                                            var adding:Boolean = true;
                                            var index:int = 0;
                                            while (adding) {
        var element:IVisualElement = null;
        try {          element = super.getElementAt(index); } catch(e:Error) {          }
        if ( element != null )  {
           value.push(element);
           index += 1;
        else
          adding = false;
                                            value.reverse();
                                            super.mxmlContent = value;

  • SRM - Problem with a SRM Order with text position

    Hello,
    I produced an order requisition from SRM. (Document Type EC / Field Sel.Key NBB) Unfortunately I cannot change the category of commodities during this order requisition over the transaction ME52N. This must be however possible. The appropriate Field Sel.Key NBB is correctly adjusted.
    The problem apparently lies in SRM. With normal SRM orders in the R/3 an order is put on. The category of commodities may not be changed then no more.
    With SRM orders with text positions a order requisition is to be put on in the R/3. Functions also. The category of commodities is not also here alterable only unfortunately. That must function however.
    My question: How can one change the data of the order requisition with text orders over SRM?
    Regards
    J.V.

    hi J.v
    you can make new request rather than changing the purchase request since material group in important data.
    why you want to edit the PR and again trying to edit the data in sc created from pr.
    I recommend you to create a new PR for your request.
    since
    eprofile offered sap ecc according to your material grp / purchase group combination inthe eban table (eprofile field).
    but why you are trying to edit the same pr in the backend method(it is no.2 activity in sap - not supposed to do right)
    if you dont want that request cancel the sc (complete it).
    hope now you understood.
    br
    muthu

  • Text positioning not correct while typing in Flex Mobile Text Area

    When I try to write text in Flex mobile TextArea, the text positioning is not correct. What might be the issue? Do I need to specify some Skin Class for it?

    Could be that the font doesn't have Hindi chars support and the text you paste is HTML chars.
    You could try to embed a font you know has the appropriate chars and use that for global and Applications CSS classes.

  • Compulsory quantity in text position of BOM

    Hi gurus,
    when I create a production order (CO01) and I add a text position in BOM (type T) the system requires an obligatory quantity. It's not logical  that a text position requires a quantity. Is it possible to make the text position not obligatory?
    Thank you.

    Its very typical scenario, looks stupid to ask quantity even when we mention the Item catagory as T, but there must be something behind this which our mand cant find out, we are unable to get that kind of scenario.
    by the way if you want to remove this files do as follows.
    Go to tranaxcation code. SE80>enter Function group CMOD> double click screen no 150>click on layout> screen painter will come. then click on filed required quantity.  the filed is "required" entry.
    change that to optional.
    It will solve your issue.  for this you need the access key, since its a change in standar SAP.
    Regards,
    Pravin Mukkawar
    TCS Gandhinagar
    SAP-PP-APO consultnat.

  • Horizontal text positioning of DrawString method

    I am trying to reproduce the below XPS XAML using the GDI+:
    <FixedPage xmlns="http://schemas.microsoft.com/xps/2005/06" xmlns:x="http://schemas.microsoft.com/xps/2005/06/resourcedictionary-key"
    xml:lang="und" Width="816" Height="1056">
    <Path Fill="#FFFFFFFF" Data="M0,0L816,0 816,1056 0,1056Z" />
    <Canvas Clip="M0,0L816,0 816,1056 0,1056Z">
    <Path Fill="#FFFFFFFF" Data="M0,0L816,0 816,1056 0,1056Z" />
    <Path Fill="#FF008000" Data="M0,0L816,0 816,1056 0,1056Z" />
    <Canvas RenderTransform="1,0,0,1,10,10">
    <Path Fill="#FFFFFF00" Data="M0,0L796,0 796,120 0,120Z" />
    <Canvas Clip="M0,0L796,0 796,120 0,120Z">
    <Glyphs OriginX="0" OriginY="87.5866666666667" FontRenderingEmSize="96" FontUri="/Resources/1057478c-ad6c-46da-af29-3e00c349c111.ODTTF" UnicodeString="Rutger
    Koperdraad" Fill="#FF000000" xml:lang="en-us" />
    </Canvas>
    </Canvas>
    </Canvas>
    </FixedPage>
    I manage to get the rectangles and the vertical text position correctly printed to the XPS document writer using the code below:
    Private Sub OnPrintPageEx(sender
    As Object, e
    As PrintPageEventArgs)
    If m_intPageNumber < m_objPaginator.PageCount
    Then
    Using objGraphics
    As System.Drawing.Graphics = e.Graphics
    ' Correction factor between WPF and printer units
    Dim f As
    Single = 100 / 96
    ' Set the graphics quality
    objGraphics.SmoothingMode = Drawing.Drawing2D.SmoothingMode.None
    objGraphics.InterpolationMode = Drawing.Drawing2D.InterpolationMode.NearestNeighbor
    ' Draw the green background
    Dim stcRect1 As
    New Drawing.RectangleF(0, 0, 816 * f, 1056 * f)
    Call objGraphics.FillRectangle(Drawing.Brushes.DarkGreen, stcRect1)
    ' Draw the yellow rectangle
    Dim stcRect2 As
    New Drawing.RectangleF(0, 0, 796 * f, 120 * f)
    Call objGraphics.TranslateTransform(10 * f, 10 * f)
    Call objGraphics.FillRectangle(Drawing.Brushes.Yellow, stcRect2)
    ' Draw the text
    Dim objFont As
    New Drawing.Font("Times New Roman", 72)
    Dim intEmHeight As
    Integer = objFont.FontFamily.GetEmHeight(objFont.Style)
    Dim intCellAscent
    As Integer = objFont.FontFamily.GetCellAscent(objFont.Style)
    Dim sngOffset As
    Single = 87.58667F - 96.0F / intEmHeight * intCellAscent
    Dim stcRect3 As
    New Drawing.RectangleF(0, sngOffset * f, 796 * f, 120 * f)
    Call stcRect3.Inflate(100 / 96, 100 / 96)
    Call objGraphics.DrawString("Rutger Koperdraad", objFont, Drawing.Brushes.Black, stcRect3)
    End Using
    m_intPageNumber += 1
    e.HasMorePages = (m_intPageNumber < m_objPaginator.PageCount)
    End If
    End Sub
    However, the horizontal text positioning is still different. The first letter starts too far to the right and the overall text is wider. How can I reproduce the XAML correctly in the GDI+?
    To give some background: I have a WPF application that can print using WPF/XPS technology. Since this print path gives quality problems on many legacy printer driver (bad image resolution due to a bug in the XPS to GDI+ conversion), I am building an
    alternative print engine based on the GDI+. So effectively, I need to convert my WPF graphics to the GDI+.
    Rutger Koperdraad.

    OK, I found the answer myself. By adding the string format as below, I get the correct result.
    ' Draw the text
    Dim objFont As
    New Drawing.Font("Times New Roman", 72)
    Dim intEmHeight As
    Integer = objFont.FontFamily.GetEmHeight(objFont.Style)
    Dim intCellAscent
    As Integer = objFont.FontFamily.GetCellAscent(objFont.Style)
    Dim sngOffset As
    Single = 87.58667F - 96.0F / intEmHeight * intCellAscent
    Dim stcRect3 As
    New Drawing.RectangleF(0, sngOffset * f, 796 * f, 120 * f)
    Dim objFormat As
    New Drawing.StringFormat(Drawing.StringFormat.GenericTypographic)
    Call objGraphics.DrawString("Rutger Koperdraad", objFont, Drawing.Brushes.Black, stcRect3, objFormat)
    Rutger Koperdraad.
    Thank you for sharing your solutions and experience here. It will be very beneficial for other community members who have similar questions.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Check class name of List ItemRenderer

    Hello,
    I am setting the itemRenderer of a Spark Mobile List like so:
    var ir:ClassFactory=new ClassFactory(MyItemRenderer);
    ir.properties={etc. etc.};
    list.itemRenderer=ir;
    How can I check if the list's itemRenderer is MyItemRenderer or at least a class name string comparison?
    Thank you.

    Custom itemRenderer:
    public class MyItemRenderer extends LabelItemRenderer {...}
    View:
    var ir:ClassFactory=new ClassFactory(MyItemRenderer);
    ir.properties={etc. etc.};
    list.itemRenderer=ir;
    trace(ClassFactory(list.itemRenderer).generator);
    That outputs: [Class LabelItemRenderer].

  • JButton text position without an icon

    Hi,
    I'm trying to set the text on my JButtons to be in the top left corner. I've read many of the topics on JButton text position, but they all assume you have an icon with your text. I want to be able to do it without icons (as my buttons don't need them). I tried using the setHorizontalTextPosition and setVerticalTextPosition methods, but the text is still in the same spot.
    Does anyone have any ideas?
    Message was edited by:
    raardvark

    Hi,
    I'm trying to set the text on my JButtons to be in
    the top left corner. I've read many of the topics on
    JButton text position, but they all assume you have
    an icon with your text. I want to be able to do it
    without icons (as my buttons don't need them). I
    tried using the setHorizontalTextPosition and
    setVerticalTextPosition methods, but the text is
    still in the same spot.
    Does anyone have any ideas?
    Message was edited by:
    raardvarkPut a new border on the button that has some space on the bottom and right. Or add insets with the new border.

  • Skinning TextInput (and others) changes text position

    Hi there,
    I've been working on updating the visuals of our application and one path I took was skinning components. There's a designer in our team that works well with Photoshop and Flash (but not with Flex or programming at all), so I sent him the link of Narciso Jamarillo's article on creating skins for Flex using Adobe Creative Suit.
    Although we had few troubles working over the default template for HaloSkin at first, we kinda figured out most of them. But now there's one problem I couldn't find a solution yet. Whenever I apply the skins he made, the components that show text like TextInput and ComboBox start showing text in the wrong position, a little above the center and closer to the borders (sometimes it gives the impression it cuts out characters when I align the text at right).
    Here's a picture:
    Skinned on the left, not skinned on the right.
    So I'd like to know what exactly has influences over text position when I create a skin in flash, or any hint on what is causing this behavior.
    Thanks in advance.
    With regards,
    David

    I asked the designer to check in Flash and all grid lines are in proportional distance (4 pixels from edge). I also asked him to create a new skin from template, without any changes, and it displayed the same behavior, so I don't think it's a scale 9 slice configuration problem.
    Could you elaborate what kind of "minor tweaking" I could do on Flash? I ask because we just changed the shapes and and the 9 slice scale grid, is there anything else you could setup for a skin?
    David

  • List of text symbols

    hi,
    Can i get the o/p as list of text-001,text-002......text-a001....depending on nos of literals in given code.
    eg:
    Literal         Text Symbol
    'ABC'           text-001
    'DEF'           text-003
    'Line is'       text-aa1
    Thanks

    Hi.abhi...try this...
    DATA: ITAB LIKE STANDARD TABLE OF TEXTPOOL WITH HEADER LINE.
    data: wa like line of itab.
    CALL FUNCTION 'RS_TEXTPOOL_READ'
      EXPORTING
        OBJECTNAME                 = SY-REPID
      ACTION                     = 'EDIT'
      TABLES
        TPOOL                      = ITAB
    EXCEPTIONS
       OBJECT_NOT_FOUND           = 1
       PERMISSION_FAILURE         = 2
       INVALID_PROGRAM_TYPE       = 3
       ERROR_OCCURED              = 4
       ACTION_CANCELLED           = 5
       OTHERS                     = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    skip 3.
    LOOP AT ITAB into wa.
    WRITE at 5 wa-entry.
    concatenate 'text-' wa-KEY into w_text.
    WRITE at 15 w_text.
    write /.
    clear w_text.
    ENDLOOP.
    Ram

Maybe you are looking for

  • Itunes store will let me buy songs movies etc. but not program apps

    i have recently added credit to my account from a gift card. now itunes will let me purchase movies shows music all that except for apps. every app i try and download for my ipod touch it takes me straight back to my billing into and asks for a credi

  • Conecting a JVC HDD GZ-MG150 to mac

    Can somebody give an idea what actualy JVC means " 1. Click on the "DOWNLOAD". 2. Double click on the "JVCVideoDecoder.sit" icon. 3. Drag the "JVC Video Decoder" icon to the "System Folder",then drop the icon there. 4. Click the "OK" button when the

  • Launching problem MX after 11.5 upgrade

    Hello, If this is a general problem, excuse my ignorance as I cant find any thread discussing it. I installed my MX-version on my new computer and haven´t been that Director active lately. I had the impression that Adobe offered some free upgrade (if

  • Customizing window sizes in finder?

    hi , I waswondering if anyone can help me here. .. Everytime I open a folder, i resize a window to my preferable size and everytime i open that folder again, finder didnt remember the size. I know it seems trivial, but I want all my window sizes to b

  • 'assertion failed!' error when running Lightroom

    I had a lock-up the other day and had to power-off the computer which Lightroom was running. Now, Lightroom won't start in my normal user account - it will in my guest account though. I've tried removing the .plist file, the package file and the App,