Results 1 to 7 of 7

Thread: masked edit textbox ?

  1. #1
    Guest
    is there a way to clear the previous contents
    of this control?

    along the same lines as with a textbox:

    Code:
    text1.text = vbnullstring

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Do you mean:
    Code:
    Text1.Text = ""
    ???

  3. #3
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    India
    Posts
    298

    MaskEdBox1.Text = ""

    is this what u wanted?

  4. #4
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Try this:

    Dim Temp As String
    Temp = MaskEd.Mask
    MaskEd.Mask = ""
    MaskEd.Text = ""
    MaskEd.Mask = Temp

    I use that a lot for mask edit boxes.

    Or you could use a custom written control.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  5. #5
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    what exactly do you want to do?

  6. #6
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    'let's say we have 4 maskedboxes using currency masks
    'we can clear them this way.
    
    Public Sub ClearAllMskEdits()
    
        For intIncrement = 0 To Forms.Count - 1
           For Each ctlMyControl In Forms(intIncrement).Controls
    '
        If TypeOf ctlMyControl Is MaskEdBox Then
    'set the mask to nothing and then set the text to nothing
                ctlMyControl.Mask = ""
                ctlMyControl.Text = ""
    'After clearing, you need to reset the mask to whatever it was
    'for this example I will say it is ###.00
                ctlMyControl.Mask = "###.00"
    '
       End If
    '
            Next ctlMyControl
    '
                Next intIncrement
    '
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  7. #7
    Guest
    thanks everyone for the help,

    this was exactly what i was looking for,
    it works

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