Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Mulligan

Decimal points in edit boxes

This topic is 5834 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an UpDown control in an editbox. I want it to initially start at 0.0 and go up to 1.0 in increments of 0.1 How do i do this? I can only get it to do intergers.

Share this post


Link to post
Share on other sites
Advertisement
Have declared the number as a float?

I think this will be moved to the beginners forum.

Share this post


Link to post
Share on other sites
Spinner controls don''t work with floats. You have to roll your own.

Check out these sites:
codeguru.com
codeproject.com

Share this post


Link to post
Share on other sites
Hi

the easiest way is to have one integer variable (say i)that you increase/decrease with the UpDown Control, and then just use 0.1 * i as the value for the text box.

------------
Runicsoft

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!