Results 1 to 4 of 4

Thread: Couple of NumericUpDown control questions

  1. #1

    Thread Starter
    PowerPoster SuperSparks's Avatar
    Join Date
    May 2003
    Location
    London, England
    Posts
    265

    Couple of NumericUpDown control questions

    I've got some NumericUpDown controls on my form, with a Maxvalue property of 255. However a user can type any number into the box, presumably up to 32000 characters in length. It doesn't break the app, because it just reverts to 255 as soon as you tab out of the box. I'd really rather limit the number of digits to 3, but I can't find a Maxlength property for it. Is this normal behaviour for NumericUpDown's, or am I missing something?

    Also, they are defying all attempts at getting tooltips to work, although tooltips are fine for the other controls on the form
    Nick.

  2. #2
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045
    Super -

    On a whim, I tried the following and it works great! Use it as the foundation for what you want to do - get the length of the text string.

    Code:
        Private Sub NumericUpDown1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles NumericUpDown1.KeyUp
            Dim tempstr As String
            tempstr = NumericUpDown1.Text
            MsgBox("TEST " & tempstr)
        End Sub
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

  3. #3

    Thread Starter
    PowerPoster SuperSparks's Avatar
    Join Date
    May 2003
    Location
    London, England
    Posts
    265
    Yeah, I could make that work, thanks Webtest

    Any ideas on why Tooltips don't work, people?
    Nick.

  4. #4
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045
    Super -

    For what its worth, I can't get tool tips to work with a numeric up-down either (very primitive test panel). You might restart this thread with a new title which includes "tool tips".
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

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