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

Thread: Edit box

  1. #1
    Join Date
    Sep 2000
    Posts
    200

    Edit box

    I entered Date as the format for an edit box. How do I get the forward slashes, i.e., mm/dd/yy to show up so the user will only enter 080701 for the date & the box will show 08/07/01. ??

    Thanks for any input!
    John


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Edit box

    Enter mask

    __/__/__ ' these are underscores

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    May 2001
    Location
    Canada
    Posts
    182

    Re: Edit box

    Hi,
    You can use the Masked Edit control (MSMASK32.OCX). This control looks like TextBox, but have the Mask property. For example:

    MaskEdBox1.Mask = "##/##/##"

    Then, when you input"080701", what you get is: "08/07/01" (MaskEdBox1.Text).

    Hope this helps.

    Regards,

    Michi

  4. #4
    Join Date
    Sep 2000
    Posts
    200

    Re: Edit box

    Where do you enter the mask?


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