qml - Saving the text to label from textfield blackberry -


i want display entered text label. here's code qml:

 container {                         horizontalalignment: horizontalalignment.center                         verticalalignment: verticalalignment.top                         toppadding: 100                         leftpadding: 50                         rightpadding: leftpadding                          /*textarea {                             id: tacomment                             preferredheight: 270                             editable: quotebubble.editmode                             enabled: enablesave                             input.flags: textinputflag.spellcheckoff                         }*/                            label {                                verticalalignment: verticalalignment.top                                horizontalalignment: horizontalalignment.center                                text: cppobj.desc                            }                     }                       container {                         horizontalalignment: horizontalalignment.center                         verticalalignment: verticalalignment.bottom                         leftpadding: 50                         rightpadding: leftpadding                         bottompadding: 40                          textfield {                             id: tfcomment                             hinttext: qstr("add comment")                             inputmode: textfieldinputmode.text                             input {                                 submitkey: submitkey.submit                                 onsubmitted: {                                     cppobj.oncommentsubmitclicked(tfcomment.text, "");                                 }                             }                         }                     }                 } 

so when user enters phrase first textfield, want phrase display in label below it. more text messaging. how do that? , after displaying entered text textfield label want save label's text, when enter new comment it'll saved other label

add id label following

 label {     id: label     ....  } 

then on textfield on submit handler, can text textfield , set label, below

 onsubmitted: {     label.text = tfcomment.text;  } 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -