← Back to team overview

ubuntu-phone team mailing list archive

Re: [design] What component should I use?

 

Hi Sam,

>From a developer's point of view, you can use Lable or a ListView with
ListItem.Standard. If you are using Lable, add a MouseArea{} to the Label
which will then fire signals such as onClicked{}, onPressed{} etc etc where
you can define what needs to happen. For example,

Label {
 text: "Sample Text"
 MouseArea {
    anchors.fill: parent
    onClicked: console.log("Someone clicked Sample Text")
 }
}


Hope this helps.

Cheers,
Nik


On Sat, Dec 7, 2013 at 2:01 PM, Sam Bull <sam.hacking@xxxxxxxx> wrote:

> Please see the screenshot at http://sambull.org/screenshot.png
>
> You can see where I've started typing, and below that is a list of
> autocomplete suggestions ('Yorba' in the screenshot). In order for these
> selections to be clickable, what component would be recommended?
>
> Label doesn't seem to allow clicks. ListItem.Standard doesn't seem to
> appear at all. Any suggestions?
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help   : https://help.launchpad.net/ListHelp
>
>

References