How to make user entry in RadTextbox as uppercase?

5 posts, 0 answers
  1. Smayr
    Smayr avatar
    14 posts
    Member since:
    May 2013

    Posted 27 May 2013 Link to this post

    How to make user entry in RadTextbox as uppercase?

    in win forms?

  2. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 30 May 2013 Link to this post

    Hi Smayr,

    Thank you for writing.

    The easiest way to do that would be to use the KeyPress event of the control:
    void radTextBox1_KeyPress(object sender, KeyPressEventArgs e)
    {
        e.KeyChar = Char.ToUpper(e.KeyChar);
    }

    I hope this helps.
     

    Regards,
    Stefan
    Telerik
    RadChart for WinForms is obsolete. Now what?
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Smayr
    Smayr avatar
    14 posts
    Member since:
    May 2013

    Posted 30 May 2013 Link to this post

    hello thank for u reply
    I tried  Private Sub txtWINSCOMP_KeyPress(ByVal sender As Object, ByVal e As KeyPressEventArgs)
            e.KeyChar = [Char].ToUpper(e.KeyChar)
          
        End Sub

    but it didn t force the user data entry to be in upper case
    and it seems whn i put a debug point

    it s not going inside Private Sub txtWINSCOMP_KeyPress

    what do you suggest
  5. Smayr
    Smayr avatar
    14 posts
    Member since:
    May 2013

    Posted 30 May 2013 Link to this post

    I have found this article http://support.microsoft.com/kb/818363 and i would like to share on the forum
    Character casing property solved my problem


    thanks anyway
  6. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 04 Jun 2013 Link to this post

    Hello Smayr,

    The event was not hit because most likely you did not subscribe to it. However, thank you for sharing your solution with the community.
     
    Regards,
    Stefan
    Telerik
    RadChart for WinForms is obsolete. Now what?
Back to Top
UI for WinForms is Visual Studio 2017 Ready