Please help with simple code. Picture and textformatting.

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default Please help with simple code. Picture and textformatting.

    Hi,
    I want to design a HBox. I want to put the picture on the left and text on the
    right and bootom . I am having 2 problems.

    1- I want to start text where picture ends leaving 10 pix in between.
    2- I want the text to flow below the picture too.

    Here is my code.

    Please help.

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:HBox id="LowerLeft" width="30%" height="80%" borderStyle="solid"
    borderColor="#fffffc" borderThickness="2">
    <mx:Image id="image1" source="1.jpg" height="100" width="150"/>
    <mx:TextArea height="172" width="288" horizontalScrollPolicy="off"
    verticalScrollPolicy="off" letterSpacing="1" backgroundAlpha="0"
    borderThickness="0" fontSize="12" fontFamily="Times New Roman" wordWrap="true"
    textAlign="left" backgroundColor="#869ca7" color="#ffffff">
    <mx:htmlText>
    <![CDATA[This is cardiovascular medicine.translate the
    extraordinary progress of Promote heart health. At the nucleus of SCVI is a
    richl as it iscardiovascular medicine

    This is cardiovascular medicine.translate the extraordinary progress of
    science and rich thing.

    Cardiovascular medicineThis is cardiovascular medicine.translate the
    extraordinary progress. ]]></mx:htmlText>
    </mx:TextArea>
    </mx:HBox>

    </mx:Application>



    Shelady Guest

  2. Similar Questions and Discussions

    1. simple code help with streaming 1 file
      I set up the Flash Media Server 2.0 on Windows (test box) under the host dl35.tamu.edu (behind a firewall so I don't mind giving it out) Under the...
    2. Simple Cookie code
      I'm doing a cookie exercises for my CF class. The exercise creates a cookie and checks whether you have visited the site before. Code: <cfif...
    3. no response from a simple php/mysql code
      Hi, all, I'm a total newbie to php and just couldn't make the following php file(grabbed at awtrey.com, basic php/mysql code) running at...
    4. Picture file upload code
      I am looking for some code somewhere that is capable of getting information from a file submitted with the Form File tag and then uploading it to a...
    5. C# Equivalent of VB.Net Code -- One line of code, simple
      Great idea, thanks. I only need something simple in order for my contact form to work correctly. It's nothing with a lot of overhead. Ron...
  3. #2

    Default Re: Please help with simple code. Picture and textformatting.

    i could not know whether your image and text comes from database, or it is
    always fixed.

    if it is fixed, i have an idea.

    you just use two rows/ three components.

    row 1 having image and a FIX SIZED text/label component(i actually dont
    remember which supports multiline).
    row 2 having a BIG FIX WIDTH text/label component.

    now divide your text into two parts, for two text/label components.

    after you play with size and positioning of your image and texts, i think you
    can get it.

    subedimadhav@yahoo.c Guest

  4. #3

    Default Re: Please help with simple code. Picture and textformatting.

    You'll want to use a Text component not a TextArea component, TextArea was more
    designed for the input of text not display. Even though you can style it to not
    look like it, it's internal workings were made to show scrollbars as often as
    it could. The Text component was designed to never show scroll bars and is
    multiline by default IF you do not set a height to it and constrain it's width
    so that it knows where to word wrap. Using an HBox with an image on the left
    and a Text component on the right would be an easy solution to this. Make sure
    to not set explicit heights on the components and to let them expand to there
    content. The 10 pixel gap you asked for is the default gap within an HBox.

    Kaotic101 Guest

  5. #4

    Default Re: Please help with simple code. Picture and textformatting.

    Thanks for replying but text is not flowing underneath the picture. Any other idea!!!

    thanks
    Shelady Guest

  6. #5

    Default Re: Please help with simple code. Picture and textformatting.

    You could add the image inline with the html text and the text will wrap around
    the image.

    TS

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:HBox id="LowerLeft" width="30%" height="80%" borderStyle="solid"
    borderColor="#fffffc" borderThickness="2">
    <mx:TextArea height="300" width="288" horizontalScrollPolicy="off"
    verticalScrollPolicy="off" letterSpacing="1" backgroundAlpha="0"
    borderThickness="0" fontSize="12" fontFamily="Times New Roman" wordWrap="true"
    textAlign="left" backgroundColor="#869ca7" color="#ffffff">
    <mx:htmlText>
    <![CDATA[
    <p><img src='1.jpg' width='100' height='150' align='left' hspace='10'
    vspace='10'>This is cardiovascular medicine.translate the extraordinary
    progress of Promote heart health. At the nucleus of SCVI is a richl as it
    iscardiovascular medicine.</p><p>This is cardiovascular medicine.translate the
    extraordinary progress of science and rich thing.</p><p>Cardiovascular
    medicineThis is cardiovascular medicine.translate the extraordinary progress.
    </p>
    ]]>
    </mx:htmlText>
    </mx:TextArea>
    </mx:HBox>

    </mx:Application>

    VarioPegged Guest

  7. #6

    Default Re: Please help with simple code. Picture and textformatting.

    Thanks a lot Sir.

    She
    Shelady Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139