WordWrap

Hello. I made this code for a school assignment. I need some help with it. Its a method called wordWrap that accepts a Scanner representing an input file as it parameter and outputs each of the file to the console, word wrapping all lines that are longer than 60 characters. So if a line contains 112 characters it prints two lines to the console, the first with 60 characters and the second with 52 characters. If 217 characters, 4 lines of 60 and the final line lenght 37 etc. So far so good, the code does this. But I want the method to work so it also outputs the newly wrapped text back into the original file. It will also do this. But only when i run it the first time. The second time and so on, it only outputs the last line back to the original file.
Can anyone explain me why it only outputs the last line back to the original file, and maybe how to change the code so it will output the hole original text back into the original file.
Thanks.
/*the code
doesn't work when inputFile is formatted the same as console output
then it only prints out a couple of words to the inputFile
needs a input file named inputFile.txt with some text in it. The file should be in the same dictionary as the .java file
import java.io.*;
import java.util.*;
public class Ch6ex3
public static final int lines = 60;
public static void main(String[] args) throws FileNotFoundException
wordWrap("inputFile.txt");
public static void wordWrap(String inputFile) throws FileNotFoundException
String word="";
String word2="";
String remainWords ="";
String remainWords2 ="";
File f = new File(inputFile);
Scanner input = new Scanner(f);
while (input.hasNextLine())
word = input.nextLine();
word2 = word;
while (word.length() > lines)
String first60 = word.substring(0, lines);
System.out.println(first60);
word = word.substring(lines);
//variable that saves the remaining
remainWords = remainWords + word;
//prints the remaining when word is less than 60 char.
System.out.println(word);
//outputs the newly wrapped text back into the original file
          PrintStream out = new PrintStream(f);
               while (word2.length() > lines)
     String second60 = word2.substring(0, lines);
     out.println(second60);
     word2 = word2.substring(lines);
     //variable that saves the remaining
     remainWords2 = remainWords2 + word2;
               out.print(word2);
}

baudits, Ignore the "rude" tone of this post... it's not directed at you personaly, but it does contain useful information, especially bone up on {code} tags.
h1. The Ubiquitous Newbie Tips
* DON'T SHOUT!!!
* Homework dumps will be flamed mercilessly.
* Have a quick scan through the [Forum FAQ's|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ].
h5. Ask a good question
* Don't forget to actually ask a question. No, The subject line doesn't count.
* Ask once
    - Don't Crosspost!
    - Two people answering one question independantly is a waste of there time.
* Don't even talk to me until you've:
    (a) [googled it|http://www.google.com.au/] and
    (b) looked it up in [Sun's Java Tutorials|http://java.sun.com/docs/books/tutorial/] and
    (c) read the relevant section of the [API Docs|http://java.sun.com/javase/6/docs/api/index-files/index-1.html] and maybe even
    (d) referred to the JLS (for "advanced" questions).
* [Good questions|http://www.catb.org/~esr/faqs/smart-questions.html#intro] get better Answers. It's a fact.
    - Many of the regular forumites don't bother to read badly written questions.
      - FFS spare us the SMS and L33t speak! Pull your pants up! and Get a hair cut!
    - Often you discover your own mistake whilst formulating a "Good question".
    - Many forumites will bend over backwards to help with a "Good question",
      especially to a nuggetty problem, because they're interested in the answer.
* Improve your chances of getting laid tonight by writing an SSCCE
    - For you normal people, That's a: Short Self-Contained Compilable Example.
    - Short is sweet: No-one wants to wade through 5000 lines to find your syntax errors!
    - Often you discover your own mistake whilst writing an SSCCE.
    - Solving your own problem yields a sense of accomplishment ;-)
h5. Formatting Matters
* Post your code between a pair of {code} tags
    - That is: {code} ... your code goes here ... {code}
    - this makes code easier to read by preserving whitespace and syntax highlighting.
    - Copy&paste your source code directly from your editor. The forum editor sucks.
    - The forums tabwidth is 8 (as per the convention).
      - Indentation will go wacky if you've mixed tabs and spaces.
      - Proper indentation illustrates program logic.
      - Lines longer than 80 (or so) characters should be wrapped.
* Post your error messages between a pair of {code} tags:
    - That is: {code} ... errors here ... {code}
    - Please mark the erroneous line(s) in your source-code. For example:
        System.out.println("Your momma!); // <<<< ERROR 1
    - Error messages may be rendered useless if the code has been
      modified since the error message was produced.
    - Here's [How to read a stacktrace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/].
&#42; The forum editor has a "Preview" pane. Use it.
    - If you're new around here you'll probably find the "Rich Text" view is easier to use.
    - WARNING: Swapping from "Plain Text" view to "Rich Text" scrambles the markup!
    - To see how a posted "special effect" is done, click reply then click the quote button.
If you (the noob) have covered these bases *you deserve, and can therefore expect, GOOD answers!*
h1. The pledge!
We the New To Java regulars do hereby pledge to refrain from flaming anybody, no matter how gumbyish the question, if the OP has demonstrably tried to cover these bases. The rest are fair game.

Similar Messages

  • Silly HTML wordwrapping question...

    Sorry if the question seems dumb, but is there a way to
    insert a space in a
    block of text that won't break up a word during wordwrapping?
    Example : « This is a test »
    I like the spaces between the quotation marks and the quoted
    text. But I
    don't want either of them left stranded. I want this block of
    text to behave
    like those 2 spaces don't exist. Wrap BEFORE the 1st quote,
    or after the 2nd
    one (or at any point in between as long as it's between two
    words).
    How do I tell those two spaces to be ignored by wordwrapping
    rules?
    Thanks.

    Or HTML -
    " whatever "
    But Cosmo's solution is a more efficient way for sure.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Cosmo Kramer" <[email protected]> wrote in message
    news:gorfvm$2bi$[email protected]..
    > In CSS:
    > white-space: nowrap
    > Should do the trick.
    >
    >
    > "Mike" <[email protected]> wrote in message
    > news:gorfpc$228$[email protected]..
    >> Sorry if the question seems dumb, but is there a way
    to insert a space in
    >> a block of text that won't break up a word during
    wordwrapping?
    >>
    >> Example : « This is a test »
    >>
    >> I like the spaces between the quotation marks and
    the quoted text. But I
    >> don't want either of them left stranded. I want this
    block of text to
    >> behave like those 2 spaces don't exist. Wrap BEFORE
    the 1st quote, or
    >> after the 2nd one (or at any point in between as
    long as it's between two
    >> words).
    >>
    >> How do I tell those two spaces to be ignored by
    wordwrapping rules?
    >>
    >> Thanks.
    >>
    >
    >

  • How to wordwrap in acrobat standard 9

    I am new to acrobat.  I converted a word document to a pdf, started the forms wizard and detected the text fields, but how do I set a field to wordwrap without the text getting smaller and smaller????????????????

    I have Adobe Acrobat Pro X. I cannot find
    how to do this.

  • In a Table trying to WordWrap a long string

    Using a single column and row table to post notes from a data run. The notes may be long and when using a constant font size the string goes off the page, hense the need for WordWrapping
    Attachments:
    Jims_Try.TDR ‏59 KB
    tdmtest.tdm ‏15 KB

    Hello Todd,
    I already spoke to you about this issue and sent you a modified TDR, but I thought that I'd answer it for anyone else who might be interested.
    You should instead use a "Text Object". It is located in the "Decorations" category in the "Report" view. Double-click on the oject to bring up the "Text Object Editor". Use "DIAdem expression >> new" to be able to access DIAdem channels, variables, and functions. I used the expression "cht(1,13)", for instance, to tell the report to load the text from channel 13 into the Text Oject. The Text Oject automatically wraps around.
    Thanks again for contacting National Instruments. Take care!
    Aaron B.
    National Instruments
    Attachments:
    Todds_Try_Modified.TDR ‏63 KB

  • Code View Wordwrap Bug

    In code view window, with wordwrap, dreamweaver hides code characters on the right edge of window.
    It only hides 3-4 last character of the largest line.
    Is it a bug? Does anyone notice it?

    I have also faced this issue where if code's line is large and WordWrap is enabled, then it Dreamweaver CS6 actually wrapped it but hides 3 to 4 characters which is not select able or even view able. See the attached screenshot, you will see Dreamweaver CS6 hides some characters of my line which is definitely something wrong with the DreamWeaver.
    Can anybody found the way to avoid it..??..I cant allow the WordWrap to be disabled and scroll it with that pathetic horizontal scroll.

  • String overlapping problem in mx:List caused by wordWrap

    I'm using mx:List to display String items. The dataProvider is XMLListCollection. Some of the String is long so it takes more than one rows. I use the wordWrap to display the long String in more than one rows. The problem is that the next String item will overlapping with the long String. The mx:List can not adjust the vertical space for the Strings that needs more than one rows dynamically. Any suggections?

    Here is solution: variableRowHeight="true"

  • OLAPDatagrid wordwrap and variable row height

    Hi,
       Does anyone have an idea how to get wordwrap and  variablerowheight work for OLAPDataGrid, Here is the example which I am  trying but it is not working.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="creationCompleteHandler()">
    <mx:Script>
        <![CDATA[
    import mx.rpc.AsyncResponder;
            import mx.rpc.AsyncToken;
            import mx.olap.OLAPQuery;
            import mx.olap.OLAPSet;
            import mx.olap.IOLAPQuery;
            import mx.olap.IOLAPQueryAxis;
            import mx.olap.IOLAPCube;
            import mx.olap.OLAPResult;
            import mx.events.CubeEvent;
            import mx.controls.Alert;
            import mx.collections.ArrayCollection;
            // Format of Objects in the ArrayCollection:
            //  data:Object = {
            //    customer:"AAA",
            //    product:"ColdFusion",
            //    quarter:"Q1"
            //    revenue: "100.00"
            [Bindable]
            private var flatData:ArrayCollection = new ArrayCollection(
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"ColdFusion", quarter:"Q1", revenue:210, cost:25},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Flex", quarter:"Q2", revenue:210, cost:25},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Dreamweaver", quarter:"Q3", revenue:250, cost:125},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Flash", quarter:"Q4", revenue:430, cost:75},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"ColdFusion", quarter:"Q2", revenue:125, cost:20},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Flex", quarter:"Q3", revenue:210, cost:20},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Dreamweaver", quarter:"Q4", revenue:320, cost:120},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Flash", quarter:"Q1", revenue:280, cost:70},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"ColdFusion", quarter:"Q3", revenue:375, cost:120},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Flex", quarter:"Q4", revenue:430, cost:120},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Dreamweaver", quarter:"Q1", revenue:470, cost:220},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Flash", quarter:"Q2", revenue:570, cost:170},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"ColdFusion", quarter:"Q4", revenue:215, cost:90},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Flex", quarter:"Q1", revenue:210, cost:90},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Dreamweaver", quarter:"Q2", revenue:175, cost:190},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Flash", quarter:"Q3", revenue:670, cost:75},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"ColdFusion", quarter:"Q1", revenue:175, cost:20},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Flex", quarter:"Q2", revenue:210, cost:20},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Dreamweaver",quarter:"Q3", revenue:120, cost:120},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Flash", quarter:"Q4", revenue:310, cost:70},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"ColdFusion", quarter:"Q1", revenue:385, cost:120},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Flex", quarter:"Q2", revenue:340, cost:120},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Dreamweaver", quarter:"Q3", revenue:470, cost:220},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Flash", quarter:"Q4", revenue:270, cost:170},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"ColdFusion", quarter:"Q1", revenue:100, cost:25},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Flex", quarter:"Q2", revenue:150, cost:25},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Dreamweaver", quarter:"Q3", revenue:200, cost:125},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Flash", quarter:"Q4", revenue:300, cost:75},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"ColdFusion", quarter:"Q2", revenue:175, cost:20},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Flex", quarter:"Q3", revenue:100, cost:20},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Dreamweaver", quarter:"Q4", revenue:270, cost:120},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Flash", quarter:"Q1", revenue:370, cost:70},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"ColdFusion", quarter:"Q3", revenue:410, cost:120},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Flex", quarter:"Q4", revenue:300, cost:320},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Dreamweaver", quarter:"Q1", revenue:510, cost:220},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Flash", quarter:"Q2", revenue:620, cost:170},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"ColdFusion", quarter:"Q4", revenue:215, cost:90},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Flex", quarter:"Q1", revenue:210, cost:90},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Dreamweaver", quarter:"Q2", revenue:175, cost:190},
             {customer:"AAA AAA AAA AAA AA AAAAA AAAA AA", product:"Flash", quarter:"Q3", revenue:420, cost:75},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"ColdFusion", quarter:"Q1", revenue:240, cost:20},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Flex", quarter:"Q2", revenue:100, cost:20},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Dreamweaver", quarter:"Q3", revenue:270, cost:120},
             {customer:"BBB BB BBBBB BBB BBB BBB BBB BBB BBB BBBB", product:"Flash", quarter:"Q4", revenue:370, cost:70},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"ColdFusion", quarter:"Q1", revenue:375, cost:120},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Flex", quarter:"Q2", revenue:420, cost:120},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Dreamweaver", quarter:"Q3", revenue:680, cost:220},
             {customer:"CCC CCC CCCCC CCCC CCCCCCCCC CCC CCC", product:"Flash", quarter:"Q4", revenue:570, cost:170}        
            private function creationCompleteHandler():void {
                // You must initialize the cube before you
                // can execute a query on it.
                myMXMLCube.refresh();
            // Create the OLAP query.
            private function getQuery(cube:IOLAPCube):IOLAPQuery {
                // Create an instance of OLAPQuery to represent the query.
                var query:OLAPQuery = new OLAPQuery;
                // Get the row axis from the query instance.
                var rowQueryAxis:IOLAPQueryAxis =
                    query.getAxis(OLAPQuery.ROW_AXIS);
                // Create an OLAPSet instance to configure the axis.
    //            var productSet:OLAPSet = new OLAPSet;
    //            // Add the Product to the row to aggregate data
    //            // by the Product dimension.
    //            productSet.addElements(
    //                cube.findDimension("ProductDim").findAttribute("Product").children);
    //            // Add the OLAPSet instance to the axis.
    //            rowQueryAxis.addSet(productSet);
                var productSet:OLAPSet = new OLAPSet;
                // Add the Product to the row to aggregate data
                // by the Product dimension.
                productSet.addElements(
                    cube.findDimension("CustomerDim").findAttribute("Customer").children);
                // Add the OLAPSet instance to the axis.
                rowQueryAxis.addSet(productSet);
                // Get the column axis from the query instance, and configure it
                // to aggregate the columns by the Quarter dimension.
                var colQueryAxis:IOLAPQueryAxis =
                    query.getAxis(OLAPQuery.COLUMN_AXIS);        
                var quarterSet:OLAPSet= new OLAPSet;
                quarterSet.addElements(
                    cube.findDimension("QuarterDim").findAttribute("Quarter").children);
                colQueryAxis.addSet(quarterSet);
                return query;      
            // Event handler to execute the OLAP query
            // after the cube completes initialization.
            private function runQuery(event:CubeEvent):void {
                // Get cube.
                var cube:IOLAPCube = IOLAPCube(event.currentTarget);
                // Create a query instance.
                var query:IOLAPQuery = getQuery(cube);
                // Execute the query.
                var token:AsyncToken = cube.execute(query);
                // Setup handlers for the query results.
                token.addResponder(new AsyncResponder(showResult, showFault));
            // Handle a query fault.
            private function showFault(result:Object, token:Object):void {
                Alert.show("Error in query.");
            // Handle a successful query by passing the query results to
            // the OLAPDataGrid control..
            private function showResult(result:Object, token:Object):void {
                if (!result) {
                    Alert.show("No results from query.");
                    return;
                myOLAPDG.dataProvider= result as OLAPResult;           
        ]]>
    </mx:Script>
    <mx:OLAPCube name="FlatSchemaCube"
        dataProvider="{flatData}"
        id="myMXMLCube"
        complete="runQuery(event);">
        <mx:OLAPDimension name="CustomerDim">
            <mx:OLAPAttribute name="Customer" dataField="customer"/>
            <mx:OLAPHierarchy name="CustomerHier" hasAll="true">
                <mx:OLAPLevel attributeName="Customer"/>
            </mx:OLAPHierarchy>
        </mx:OLAPDimension>
        <mx:OLAPDimension name="ProductDim">
            <mx:OLAPAttribute name="Product" dataField="product"/>
            <mx:OLAPHierarchy name="ProductHier" hasAll="true">
                <mx:OLAPLevel attributeName="Product"/>
            </mx:OLAPHierarchy>
        </mx:OLAPDimension>
        <mx:OLAPDimension name="QuarterDim">
            <mx:OLAPAttribute name="Quarter" dataField="quarter"/>
            <mx:OLAPHierarchy name="QuarterHier" hasAll="true">
                <mx:OLAPLevel attributeName="Quarter"/>
            </mx:OLAPHierarchy>
        </mx:OLAPDimension>
        <mx:OLAPMeasure name="Revenue"
            dataField="revenue"
            aggregator="SUM"/>
    </mx:OLAPCube>
        <mx:Panel title="OLAPCube Control Example"
            height="75%" width="75%" layout="horizontal"
            paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
            <mx:OLAPDataGrid id="myOLAPDG" width="100%" height="100%" variableRowHeight="true" wordWrap="true"/>
        </mx:Panel>
    </mx:Application>
    Regards,
    Alex

    This is my input data
    all other styles are working , the height or line-height properties are not working

  • How can I establish a line length (72 chars) and get TB to wordwrap at that length?

    I would like to establish a line length for email that I compose or receive. How can I do that? How can I get TB to wordwrap at that length and not some shorter length?

    I did that - and found several items for wrap.
    All except the one noted - mailnews.wraplength - have a status of default, type boolean and value false.
    mail.compose.wrap_to_window_width
    mail.wrap_long_lines
    plain_text.wrap_long_lines
    view_source.wrap_long_lines
    mailnews.wraplength
    status: default
    type: integer
    value: 72
    I promised to be careful, so a last check here - can I change that value to 80 or 50 or something other than 72 without messing up Thunderbird?
    Thanks,
    Terry_S

  • Wordwrap nodes in jtree

    Anyone know how we can do wordwrap of nodes in jtree?
    Please help...
    Thanks.

    Any example on this? what html code should I use? The simplest possible, eg
    yourNode.setText("<html>" + yourNodeText + "</html>");Most JComponents can render this html string and produce a good result. But if you wanna get a little more complex and use styles and other web things, then do as said, (two posts above) and use a JEditorPane specifically for cell renderer
    ICE

  • Setting the wordWrap on the Checkbox component

    Anyone know how to get a flash quiz template checkbox to set
    to multi line? I have tried:
    onClipEvent (load) {
    this.checkbox.labelPath.multiline = true;
    this.checkbox.labelPath.wordWrap = true;
    and also on the keyframe that contains the checkbox text
    fields:
    checkbox1.labelPath.multiline = true;
    checkbox1.labelPath.wordWrap = true;
    Any ideas?

    Kristina,
    In the HTML source for your region where you enter the text, you can include the old-fashioned html tags along with your text. Eg. This can be the HTML source.
    <p>
    <font size="2" face="Verdana">
    This is a paragraph.
    </font>
    </p>
    <p>
    <font size="3" face="Times">
    This is another paragraph.
    </font>
    </pand it would display the data in the font that you want/ set above.
    Thanks,
    Rajesh.
    Please mark this/any other answer as helpful or answered if it is so. If not, provide additional details/feedback.

  • DataGridColumn/Wordwrap problem

    I have been attempting to get my data grid to properly word
    wrap. The problem seem to be that the height of the row with the is
    set for all rows by the first occurrence and not row by row. Is
    this correct? Is it possible to make each row size to the contents?
    I am currently using an itemRenderer as follows:
    <mx:DataGridColumn headerText="Feature" dataField="@name"
    wordWrap="true">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Text text="{data.@name}" selectable="false"/>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    Thanks

    Set the DataGrid property variableRowHeight ="true"
    Vygo

  • Text area no longer has wordwrap on developer eddition?

    I use the deveooper's edition of FF (like the debugger FYI) but i've got a problem now.
    since the upgrade today, text areas in some of the forums I visit no longer have wordwrap in them. I checked the settings and can't find them. I also searched the about:config and didn't get anywhere. I saw two var there.
    plain_text_wrap_long_lines (is set to true)
    view_source_wrap_long_lines (is set to true).
    Anyone got a hint?

    You can right-click that text area and open the Inspector to see if there is such a wrap rule present and if not add it and possibly use the userContent.css file to define such a rule.
    <pre><nowiki>@-moz-document domain(<domain>){ textarea { white-space:pre-wrap!important; word-wrap:break-word!important; } }</nowiki></pre>

  • WordWrap property on an item in a datagridcolumn

    Hi,
    I coded it this way:
    <mx:DataGridColumn wordWrap="true" width="200"
    headerText="Comments" dataField="comments">
    The text value doesn't wrap around though. It gets clipped.
    What am i missing?
    Thanks in advanced.

    Hi Peter,
    Thanks for the quick response. I poked around a little bit
    more in the online help and stumbled into the 'itemrenderer'
    property of the datagridcolumn component ... tried it out and
    managed to get the result that I was looking for. Here's how I
    coded it:
    <mx:DataGridColumn width="320" headerText="Comments"
    dataField="comments">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Text text="{data.comments}" selectable="false"/>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    Again, thanks for taking the time looking into it.
    I'm having a great time learning Flex! The sample apps are
    such great starters!
    later,
    pixelflip

  • How can I make a Panel's Title Wordwrap?

    Is there a way to make a panel's title be multiline? I've got a panel where the title is dynamic. I don't know how long the title will be. As it works now, the the title occaisionally gets cut-off. Is there a way to wordwrap a panel's title?
    <mx:Panel id="mySchoolPanel" " 
              title="{myTitle}"
             width="230"
             x="710" y="150"
             headerHeight="50" >
    Thank you.
    -Laxmidi

    The layout logic of Panel appears to assume a single line of text in the title, so to get word-wrapping you may need to extend the class. I had a go at it below - will probably need some tweaking:
    package
        import mx.containers.Panel;
        public class WrappingPanel extends Panel
            // Hard coded padding above and below title text. Should be broken-out
            // into a style.
            private static const HEADER_PADDING : int = 6;
            protected override function createChildren():void
                super.createChildren();
                titleTextField.wordWrap = true;
            protected override function getHeaderHeight():Number
                // Set the header height dynamically based on the height of the title
                return titleTextField.measuredHeight + HEADER_PADDING * 2;
            protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
                super.updateDisplayList( unscaledWidth, unscaledHeight );
                // Set the height of the title to fit all text
                titleTextField.height = titleTextField.measuredHeight;
                // Position the title
                titleTextField.y = HEADER_PADDING;

  • Wordwrap in Bridge email

    This is a major source of annoyance for me, but may well be due to my own lack of understanding:
    When i receive an email on my PB though the bridge with my Torch, for the first second of viewing the text wordwraps perfectly, but then before my very eyes the wordwrap disappears and I am left endlessly scrolling left to right to read what are sometimes very long messages.
    Can someone shed some light on why this happens, is it a setting I need to change or is this just one of the faults inherent with the application.
    Cheers.

    These might be a starter for you...
    http://www.ps-scripts.com/bb/viewtopic.php?f=13&t=3877
    http://www.ps-scripts.com/bb/viewtopic.php?f=13&t=3939

Maybe you are looking for

  • Iphone Disconnecting from Wi-Fi with WDS

    Hi, We are having a problem with my home's wifi connection and the both Iphone 5s that we have. We got and Tplink primary router and a secondary one (also Tplink) working in WDS mode, in the same LAN. The problem is that when the secondary router is

  • Data Guard Broker connecting to standby database fails

    Hello everybody I checked lots of pages but I'm not able to find a solution für my problem. I already set up a primary and a standby database (prim = ALPHA1 / standby = ALPHA2). After enabling my dgmgrl configuration I got two errors: DGM-17016: fail

  • Check iTunes account information on Apple web site?

    Is there any way to check the status of my iTunes account on the apple web site? Specifically, I'm looking for authorized computers, etc. TIA. Airmon

  • Software upgrade

    I was trying to download the blackberry apps to my Bold 9000,and the system says  Unsupported Device Sorry, your device does not meet the system requirements that are needed to support BlackBerry App World. I have downloaded the latest desktop and so

  • Recently I have to right click the layer mask to enable it.

    I never had to to that before. If I don't right click the layer mask and choose enable mask, The history brush tool is disabled. Did I do something wrong?