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
Developer
Posts: 660
Registered: ‎10-08-2009
My Device: Bold 9900
My Carrier: Telus
Accepted Solution

Slider immediate value integer

Hi, I have a slider on my page and would like to display the selected value onto a labelfield

 

However, it is currently displaying float value. How can I display it in integer?

----------------------------------------------------------
Twitter: @gyubok
Highlighted
Regular Contributor
Posts: 62
Registered: ‎11-27-2012
My Device: BlackBerry Bold 9900
My Carrier: GlaDOS

Re: Slider immediate value integer

Hi Gyubok.

You'd want to round the value you are retrieving from the slider first. After rounding, that's when you'd want to update the LabelField with the (now integer) value.

Like all my posts, and mark them as the solution if it solved your problem.


My Website: Paolo Rodriguez

Developer
Posts: 660
Registered: ‎10-08-2009
My Device: Bold 9900
My Carrier: Telus

Re: Slider immediate value integer

Could you please give me some sort of example?

----------------------------------------------------------
Twitter: @gyubok
Developer
Posts: 660
Registered: ‎10-08-2009
My Device: Bold 9900
My Carrier: Telus

Re: Slider immediate value integer

Nope, found. math.round()

----------------------------------------------------------
Twitter: @gyubok
Regular Contributor
Posts: 62
Registered: ‎11-27-2012
My Device: BlackBerry Bold 9900
My Carrier: GlaDOS

Re: Slider immediate value integer

Glad I could help!

Like all my posts, and mark them as the solution if it solved your problem.


My Website: Paolo Rodriguez