CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: UpDown Control

  1. #1
    Join Date
    Aug 1999
    Location
    Edinburgh, Scotland
    Posts
    10

    UpDown Control

    Is there a way of using the UpDown control to change the value displayed in a text field by a non-integer value (say 0.1). If not, is there another control I could use to do this?


  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: UpDown Control

    Dont hook the text box as a Buddy control. Instead code the DownClick/Upclick events of Updown control to change the value by what ever amount you want

    Const fIncrAmnt = 0.1
    private Sub UpDown1_DownClick()
    text1.text = str(val(text1.text) - fIncrAmnt)
    End Sub
    private Sub UpDown1_UpClick()
    text1.text = str(val(text1.text) + fIncrAmnt)
    End Sub




    RK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured