Results 1 to 14 of 14

Thread: Maskedit Again

  1. #1

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Maskedit Again

    Hi

    I do not to get to format my maskedit, I want show a 0.993 when the control lost focus, but It show me 993, I want show zero left (0.885 or 0.889 no 885 or 889)


    tia
    Attached Files Attached Files

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Maskedit Again

    i don't really understand your question.

    your MaskEdBox1 does what you want...

  3. #3

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Maskedit Again

    hI

    When MaskEdBox1 lost Focus It show 993 , and I want 0.993 com zeros in left

  4. #4
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Maskedit Again

    i'm not getting that behaviour - when you click Command1 0.993 is displayed, followed by 993 - but that's what you've asked it to do...

    MaskEdBox1 remains as 0.993

  5. #5

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Maskedit Again

    I want , when MaskEdBox1 lost Focus It show me 0.993 not 993

  6. #6
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Maskedit Again

    it's nothing to do with LostFocus.

    you mean when you click Command1 you want it to MsgBox the correct value.

    use MaskEdBox1.FormattedText

  7. #7
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Maskedit Again

    VB Code:
    1. Private Sub MaskEdBox1_LostFocus()
    2.     MsgBox Format(MaskEdBox1, "0,###")
    3. End Sub

  8. #8
    Addicted Member cha0s4u's Avatar
    Join Date
    Apr 2005
    Location
    new Delhi - 1ND1A
    Posts
    209

    Talking Re: Maskedit Again

    Refer the sample attached. And use the button2.

    Propertiesx to look at ClipMode = IncludeLiterals
    MsgBox Me.MaskEdBox2.Text

    Hope this helps!!
    Attached Files Attached Files
    - cha0s4u ENJOI

    Do Remember to RATE a post if it helps u,
    Ratings encrougage those who Know enough,to help others

  9. #9

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Question Re: Maskedit Again

    Sorry, My english is terrible

    My question is not about buttons , but about when the controls lost focus , I want let it as 0.993 and not 993

    tks

  10. #10
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Maskedit Again

    As i said in post #6, use MaskEdBox1.FormattedText instead of MaskEdBox1.Text

  11. #11

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Maskedit Again

    for me , show only read only

  12. #12
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Maskedit Again

    eh?
    VB Code:
    1. Private Sub MaskEdBox1_LostFocus()
    2.     MsgBox MaskEdBox1.FormattedText
    3. End Sub

  13. #13

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Maskedit Again

    tks, but I do not want show in Msgbox, but when the maskedit lost focus (go a other control) , It show 1 integer and 3 decimals

    If I typed 1.933 It work fine , because show me 1.933

    But

    If I typed 0.933 It do not work fine , show me 933

    when It Lost focus

  14. #14
    Addicted Member
    Join Date
    Jun 2006
    Location
    Virac
    Posts
    129

    Re: Maskedit Again

    where do you want to show it? Coz when you leave the MaskedEdit1 control, the data entered is formatted as is.....

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