Specific text of color in the listview element

Hello

I have in my application:

  ListView {
        id: myListViewAya

        dataModel: dataModelAya

        listItemComponents: [

        ListItemComponent {
                type: "item"
                id: listItemComponent_Aya
           Container {
              // background: Color.create("#75b5d3")
               Label {
                   id:label_Aya
                   text: ListItemData.id
                   textStyle.color: Color.Blue
               }
            }// end of Container
        } // end of ListItemComponent 

        ] // end of listItemComponents list
}end of ListView 

I want the text 'label_Aya' (the second element in the listview) and all other elements of color in 'red '.

Blue

Please help me

Thank you very much

as it works well:

  ListView {
        id: myListViewAya

        dataModel: dataModelAya

        listItemComponents: [

        ListItemComponent {
                type: "item"
           Container {
            id: listItemComponent_Aya
              // background: Color.create("#75b5d3")
               Label {
                   id:label_Aya
                   text: ListItemData.id
            textStyle.color:(listItemComponent_Aya.ListItem.indexPath[1] == 1) ? Color.Red : Color.Blue
               }
            }// end of Container
        } // end of ListItemComponent 

        ] // end of listItemComponents list
}end of ListView

Thank you thank you thank you...

Tags: BlackBerry Developers

Similar Questions

  • layer of the static objects/text on top of the interactive elements

    is it possible to static objects/text on top of the interactive elements (including the scrolling slideshows or MSO) layer in INDD CC for DPS/Content Viewer?  Static objects (on their own layer) disappear when read on tablet in Content Viewer

    N ° so-called overlays for a reason.

    You must convert any static object on an interactive object to stack on top. You can do this by converting a MSO and setting to play once with no delay and no fade chained.

  • Change of FG and background color of the individual elements in the array

    Is it possible to change the color of foreground and background of the individual elements of the array?

    According to the the link below it is not.  But that was 4 years ago and I wonder if it's possible with the new version of Labview.

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=125484&query.ID=927250#M125484

    I could not find a way to do it using Labview 8.2.1.

    Thank you

    Adam

    No, you can't.  The tables have to share almost everything except the real value of the data.  As mentioned, you can use a second indicator to indicate your values of interest.  If you just want to change the background color, you can make a table of squares of color which lies behind the numbers array.  Make the background of the numbers (and the transparent table container.  You can do it 'look' as the BG of the numbers is changing.  The FG Color is not as easy.

    A (maybe better) alternative is to use a table or a listbox control to display your table.  They allow you to change the colors of the cells.  You will need to convert your table to an array of strings.  If your table is small, the hit on the treatment will be not significant.  But if you have REALLY large picture, you'll notice put worn times on day of the table/list box.

  • Spark TextInput text highlight color (or the manufacturing of spark and mx components alike)

    I use a mixture of spark and mx components. Really, I use only the spark, but I need dateField components too, and these are just the spark. The question that I have is to have a common look between components and this isn't quite the case when it comes to highlight the text in a textInput (DateField, NumericStepper or or ComboBox, etc.). Default components to blacks and nail fonts sparks bluish. Default MX black on white to white on black to selected and unselected.

    I looked around for hours and sort of up to mx look like spark, even if I like the spark look much better (although that would like to hear if something new has come with flex 4 for this). I assumed that at least making resemble spark mx would be easy. But is it?

    I know how to change the color for the highlight (i.e. the substantive part) using focusedTextSelectionColor. What I can't find is the same for fonts, i.e. something like focusedSelectedFontColor. But I don't know that there is. It must, right?

    Anyway, would love the pointers that you can save.

    Thank you!

    f

    You can use FTEText in MX components.  You can use the mock datefield

    my blog

    --

    Alex Harui

    Flex SDK Team

    Adobe System, Inc..

    http://blogs.Adobe.com/aharui

  • How to change the color of the same element in different layers?

    How to:

    Hello! I'm new to Photoshop. I try to have 4-5 layers of the same item, but in different colors. I can't find how to 'fix' these layers so they don't change all at the same time when I use a tool to change the color. Thanks for your help!

    If that's what you have in mind:

    Fig 2. Dupe of image and create a mask so that when you change the color of the object, the preponderance of the image remains unchanged.

    Then, change the color

    Fig. 3. Dupe of the layer, disable the bottom layer (for easy reference layer) and change the color (note the eye in the layers panel)

    Fig 4. Repeat steps.

    By turning layers on and off you will see their effect.

    When you're done, check out a feature called layers. It allows you to sequence through versions with a single click.

  • API for open action for the listview element menu.

    Hello!

    Is there an API to open the action menu with elements of action for CustomListItem?

    A possible solution is to create a custom menu like ActionMenu standard with managers and signals defined by the user.

    Anybody know standard way?

    There is no way to open ContectMenu programmatically, but one of the solutions to use the selection of the element (with listview onTriggered slot) and ActionMenu.

  • need to search for files with specific text and words using the mac finder

    I find the text in PDF files but not lot of files using the finder?

    Thank you, very much appreciated. I didn't have these utilities. Yet, it is difficult for me to understand why Illustrator is so highly regarded when there a failure, once upon a time it does not have this deficiency. I am disappointed.

  • Color of the DataGrid element

    Greetings...

    I'm looking to dynamically change the color of a line datagrid item based on a State of data in my data behind the data grid provider. If I have a folder that has a "ErrCode" > 0, I want only the point to have a red background color. Is - this porrible?

    Thank you!
    -Rich

    Read this:

    http://www.CFLEX.NET/showFileDetails.cfm?ObjectID=487&object=file&channelId=1

    I have problems running it, but I think it's because I don't have the latest version of Flash Player.

    I don't see where I can get the source.

    Tracy

  • How to use the Listview element and list in Adf

    Hello

    Can someone explain how to use list view and tags to list items in adf to display the data in the table.


    Concerning
    Suresh

    On the error, check your log window, if no content appears then it suggests that an error occurs.

    I built it by hand.

    CM.

  • How to change the color of the elements of cluster using the reference

    Hello

    I have cluster with 10 LEDS, each LED represents a test within my program, based on success or failure, I want to change the color of each LED, I use the cluster as input reference to test subvi.

    Is there a method to change the color of the induvidual elements?

    Thanks in advance.

    Can be used with any wire Ref properties are determined by the class of the wire Ref itself.

    Generic refs are geneirc properties.

    The FTA to obtain the properties of the elements within the cluster, you will need to tell LV class is a cluster. The same for the items in the cluster.

    Please consider this nugget on the help of control references. Don't worry about understanding everytihing that I wrote in this nugget, since it was written to be entertaining at all levels. Find the section where I show

    How to cast Ref nums as of specific types.

    Ben

  • Using ListView with ArrayDataModel displays only the first element in each QVariantMap within the matrix

    I have this QML who have a ListView with datasource to a full ArrayDataModel from the CPP file for creationcompleted, I loop in the table to add the hour together to appear as a label on the page, what works. However, when I want to view these items in the list, it will display only the first element of the QVariantMap within the table, no error on the log of the device. Also, triggered more does not work, but when I click it, it will have a blue border surrounding it, but the onTriggered does not fire.

    Here is an excerpt of the CPP on the table fill

    This-> eventsModel = new ArrayDataModel();

    QVariantMap event;

    event ['EventName'] = "Event1";

    event ["EventHour"] = "00";

    event ["EventMinute"] = "01";

    event ["EventSecond"] = '02 ";

    QML-> setContextProperty ("eventsModel", it-> eventsModel);

    Here's the QML

    {Of container

    ID: eventListContainer

    {To ListView

    ID: eventList

    dataModel: eventsModel

    Use a ListItemComponent to customize the appearance of the list view

    listItemComponents:]

    {ListItemComponent}

    type: 'point '.

    {StandardListItem}

    Title: 'Event' + ListItemData.EventName;

    Description: "time:" + ListItemData.EventHour + ":" + ListItemData.EventMinute + ":" + ListItemData.EventSecond; "»

    }

    }

    ]

    onTriggered: {}

    var selectedEvent = dataModel.data (row);

    var eventDetailPage = eventDetailDefinition.createObject ();

    eventDetailPage.txtEventName.text = selectedEvent ['EventName'];

    eventDetailPage.pickEventTime.value = picker.dateFromTime(selectedEvent["EventHour"]+":"+selectedEvent["EventMinute"]+":"+selectedEvent["EventSecond"]);

    eventDetailPage.open ();

    }

    }

    Any help would be appreciated.

    Thank you.

    ListView determines ItemType of the element by calling the function itemType of the dataModel. By default, an ArrayDataModel returns an empty string for this call (see https://developer.blackberry.com/cascades/reference/bb__cascades__arraydatamodel.html).

    This leaves you with a few options:

    (1) If you have no header and all the elements are the same, you can make

    ListItemComponent {
         type: ""
         ...
    

    (2) If you have headers or different elements, you can extend ArrayDataModel and implement your own function of itemType

    (3) you can define a function of ItemType on your ListView in QML. Documentation:

    ListView called DataModel::itemType() for each item in order to know the type. QML, this can be overridden by declaring the itemType function (data, row) on the ListView element. ListView then call this function instead of the function DataModel.

    Here's how to create a list in QML which creates a header for all items on the high level and aStandardListItem for each item below the top level:

  • How to choose the same color in the text and objects?

    Hello

    I have a document with about 30000 objects include text, small filled circles and paths between the circles (see small screenshot attached).

    Capture.PNG

    I need to separate into groups based on color in order to later completely redraw. I would like to be able to select all elements with the same color but the problem being that the railways have only line-color, the only circles fill color and text only-color of the text. I can't seem to find the correct command in "identical". Any ideas of how I could do?

    Thank you very much!

    PER DAY

    more precisely what you're asking is done in the following way:
    Since you have only 3 types of select:
    First set up your magic wand by double-clicking on it in the tools Panel and configure it to contours and funds, also you can bump the tolerance up to about 75. now select your text object , and then use select even--> fill color, this should get your filled objects also, then with the magic wand tool, shift click the same traits in the selection of color and you should have all 3.  Now put it in the layer that you want, save the selection, there are other more obscure options.

    However if you just divide it into groups... try this:

    go to your layers panel and make a layer for each color

    use the same for each type.  for example, select same line color for all similar objects outline color, and then drag the color "block" in the layers panel to the appropriate layer.  Repeat for every thing.

    Finally, if you just want to change the colors on the fly, for something so huge, try edit--> edit color--> work Recolor

    Just play with it, you will see only a few colors, double click on the box, the arrow worms with color in it and (with illustrations to redefine colors in the verified corner) you will see change as you select the new color., in

    I am interested in the most direct way, if anyone knows, something which would, in one stroke, select objects containing color wherever it is.

  • Dreamweaver CC: How to change the color of the selected text

    Maybe a stupid question, but I can't seem to figure it out, even with searches on the web.  I want to change the color of a single word in my HTML document.  Can anyone offer advice?

    I can change some styles of the selected text (bold, italic, etc.), but do not understand the color.

    Also, I know how to change the color of the different elements using CSS.  But for the selected text in an element, CSS here the simplest solution?

    Thanks in advance.

    carlg79335635 wrote:

    Thank you for that.  But I don't have a color option in my menu format.  It ends at some CSS Styles.  I have to allow him anywhere?  I use Dreamweaver CC.

    Yes.  I checked it and in CC DW, there is not a way to do as I suggested previously.  I was watching DW CS6 and he got it.

    Looks like you'll need to teach how them to manually code.  This will make them think about what they are doing and so concentrate better.

  • Change the color of the text in a layer

    I created the link for each text element in a layer window. When the visitor clicks on the line of text, a picture of the popup element. When the visitor back to the list, the selected text has changed color. The text remains of same color, even when the visitor leaves. What should I do please, so that the color changes to the color of origin at the end of the page? I saw 'help' on "Attach a behavious in the text", which shows how to change the color to black. What would you say to other colors?

    It is a message with multiple parts in MIME format.

    -= _NextPart_000_0063_01C8512D.94179210
    Content-Type: text/plain;
    charset = "iso-8859-1".
    Content-Transfer-Encoding: City-printable

    Looks like you just need to put you a: link and a: visited color the =
    even in your statements CSS, if you want them to be the same after the =
    link is different if you want different or selected. It =
    Help?

    Best - Joe

    Joseph Lowery
    Vice President of Marketing, WebAssist
    Author of the Bible of Dreamweaver CS3

    "Karlhevera" wrote in message =
    News:fltnsj$88h$1@forums. Macromedia.com...
    > I've created link for each text element in a layer window. When the =
    visitor = 20
    > click on the line of text, a picture of the popup element. When the =
    visitor = 20
    > back to the list, the selected text changes color. Text =
    rest of same = 20
    > color even when the visitor leaves. What should I do please, so =
    which the = 20
    > changes color to the color of origin at the end of the page? I have =
    VU = 20
    > 'help' on "attach a behavious in the text", which shows how to change =.
    color = 20
    > black. What about other colors? = 20
    >
    -= _NextPart_000_0063_01C8512D.94179210
    Content-Type: text/html;
    charset = "iso-8859-1".
    Content-Transfer-Encoding: City-printable




    charset = 3Diso-8859-1 ">"




    Looks like you just need to =
    you are a: link and = 20
    a: visited in your colors CSS declarations, if you want =.
    them = 20
    even when you have selected the link or different if you want =
    different. = 20
    Who help me?


    Best - Joe

     

    Joseph Lowery
    Vice President of =
    Marketing,<>
    href = 3D" http://www.webassist.com" > WebAssist "
    Author of<>
    href = 3D" http://www.idest.com/dreamweaver/" > Dreamweaver CS3 = "
    Bible

     

    "Karlhevera" <<>
    href = 3D "mailto:[email protected]" >
    size = 3D 2 > [email protected]
    size = 3D 2 > > wrote = 20
    in the message
    href = 3D "news:[email protected]" ><>
    face = 3DArial =
    size = 3D 2 > news:[email protected]<>
    face = 3DArial size = 3 2 >...
    > I =
    created = 20
    link to each piece of text in a layer window. When the visitor
    > =.
    Click on on = 20
    the line of text, a picture of the popup element.  When the visitor =

    > = 20
    back to the list, the selected text changes color.  Text =
    rest of = 20
    even
    > color even when the visitor leaves.  How I have =
    do = 20
    Please, so that the
    > changes color to the original color on =.
    = Exit 20
    the page?  I've seen
    > 'help' on "attach a =
    behavious to = 20
    text ", which shows how to change the color
    > black. How about you =
    to = 20
    other colors?
    >

    -_NextPart_000_0063_01C8512D.94179210 =-

  • Change the color of the text on the button click

    Hi, how I would change the text with color while the application is running?

    For example, when the user clicks a button, how can I change the color of the editfield with already inserted text?

    I realize that I could add the editifled with different colors, but I was wondering if there is a way to do this without adding new editfield - like refreshing the editfield with different text color.

    Help is very appreciated!

    First, create your own custom class that extends EditField.

    It can be as simple as this:

    public class MyEditField extends EditField {
      private int _color = Color.BLACK;
    
      public void setFontColor(int color) {
        _color = color;
        invalidate();
      }
    
      protected void paint(Graphics g) {
        int prevColor = g.getColor();
        g.setColor(_color);
        super.paint(g);
        g.setColor(prevColor);
      }
    }
    

    Once you have this class, you can use it like this:

    final MyEditField textEntryArea = new MyEditField(...); // any EditField constructor can be used
    
    ...
    FieldChangeListener buttonListener = new FieldChangeListener() {
      public void fieldChanged(Field field, int context) {
        if (field == setToRedButton) {
          textEntryArea.setFontColor(Color.RED);
        } else if (field == setToBlueButton) {
          textEntryArea.setFontColor(Color.BLUE);
        }
        // etc.
      }
    };
    ...
    setToRedButton.setChangeListener(buttonListener);
    setToBlueButton.setChangeListener(buttonListener);
    ...
    

    Edit: fixed a few typos.

Maybe you are looking for