Formatting numbers

Discuss any general programming issues here
Post Reply
User avatar
r-tea
Posts: 123
Joined: Tue Feb 16, 2016 11:48 pm
Location: Zdzieszowice, Poland
Contact:

Formatting numbers

Post by r-tea » Sun Aug 13, 2017 12:38 am

In my xml code of MUI interface, I have something like this:

Code: Select all

<slider id="sl_hour" min="0" max="23" format="%02d"/><
The format of %02d means there will be two digits decimal number
including a preceding zero, if needed.
My question is how to obtain the same in .hws?

peceha
Posts: 111
Joined: Tue Dec 13, 2016 8:39 am
Location: Poland

Re: Formatting numbers

Post by peceha » Sun Aug 13, 2017 12:43 pm

maybe this:

Code: Select all

min=4
min=FormatStr("%02d", min)

User avatar
r-tea
Posts: 123
Joined: Tue Feb 16, 2016 11:48 pm
Location: Zdzieszowice, Poland
Contact:

Re: Formatting numbers

Post by r-tea » Sun Aug 13, 2017 1:15 pm

Thanks!! It works :-)

Post Reply