Question: I am using Drupal 7 with civicrm 4.5. I want to display the civi contact fields in drupal registration and profile forms. I used the civicrm profile to display the first name and last name fields. But i don't know how to integrate the address, phone and email fields same as civi in drupal(For ex for address with [b]Another address[/b] and [b]Location type[/b] selection boxes street address,Add link,Delete etc). Using civicrm profile i could be able to configure Home street address etc as a individual ones. But i want as a grouped one how civi is displaying. Is there any module available for this? Any help is highly appreciated. Thanks in advance

Answer: 
Use `ListView`'s [isCurrentItem](http://qt-project.org/doc/qt-5/qml-qtquick-listview.html#isCurrentItem-prop) attached property:

```
Text {
    id: menuitem_text

    anchors {
        left: menuitem_icon_start.right
        verticalCenter: parent.verticalCenter
        verticalCenterOffset: -2
        leftMargin: 20
    }

    color: itemDelegate.ListView.isCurrentItem ? "red" : skin.gray
    font {
        family: "TBD"
    }
}

```

Note that you have to give your root delegate item an ID in order to qualify the expression above:

```
Item {
    id: itemDelegate

    RowLayout {
        // ...
    }
    // ...
}

```

You can see the same approach used in the example I linked to.
From your example: 

`color: skin.gray` is used for the Text element which will change the color of the text and not it's background viz. i understood you want.

You can use a Rectangle element here which can act as a background component to set the background color.
So instead of Item root element in the delegate you can use Rectangle. So MenuBodyItem.qml will look as

```
Rectangle {

    width: 100
    height: 50
    ...
}

```

Now to set background color to the Rectangle if it is current one you can use `ListView.isCurrentItem` to check.
So,

```
Rectangle {
    color: ListView.isCurrentItem ? "cyan" : "lightblue"
    width: 100
    height: 50
}

```

and now finally you will have to set the clicked item as the current one which can be done in the MouseArea of the Delegate Item

```
delegate: MenuBodyItem {
    width: menuBody_listview.width
    anchors.horizontalCenter: parent.horizontalCenter
    iconLeft: itemIconLeft
    message: itemText
    iconRight: itemIconRight
    MouseArea {
        anchors.fill: parent
        onClicked: menuBody_listview.currentIndex = index
    }
}

```