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
New Developer
Posts: 41
Registered: ‎02-11-2010
My Device: Bold 9000
My Carrier: AT&T

Append number id to custom control

I'm working on a GPA calculator and I'm trying to have a custom control add additional courses to consider for the final GPA. currently I have six of these drop down controls.

 

DropDown {
                        id: letterGrade1
                        enabled: true
                        Option {
                            text: "A+"
                            value: 4
                        }
                        Option {
                            text: "A"
                            value: 4
                        }
                        Option {
                            text: "A-"
                            value: 3.67
                        }
                        Option {
                            text: "B+"
                            value: 3.33
                        }
                        Option {
                            text: "B"
                            value: 3
                        }
                        Option {
                            text: "B-"
                            value: 2.67
                        }
                        Option {
                            text: "C+"
                            value: 2.33
                        }
                        Option {
                            text: "C"
                            value: 2
                        }
                        Option {
                            text: "C-"
                            value: 1.67
                        }
                        Option {
                            text: "D+"
                            value: 1.33
                        }
                        Option {
                            text: "D"
                            value: 1
                        }
                        Option {
                            text: "F"
                            value: 0
                        }
                    }

 however, I'd like to create a function that will incrementally add a number to the ID name. in this case so that I can have

 

"letterGrade1, letterGrade2 letterGrade3, etc."

 

any ideas how I can do this with cascades? or do I have to go C++ with this?

Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: Append number id to custom control

qobjet  setProperty

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook