A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: TextField formatting

  1. #1
    Member
    Join Date
    May 2004
    Posts
    60

    TextField formatting

    Hello all,

    Why wont my textfield show 12-point verdana? What am I doing wrong?

    Code:
    // Create a new text field to hold text. NOTE the UI scrollbar must be on the second frame
    // becasue the textfield created here must first be created before the uibar instance
    this.createTextField("table_txt", 99, -26.1, -13, 347.9, 166.5);
    table_txt.multiline = true;
    table_txt.html = true;
    table_txt.font = "Verdana";
    table_txt.size = 12;
    
    // Creates column headers, formatted in bold, separated by tabs.
    var rowHeaders:String = "";
    
    // Creates rows with data.
    var row_1:String = "<b>BSI    </b>\tGloves and eye protection";
    var row_2:String = "<b>Scene Saftey</b>\tScene is safe";
    var row_3:String = "<b>Resources</b>\t3 person aid crew, ALS crew added if needed";
    var row_4:String = "<b>-----------------------------------------------------------------------------</b>\t";
    var row_5:String = "<b>CC/MOI</b>\tMVA, decreased LOC";
    var row_6:String = "<b>Respirations</b>\t20";
    var row_7:String = "<b>Pulse</b>\tRadial at 110, strong";
    var row_8:String = "<b>Mental Status</b>\tAwake, but has difficulty with attention";
    var row_9:String = "<b>Skin Signs</b>\tCool, moist, pale";
    var row_10:String = "<b>Obvious Trauma</b>\tNone";
    var row_11:String = "<b>Blood Pressure</b>\t112/palp (later 120/74)";
    
    // Sets two tabstops, at 25 and 100 points.
    table_txt.htmlText = "<textformat tabstops='[25,100]'>";
    table_txt.htmlText += rowHeaders;
    table_txt.htmlText += row_1;
    table_txt.htmlText += row_2 ;
    table_txt.htmlText += row_3 ;
    table_txt.htmlText += row_4 ;
    table_txt.htmlText += row_5 ;
    table_txt.htmlText += row_6 ;
    table_txt.htmlText += row_7 ;
    table_txt.htmlText += row_8 ;
    table_txt.htmlText += row_9 ;
    table_txt.htmlText += row_10 ;
    table_txt.htmlText += row_11 ;
    table_txt.htmlText += "</textformat>";
    Thanks for any help

    Greg

  2. #2
    Member
    Join Date
    May 2004
    Posts
    60
    Never mind figured it out... you need your html tags in the sting vars...

    Code:
    // Creates rows with data.
    var row_1:String = "<FONT FACE ='Verdana' SIZE ='12'><b>BSI    </b>\tGloves and eye protection</FONT>";
    var row_2:String = "<FONT FACE ='Verdana' SIZE ='12'><b>Scene Saftey</b>\tScene is safe</FONT>";

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center