Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Regular Contributor
wibi_okezone
Posts: 51
Registered: ‎04-24-2013
My Device: Z10

Change Element of Custom Listview

I have custom listview (ex: CustomList.qml) and it works, . 

But when i change or click menu to show listview (the same listview: CustomList.qml) with other data and samo of element i need to change i got the problems. The problem is not how to show the data, but how to change the element of CustomList.qml

 

Like:

 

This is a triggered action to change the menu and change element of cuctom listview:

onTriggered: {
  /* this how i change the property of element */
   var changeControl = changeList.createObject();
   changeControl.widthLabel = 80
}

 Then the attached objects:

attachedObjects:[
   ComponentDefinition {
      id: changeLineList
      source: "CustomList.qml"
    }
]

 and this is my CustomList.qml:

Container{
  property alias witdhLabel : myLabel.preferredWidth
  Label{
   id: myLabel
  }
}

 

Then i run this apps there are not change.

How to do this ??

 

Please use plain text.