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
gyubok
Posts: 520
Registered: ‎10-08-2009
My Device: Bold 9900
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?

Regular Contributor
paolorodriguez
Posts: 62
Registered: ‎11-27-2012
My Device: BlackBerry Bold 9900

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
gyubok
Posts: 520
Registered: ‎10-08-2009
My Device: Bold 9900

Re: Slider immediate value integer

Could you please give me some sort of example?

Developer
gyubok
Posts: 520
Registered: ‎10-08-2009
My Device: Bold 9900

Re: Slider immediate value integer

Nope, found. math.round()

Regular Contributor
paolorodriguez
Posts: 62
Registered: ‎11-27-2012
My Device: BlackBerry Bold 9900

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