CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2012
    Posts
    7

    How Can I create a TextBox with digit grouping option

    hi friends....
    I want to create a textbox like Windows XP Calculator's textbox by this condition:

    1 -the digits separate by comma (digit Grouping) like Windows XP Calculator's textbox
    2 -the decimal part of number don't get digit grouping option .

    example of this textbox format :

    1,234,567.6576
    0.2123423423423423
    -1,2332,33.232023

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: How Can I create a TextBox with digit grouping option

    Have you tried anything so far? Show us some code.

  3. #3
    Join Date
    Apr 2012
    Posts
    7

    Re: How Can I create a TextBox with digit grouping option

    hi...
    i create a procedure to do this but that's very long and bore.
    i know that it is possible to use FormatNumber to do this but how? i don't know

  4. #4
    Join Date
    May 2002
    Location
    Boston
    Posts
    67

    Re: How Can I create a TextBox with digit grouping option

    Hi,

    Just use a NumericUpDown control and set the 'ThousandsSeparator' property to true

    Curt

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