Results 1 to 4 of 4

Thread: [RESOLVED] [02/03] CharacterCasing TitleCase

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    384

    Resolved [RESOLVED] [02/03] CharacterCasing TitleCase

    Hello again everyone!

    How can I set my Textbox's CharacterCasing to TitleCase?

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [02/03] CharacterCasing TitleCase

    You will need to do the title-casing manually at some point that you feel is most appropriate; for example, when the user leaves the textbox.
    If you're using the CausesValidation property on your other controls, then use the Validating event of the textbox.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    384

    Re: [02/03] CharacterCasing TitleCase

    Hey Thanx for answering again!

    I did this:
    Code:
        Private Sub rdNone_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles rdNone.Click
            txtAppFullNames.Text = StrConv(txtAppFullNames.Text, VbStrConv.ProperCase)
        End Sub
    It's perhaps not the true VB.NET way of doing it, but it works, for now

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [RESOLVED] [02/03] CharacterCasing TitleCase

    The .NET way of which you speak would be the System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase method.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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