|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help Clearing data in MaskEditBox ControlI'm trying to clear text from a MaskEditBox control.
I thought the format to delete it was: 'clear the mask mskName.Mask = "" 'clear the text mskName.Text = "" 'reassign the mask mskName.Mask = "##:## ??" this doesn't seem to work... what am I doing wrong? Thanks. I don't think you need to clear the mask, you should be able to just
use mskName.Text = "" Thanks, Seth Rowe jamesburk***@gmail.com wrote: Show quoteHide quote > I'm trying to clear text from a MaskEditBox control. > > I thought the format to delete it was: > > 'clear the mask > mskName.Mask = "" > 'clear the text > mskName.Text = "" > 'reassign the mask > mskName.Mask = "##:## ??" > > > this doesn't seem to work... what am I doing wrong? Thanks. Yeah, that didn't work either... actually... on all of my masked edit
boxes, it isn't recognizing the .text property as anything other than "". Any ideas there? Thanks! rowe_newsgroups wrote: Show quoteHide quote > I don't think you need to clear the mask, you should be able to just > use > mskName.Text = "" > > Thanks, > > Seth Rowe > > jamesburk***@gmail.com wrote: > > I'm trying to clear text from a MaskEditBox control. > > > > I thought the format to delete it was: > > > > 'clear the mask > > mskName.Mask = "" > > 'clear the text > > mskName.Text = "" > > 'reassign the mask > > mskName.Mask = "##:## ??" > > > > > > this doesn't seem to work... what am I doing wrong? Thanks. Does it throw an error when you try to set the .Text property? Also,
have you tried stepping through the code to make sure that nothing is interfering? Thanks, Seth James wrote: Show quoteHide quote > Yeah, that didn't work either... actually... on all of my masked edit > boxes, it isn't recognizing the .text property as anything other than > "". Any ideas there? Thanks! > rowe_newsgroups wrote: > > I don't think you need to clear the mask, you should be able to just > > use > > mskName.Text = "" > > > > Thanks, > > > > Seth Rowe > > > > jamesburk***@gmail.com wrote: > > > I'm trying to clear text from a MaskEditBox control. > > > > > > I thought the format to delete it was: > > > > > > 'clear the mask > > > mskName.Mask = "" > > > 'clear the text > > > mskName.Text = "" > > > 'reassign the mask > > > mskName.Mask = "##:## ??" > > > > > > > > > this doesn't seem to work... what am I doing wrong? Thanks. I've stepped through about 15 times.... I can't figure it out, but I'm
gonna go into my professor today. Tahnks for the help though. rowe_newsgroups wrote: Show quoteHide quote > Does it throw an error when you try to set the .Text property? Also, > have you tried stepping through the code to make sure that nothing is > interfering? > > Thanks, > > Seth > > James wrote: > > Yeah, that didn't work either... actually... on all of my masked edit > > boxes, it isn't recognizing the .text property as anything other than > > "". Any ideas there? Thanks! > > rowe_newsgroups wrote: > > > I don't think you need to clear the mask, you should be able to just > > > use > > > mskName.Text = "" > > > > > > Thanks, > > > > > > Seth Rowe > > > > > > jamesburk***@gmail.com wrote: > > > > I'm trying to clear text from a MaskEditBox control. > > > > > > > > I thought the format to delete it was: > > > > > > > > 'clear the mask > > > > mskName.Mask = "" > > > > 'clear the text > > > > mskName.Text = "" > > > > 'reassign the mask > > > > mskName.Mask = "##:## ??" > > > > > > > > > > > > this doesn't seem to work... what am I doing wrong? Thanks. Let me know what you find out, it's got me curious.
Thanks, Seth James wrote: Show quoteHide quote > I've stepped through about 15 times.... I can't figure it out, but I'm > gonna go into my professor today. Tahnks for the help though. > > > rowe_newsgroups wrote: > > Does it throw an error when you try to set the .Text property? Also, > > have you tried stepping through the code to make sure that nothing is > > interfering? > > > > Thanks, > > > > Seth > > > > James wrote: > > > Yeah, that didn't work either... actually... on all of my masked edit > > > boxes, it isn't recognizing the .text property as anything other than > > > "". Any ideas there? Thanks! > > > rowe_newsgroups wrote: > > > > I don't think you need to clear the mask, you should be able to just > > > > use > > > > mskName.Text = "" > > > > > > > > Thanks, > > > > > > > > Seth Rowe > > > > > > > > jamesburk***@gmail.com wrote: > > > > > I'm trying to clear text from a MaskEditBox control. > > > > > > > > > > I thought the format to delete it was: > > > > > > > > > > 'clear the mask > > > > > mskName.Mask = "" > > > > > 'clear the text > > > > > mskName.Text = "" > > > > > 'reassign the mask > > > > > mskName.Mask = "##:## ??" > > > > > > > > > > > > > > > this doesn't seem to work... what am I doing wrong? Thanks. ok, i've got an update....
to clear the mskeditbox you have to: mskName.Mask = " " 'there must be a space mskName.Text = " " mskName.Mask = "#####" but it's weird because it still doesn't register the mask.text to have anything in it.... anyone have any ideas? Thanks. rowe_newsgroups wrote: Show quoteHide quote > Let me know what you find out, it's got me curious. > > Thanks, > > Seth > > James wrote: > > I've stepped through about 15 times.... I can't figure it out, but I'm > > gonna go into my professor today. Tahnks for the help though. > > > > > > rowe_newsgroups wrote: > > > Does it throw an error when you try to set the .Text property? Also, > > > have you tried stepping through the code to make sure that nothing is > > > interfering? > > > > > > Thanks, > > > > > > Seth > > > > > > James wrote: > > > > Yeah, that didn't work either... actually... on all of my masked edit > > > > boxes, it isn't recognizing the .text property as anything other than > > > > "". Any ideas there? Thanks! > > > > rowe_newsgroups wrote: > > > > > I don't think you need to clear the mask, you should be able to just > > > > > use > > > > > mskName.Text = "" > > > > > > > > > > Thanks, > > > > > > > > > > Seth Rowe > > > > > > > > > > jamesburk***@gmail.com wrote: > > > > > > I'm trying to clear text from a MaskEditBox control. > > > > > > > > > > > > I thought the format to delete it was: > > > > > > > > > > > > 'clear the mask > > > > > > mskName.Mask = "" > > > > > > 'clear the text > > > > > > mskName.Text = "" > > > > > > 'reassign the mask > > > > > > mskName.Mask = "##:## ??" > > > > > > > > > > > > > > > > > > this doesn't seem to work... what am I doing wrong? Thanks. and I figured the rest out... ok
the .text property is not recognized by the mskeditbox so you must use the .seltext but you must follow this format: mskZip.SelStart = 0 mskZip.SelLength = Len(mskZip.Mask) strZip = mskZip.SelText James wrote: Show quoteHide quote > ok, i've got an update.... > > to clear the mskeditbox you have to: > mskName.Mask = " " > 'there must be a space > mskName.Text = " " > mskName.Mask = "#####" > > but it's weird because it still doesn't register the mask.text to have > anything in it.... anyone have any ideas? Thanks. > > rowe_newsgroups wrote: > > Let me know what you find out, it's got me curious. > > > > Thanks, > > > > Seth > > > > James wrote: > > > I've stepped through about 15 times.... I can't figure it out, but I'm > > > gonna go into my professor today. Tahnks for the help though. > > > > > > > > > rowe_newsgroups wrote: > > > > Does it throw an error when you try to set the .Text property? Also, > > > > have you tried stepping through the code to make sure that nothing is > > > > interfering? > > > > > > > > Thanks, > > > > > > > > Seth > > > > > > > > James wrote: > > > > > Yeah, that didn't work either... actually... on all of my masked edit > > > > > boxes, it isn't recognizing the .text property as anything other than > > > > > "". Any ideas there? Thanks! > > > > > rowe_newsgroups wrote: > > > > > > I don't think you need to clear the mask, you should be able to just > > > > > > use > > > > > > mskName.Text = "" > > > > > > > > > > > > Thanks, > > > > > > > > > > > > Seth Rowe > > > > > > > > > > > > jamesburk***@gmail.com wrote: > > > > > > > I'm trying to clear text from a MaskEditBox control. > > > > > > > > > > > > > > I thought the format to delete it was: > > > > > > > > > > > > > > 'clear the mask > > > > > > > mskName.Mask = "" > > > > > > > 'clear the text > > > > > > > mskName.Text = "" > > > > > > > 'reassign the mask > > > > > > > mskName.Mask = "##:## ??" > > > > > > > > > > > > > > > > > > > > > this doesn't seem to work... what am I doing wrong? Thanks. Hello james,
> I'm trying to clear text from a MaskEditBox control. Since you are refering to the MaskEditBox, I assume you are working with > > I thought the format to delete it was: > > 'clear the mask > mskName.Mask = "" > 'clear the text > mskName.Text = "" > 'reassign the mask > mskName.Mask = "##:## ??" > this doesn't seem to work... what am I doing wrong? Thanks. VB6 as the 2005 version is the MaskedTextBox. If it is the VB6 version, you may want to try one of the VB6 groups. FWIW, here's the code I used on my wrapped box: Public Property Let Text(ByVal New_Text As Variant) Dim stMask As String 'clear out old value mflgLoading = True stMask = MaskEdBox1.Mask MaskEdBox1.Mask = "" MaskEdBox1.Text = "" MaskEdBox1.Mask = stMask 'put data in box If IsNull(New_Text) = False Then Select Case stMask Case "##/##/####", "&&/&&/&&&&" MaskEdBox1.SelText = Format(New_Text, "mm/dd/yyyy") Case Else MaskEdBox1.SelText = New_Text End Select End If PropertyChanged "Text" mflgLoading = False RaiseEvent Change End Property My full sample is available at http://avbsg.net/Uploads/JW071801.exe. (note, this is actually a zip file not exe. You will need to change the extension in order for it to extract properly). Jim Wooley http://devauthority.com/blogs/jwooley/default.aspx |
|||||||||||||||||||||||