Styling one element of a concatenation

A user types input into 5 or so text fields. Following this a
button is clicked which triggers a concatenation of all the fields.
The result (with added spaces and punctuation) is then displayed in
another field. The catch is that one of the input fields has to
displayed as italicized. I have set a new format for the specific
input field that causes the input text to be displayed as
italicized. However, when all the fields are added together and
displayed in the new text field, the formatting is either dropped
or the text Field instance name is displayed.
I can post specific code but basically it is this:
//create format for input field
var myformat_fmt:TextFormat = new TextFormat ();
myFormat _fmt.italic = true;
this.onEnterFrame = function () {
myTextField_txt.setTextFormat(myFormat _fmt);
//a button to cause concatenation and display of results
createTxt_btn.onRelease=function (){
var myStringA_str:String = new String(textField1_txt + " (");
var myStringB_str:String = new String(textField2+ "). ");
//concat field called "complete_txt is displayed, html
properties are set
//this includes a botched attempt to add HTML
formatting...crap ensues
complete_txt.html = true;
complete_txt.multiline = true;
complete_txt.wordWrap = true;
complete_txt.htmlText = myStringA_str + myStringB_str +
"<i>myTextField_txt.</i>" +".";
The above code produces italic formating in the final string
but I get the instance name (myTextField_txt) instead of the
content of that field! Is there some operator that lets you use
HTML tags with strings?
There seems to be no documentation that talks about this
specific case. Even if I don't use the strings and set the htmlText
to be a mega-concatenation the required italic formating is shown
with the name of the text field.
(Meanwhile my cubicle neighbor keeps laughing and telling me
to ditch Flash and use Java but that's another forum topic)
Any thoughts would be very helpful.
Bill

quote:
Originally posted by:
GWD
FYI to get the text content of a textfield, all you need to
do is access its .text property. So it could be done like this as
well.
complete_txt.htmlText = textField1_txt.text+"("+
textField2_txt.text+ ")
<i>"+myTextField_txt.text+"</i>" +".";
Thanks for your help. Actually I tried that method but I get
a syntax error. Did you try it and it works?
Bill

Similar Messages

  • How to get multiple elements into one element as multiple occurences

    I can't figure out how to do this. I have an input message that has multiple elements and I need to take those elements and copy them into one element with each new element going in as a new occurence or instance. For example
    I have this input under one parent node.
    element1
    element2
    element3
    element4
    and this is the output I need
    Node
    Element1[0]
    Element2[1]
    Element3[2]
    Element4[3]
    The input XML looks like this
    Payload
    Element1
    Element2
    Element3
    and the output XML needs to look like this
    Payload
    Element.
    Thanks in advance

    How about this.
    Input XML:
    <Row>
              <Column1>TOTAL</Column1>
              <Column_9_2_2008>900</Column_9_2_2008>
              <Column_9_2_20082>890</Column_9_2_20082>
              <Column_9_3_2008>52</Column_9_3_2008>
              <Column_9_4_2008>0</Column_9_4_2008>
              <Column_9_4_20082>0</Column_9_4_20082>
              <Column_9_5_2008>0</Column_9_5_2008>
              <Column_9_5_20082>0</Column_9_5_20082>
              <Column_9_8_2008>0</Column_9_8_2008>
              <Column_9_8_20082>0</Column_9_8_20082>
              <Column_9_9_2008>0</Column_9_9_2008>
              <Column_9_9_20082>0</Column_9_9_20082>
              <Column_9_10_2008>0</Column_9_10_2008>
              <Column_9_10_20082>0</Column_9_10_20082>
              <Column_9_11_2008>0</Column_9_11_2008>
              <Column_9_11_20082>0</Column_9_11_20082>
              <Column_9_12_2008>0</Column_9_12_2008>
              <Column_9_12_20082>0</Column_9_12_20082>
              <Column_9_15_2008>0</Column_9_15_2008>
              <Column_9_15_20082>0</Column_9_15_20082>
              <Column_9_16_2008>0</Column_9_16_2008>
              <Column_9_16_20082>0</Column_9_16_20082>
              <Column_9_17_2008>0</Column_9_17_2008>
              <Column_9_17_20082>0</Column_9_17_20082>
              <Column_9_18_2008>0</Column_9_18_2008>
              <Column_9_18_20082>0</Column_9_18_20082>
              <Column_9_19_2008>0</Column_9_19_2008>
              <Column_9_19_20082>0</Column_9_19_20082>
              <Column_9_22_2008>0</Column_9_22_2008>
              <Column_9_22_20082>0</Column_9_22_20082>
              <Column_9_23_2008>0</Column_9_23_2008>
              <Column_9_23_20082>0</Column_9_23_20082>
              <Column_9_24_2008>0</Column_9_24_2008>
              <Column_9_24_20082>0</Column_9_24_20082>
              <Column_9_25_2008>0</Column_9_25_2008>
              <Column_9_25_20082>0</Column_9_25_20082>
              <Column_9_26_2008>0</Column_9_26_2008>
              <Column_9_26_20082>0</Column_9_26_20082>
              <Column_9_29_2008>0</Column_9_29_2008>
              <Column_9_29_20082>0</Column_9_29_20082>
              <Column_9_30_2008>0</Column_9_30_2008>
         </Row>
    Output XML:
    <Total>
              <Payload>900</Payload>
         </Total>
         <Total>
                   <Payload>890</Payload>
         </Total>
         <Total>
                   <Payload>52</Payload>
         </Total>

  • How to show only one element in drop list(common VO)

    Hi All,
    I'm using 11g adf jdev.
    I have a common view object VO. In this VO one attribute is dropdown list , which i commonly used in some jsf pages .
    Now in one particular jsf page i want show only one element in the dropdown list .
    how can i handle with out distrib'g the common VO.
    THANKS IN ADVANCE

    BTW, why you want to display only one item in the list.
    If you are sure that the list will be having only one item, why don't you have it as inputText/outputText
    How do you filter out the item to be displayed in the list? If that filtering is done on listdatasource bound to the list, the list will automatically show only one item(i.e, the filtered item)
    HTH
    Sireesha

  • How do you update an intensity plot one element at a time?

    I would like to use an intensity plot (or other control) to plot data collected from A/D channels. How do you get the Intensity plot to update one element at a time vs. row by row? Tips and suggestions greatly appreciated!

    > I would like to use an intensity plot (or other control) to plot data
    > collected from A/D channels. How do you get the Intensity plot to
    > update one element at a time vs. row by row? Tips and suggestions
    > greatly appreciated!
    >
    You will need to use the intensity graph and keep the buffer yourself.
    Init the data with background values and start filling then in using
    Replace Array subset. Presumably you are in a loop. Recirculate the
    data in a shift register adding new data each iteration and plotting the
    array to the intensity graph.
    Once you get to the horizontal edge, you need to decide if you split the
    data to get rid of the first row and append a new background row to the
    end making a strip chart, or do you clear the array and start over from
    the initial edge again making a scope chart, or do you mod the index
    with the buffer size and erase a row at a time in advance making a sweep
    chart.
    To update the scales, you don't have to change the data. Just write to
    the Offset property each time you scroll and it will relabel the data
    with 0 mapping to the offset value.
    Greg McKaskle

  • Sequence contains more than one element error in MVC 5

    I created some models, added the migration and then did an update database operation, though at my last update database operation I got the error message saying:
        Sequence contains more than one element
    Below you can find my migration configuration:
            context.Categories.AddOrUpdate(p => p.CategoryName,
                new Category
                    CategoryName = "Sport"
                new Category
                    CategoryName = "Music"
            context.Subcategories.AddOrUpdate(p => p.SubcategoryName,
                new Subcategory
                    SubcategoryName = "Football"
                new Subcategory
                    SubcategoryName = "Basketball"
                new Subcategory
                    SubcategoryName = "Piano"
                new Subcategory
                    SubcategoryName = "Violin"
            context.Services.AddOrUpdate(p => p.ServiceType,
                new Service
                    ServiceType = "Football player",
                    Category = { CategoryName = "Sport" },
                    Subcategory = { SubcategoryName = "Football" }
                new Service 
                    ServiceType = "Piano lessons",
                    Category = { CategoryName = "Music" },
                    Subcategory = { SubcategoryName = "Piano" }
    The problem occurs with when I add new Services. I already have categories and subcategories, and if I do like Category = new Category { CategoryName = "Music" } then it works but I get Music entry twice in my database (for this example). I want to
    use the already added categories and subcategories. Below also you can find my models definitions.
    public class Category
        [Key]
        public int CategoryID { get; set; }
        public string CategoryName { get; set; }
    // Subcategory is defined the same way...
    public class Service
        public int ServiceID { get; set; }
        public string ServiceType { get; set; }
        public virtual Category Category { get; set; }
        public virtual Subcategory Subcategory { get; set; }
    }

    After reading the article in the link that you have provided, I did the following changes in my models, and created controllers for each of them using Entity Framework, then I created a migration and named it InitialServices. Afterwards, I added a few
    entries in my Configuration.cs file and when I typed Update-Database, I got an error message in package manager saying "RenameIndexOperation", which is marked with red. Below you can find my changed models and my Configuration.cs file, along with the migration
    file created automatically.
    Category.cs:
        public class Category
            [Key]
            public int CategoryID { get; set; }
            public string CategoryName { get; set; }
            public virtual ICollection<Subcategory> Subcategories { get; set; }
    Subcategory.cs:
        public class Subcategory
            [Key]
            public int SubcategoryID { get; set; }
            public string SubcategoryName { get; set; }
            [ForeignKey("Category")]
            public int CategoryID { get; set; }
            public virtual Category Category { get; set; }
            public virtual ICollection<Service> Services { get; set; }
    Service.cs:
        public class Service
            [Key]
            public int ServiceID { get; set; }
            [Required]
            [Display(Name="Service type")]
            public string ServiceType { get; set; }
            [ForeignKey("Subcategory")]
            public int SubcategoryID { get; set; }
            public int Count { get; set; }
            public virtual Subcategory Subcategory { get; set; }
    _InitialServices.cs:
        public partial class InitialServices : DbMigration
            public override void Up()
                DropForeignKey("dbo.Services", "Category_CategoryID", "dbo.Categories");
                DropIndex("dbo.Services", new[] { "Category_CategoryID" });
                RenameColumn(table: "dbo.Services", name: "Subcategory_SubcategoryID", newName: "SubcategoryID");
                RenameIndex(table: "dbo.Services", name: "IX_Subcategory_SubcategoryID", newName: "IX_SubcategoryID");
                AddColumn("dbo.Subcategories", "CategoryID", c => c.Int(nullable: false));
                CreateIndex("dbo.Subcategories", "CategoryID");
                AddForeignKey("dbo.Subcategories", "CategoryID", "dbo.Categories", "CategoryID", cascadeDelete: true);
                DropColumn("dbo.Services", "Category_CategoryID");
            public override void Down()
                AddColumn("dbo.Services", "Category_CategoryID", c => c.Int(nullable: false));
                DropForeignKey("dbo.Subcategories", "CategoryID", "dbo.Categories");
                DropIndex("dbo.Subcategories", new[] { "CategoryID" });
                DropColumn("dbo.Subcategories", "CategoryID");
                RenameIndex(table: "dbo.Services", name: "IX_SubcategoryID", newName: "IX_Subcategory_SubcategoryID");
                RenameColumn(table: "dbo.Services", name: "SubcategoryID", newName: "Subcategory_SubcategoryID");
                CreateIndex("dbo.Services", "Category_CategoryID");
                AddForeignKey("dbo.Services", "Category_CategoryID", "dbo.Categories", "CategoryID", cascadeDelete: true);
    Configuration.cs:
    protected override void Seed(Workfly.Models.ApplicationDbContext context)
                var categories = new List<Category>
                    new Category { CategoryName = "Sport" },
                    new Category { CategoryName = "Music" }
                categories.ForEach(c => context.Categories.AddOrUpdate(p => p.CategoryName, c));
                context.SaveChanges();
                var subcategories = new List<Subcategory>
                    new Subcategory { SubcategoryName = "Football", CategoryID = categories.Single(c => c.CategoryName == "Sport").CategoryID },
                    new Subcategory { SubcategoryName = "Basketball", CategoryID = categories.Single(c => c.CategoryName == "Sport").CategoryID },
                    new Subcategory { SubcategoryName = "Piano", CategoryID = categories.Single(c => c.CategoryName == "Music").CategoryID },
                    new Subcategory { SubcategoryName = "Violin", CategoryID = categories.Single(c => c.CategoryName == "Music").CategoryID }
                foreach (Subcategory s in subcategories)
                    var subcategoriesInDB = context.Subcategories.Where(c => c.Category.CategoryID == s.CategoryID).SingleOrDefault();
                    if (subcategoriesInDB == null)
                        context.Subcategories.Add(s);
                context.SaveChanges();
                var services = new List<Service>
                    new Service { ServiceType = "Football coach", SubcategoryID = subcategories.Single(s => s.SubcategoryName == "Football").SubcategoryID },
                    new Service { ServiceType = "Piano lessons", SubcategoryID = subcategories.Single(s => s.SubcategoryName == "Music").SubcategoryID }
                foreach (Service s in services)
                    var servicesInDB = context.Services.Where(t => t.Subcategory.SubcategoryID == s.SubcategoryID).SingleOrDefault();
                    if (servicesInDB == null)
                        context.Services.Add(s);
                context.SaveChanges();
            }

  • Align more than one element in same line in a selection screen

    I have to align more than one element
    in same line in a selection screen.
    It is possible with the following code.
    now the problem is i need space between these elements. how can i achieve it?
    SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT (8) txt1.
      PARAMETERS :      location AS CHECKBOX,
                  loc(5) TYPE c.
      SELECTION-SCREEN COMMENT (15) txt2.
      PARAMETERS :     dept AS CHECKBOX,
                  dpt(5) TYPE c.
      SELECTION-SCREEN COMMENT (7) txt3.
      PARAMETERS :  product AS CHECKBOX,
                   prdt(5) TYPE c.
      SELECTION-SCREEN END OF LINE.

    Hi,
    Use SELECTION-SCREEN POSITION option.
    ex: SELECTION-SCREEN POSITION 15.
    Sample code:
    selection-screen: begin of block blk1 with frame.
    selection-screen: begin of line.
    parameters: R1 RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN position 5.
    SELECTION-SCREEN COMMENT 6(5) comm1.
    parameters: R2 RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN position 14.
    SELECTION-SCREEN COMMENT 15(5) comm2.
    selection-screen: end of line.
    selection-screen: end of block blk1.
    initialization.
    comm1 = 'File1'.
    comm2 = 'File2'.
    Edited by: Velangini Showry Maria Kumar Bandanadham on May 27, 2008 2:54 PM

  • How to get one element of a database with database toolkit

    I am working with an access database in which I want to store information about all the computers that recide in a network. The information that I will store in this database is computer's IP address, computer name, etc. Now I want to look in my database the ip address of the computers and get the ip of every one as a string. What I'm trying to do is to convert the output variant of the block "get" to a two dimensional array for then convert it to a matrix in which I can get the elements one by one. Attached is the vi in which I'm working. If you can help me to figure out how to solve my problem I'll be very happy and if I am not in the indicated discussion forum please guide me to find the correct one.
    Attachments:
    Getting just one element.vi ‏11 KB

    Well I found this post that answered my question
    http://forums.ni.com/t5/LabVIEW/how-to-get-records​et-from-database/m-p/1471374?requireLogin=False

  • How to make 1D Array but with only one element filled in Real Time

    Hi folks,
    here I am with another question. I want to implement an prediction discrete state space observer which is going to run on a CRIO real time target. I am going to do it just like in the example which comes with LV.
    I have some questions regarding the input and outputs which in the example those are "dummy".
    My model is a SISO model, but the function "Construct SS model" returns parameters (A,B,C,D Matrices) as 2D arrays, so once you connect the cluster model into the Discrete Observer model, it takes y and u as 1D arrays despite of the fact that there is a SISO model.
    I realized that the function I am using in the simulations, uses 1D arrays but with only one element filled:
    Does anyone knows how to implement such 1D arrays in Real Time? I guess the way to do it is preallocating one array of zeros of size 1, and then recirculating it through some SR, and replacing the element with my real input and output, but at the dummy.vi, they are using a simple "build array"
    function.

    Ok, I did it that way. But I am facing another problem right now...
    At some point the Discrete Observer return a NAN array, you will see the code in the code snippet?
    I get rid of that component by component, but the observer gets "stuck" in it. So my Control law is zero... but the state stimate is NAN.
    Also I am attaching the VI.
    I do not know why, since in the simulation program all runs well. any thoughts? Maybe the internal numeric precision of the State Space Model?
    Attachments:
    RT - Pole Placement + Complete Observer.vi ‏40 KB

  • Show vertical scrollbar when 1D array only shows one element

    When showing only one element of one dimensional array, only the horizontal scrollbar can be displayed.  The vertical scrollbar visible option is greyed out.  Even using property nodes does not make it visible.  I have an array of clusters with many controls in each cluster that are aranged hozizontally across the front panel.  I'd like the user to see only one element (one set of controls) at a time and be able to scroll through them using a vertical scollbar.

    I think Brent's suggestion is very good.  Another hack would be to cover the additional array elements with a decoration so that you only see one element.
    Message Edited by vt92 on 04-21-2009 09:58 AM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    need to scroll.PNG ‏14 KB

  • Source Message in one element

    Hi,
    Can I copy the whole source XML into one element using the graphical mapping ??
    rgds,
    Amair

    Hi AMair,
    Dependent upon what you want to do next : you might read my issue on the forum about the same thing :
    RFC : How to pass an entire xml node to a string
    rgds
    Dirk

  • FCC: Receiver: Just one element filled -- create txt-File

    Hi everybody,
    we got a message-interface with just one element <content>texttexttexttext</content>
    We want to use FCC to create a text-File.
    How do the parameters have to look?
    regards Mario

    Hi,
    go through this blog and do FCC as per your data.
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    I think it will be better if you could send the exect data, which you are gona to create a text file by using Receiver FCC. There should be some separation in between the text, otherwise how u will decide the fieldSeparator in FCC.
    Regards,
    Sarvesh

  • Conditions for regions depending on more than one element

    Good morning,
    I've got an easy question: I want a region only to be shown, when elements (:P1_x, :P1_y, :P1_z) are null. this is no problem if showing region depends on only one element:
    "Der Wert des Elements in Ausdruck1 ist NOT NULL" --&gt; so Ausdruck1 is filled with: P1_x
    But how can I simplfy APEX, that showing region depends on more then only this one element . I tried with AND (P1_x and P1_y and P1_z) or with semikolon (P1_x; P1_y; P1_z), but it doesn't work.
    So how can I tell APEX more than only one condition for showing region?
    thank you...

    Bettina,
    Condition type of:
    PL/SQL Expression
    Expresion:
    :P1_ITEM1 IS NULL
    AND
    :P1_ITEM2 IS NULL
    AND
    :P1_ITEM3 IS NULL
    Does that solve your problem?
    Andy

  • Why is it so difficult to replace one element in an array?

    Maybe I am missing something but it seems overly complicated to replace one element in an array.
    I have a 3 Col 15 row array. Each column represents a board of IO and each row is a specic IO location on the board.
    I have 4 arrays each that vary in lenth that represent 4 different IO types (i.e. AO, DO, AI, DI). I want to people to write them one by one in order to allow a map to be stored as a constant. In that way if the end user decides to change some of the IO around on me it is easy.
    However I am not seeing an easy way to write to one specific element. Replace supset will only allow me to call out either row or column.. not both (this makes no sence to me).
    I hope someone can help.
    Thank you.

    You can certainly replace a single element in a 2D array and specify row and column. Attach the code you are having problems with.
    Attachments:
    Replace Element.PNG ‏2 KB

  • How to concat one element with 0..4 occurence?

    Hello! I need to concat occurences of one element to one element like this
    <a>
    <element>1</element>
    <element>2</element>
    <element>3</element>
    <element>4</element>
    </a>
    to:
    <b>
    <elementB>1234</elementB>
    </b>
    How can I do this? Occurence of element is 0..4
    Thanks!

    Hello! I have some errors while executing this UDF:
    Function Concat_city, Line 2:
    cannot find symbol symbol  : variable length location: class com.sap.aii.mapping.api.TransformationInput for(int a=0;a<input.length;a++){                    ^
    Function Concat_city, Line 3:
    array required, but com.sap.aii.mapping.api.TransformationInput found  sb = sb.append(input[a]);
    Note: /usr/sap/SPD/DVEBMGS22/j2ee/cluster/server0/./temp/classpath_resolver/Map8aa9d039226b11e1869e00000d43ca76/source/com/sap/xi/tf/_MM_Delvry_2_OrderImport_line_old_.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /usr/sap/SPD/DVEBMGS22/j2ee/cluster/server0/./temp/classpath_resolver/Map8aa9d039226b11e1869e00000d43ca76/source/com/sap/xi/tf/_MM_Delvry_2_OrderImport_line_old_.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors
    What does it means?
    Edited by: Andrey Bolshakov on Dec 9, 2011 2:44 PM
    Sorry, I forgot about input parameter
    Edited by: Andrey Bolshakov on Dec 9, 2011 2:49 PM

  • Why does one element get repositioned on PDF?

    When creating a PDF with "Use document bleed" setting on a certain document, one page of the resulting PDF continually shows just one element (page number, text, line, etc.) repositioned toward the center left edge of the document. Is this a corrupt document?  I have tried replacing all elements to no avail.  Without that bleed setting it generally exports correctly. The document is 80 pages, lots of overlapping images and transparency.

    Ok, I recommend you ask in the InDesign forum. Acrobat has no involvement in the Export PDF function.

Maybe you are looking for

  • Files/Clips from old iDVD image files

    I am an underwater photographer and I have a number of older projects that I created in FCP/iDVD. I have the iDVD image files, but not the original MOV files, as they were huge and were deleted to save space. I would like to create a compilation DVD

  • BEx Hierarchy Display

    In a report we are using orgunit hierarchy and we have another field in the report Manager name (manager of the orgunit).  Currently at the top level of the hierarchy all managers are displayed for every node under it. Example Level 1 Org 1----Manage

  • Coredump on using mtmalloc on Solaris 8

    Hi , We are trying to use mtmalloc with our application to compare the performance with other allocators. The tests go through fine on Solaris 9m, but coredumps immediately on Solaris 8 in a free call. Can you point out the differences in the mtmallo

  • Third party API within DC project

    Hi, We are using a JSF web project for online account management for CRM. We need to use a payment gateway API for which I have created a new external library DC project and a corresponding EAR. I am able to build the project successfully. It also re

  • There is a charge on my card for an app that I dont want because I already have the feature

    I purchased an App that is already on my Mac