MetroTextBox Control Updated – MetroFramework

You may also like...

  • Rod

    awesome 🙂

  • Rod

    Got this error when compiling the source code

    1.) Error 1 ‘MetroFramework.MetroFonts’ does not contain a definition for ‘WaterMark’ C:UsersUserDocumentsVB.NEtwinforms-modernui-masterMetroFrameworkControlsMetroTextBox.cs 913 69 MetroFramework

    2.) Error 2 The name ‘MetroWaterMarkWeight’ does not exist in the current context C:UsersUserDocumentsVB.NEtwinforms-modernui-masterMetroFrameworkControlsMetroTextBox.cs 913 101 MetroFramework

    • Sorry the updates on the MetroFonts was not included on my commit. Check it out again.

      • Rod

        Okay Sir 🙂

      • Rod

        Help Sir

  • Bumu

    Can’t select the text in textbox with the mouse cursor. Nice updates 🙂

    • How do you select the text? I tried double click and drag, I can select it.

  • Rod

    having a problem in putting an icon in the textbox here’s the pic:

  • Bhavesh Patel

    thanks. for new update.

  • Jigar Patel

    hello everyone.
    how can i change metro tab background color.???
    also how can i change background color???
    how can i retrive database data in metro textbox ????
    pls help me…

    • lee

      UseCustomBackColor “TURE”

  • Khawar Jatoi

    hello !
    First I am grateful for you because of your amazing tutorials. I’m following your videos since I know your site.
    I just want to ask about how you have applied this check on your project. It would be great if you make an early tutorial or just tell me, because I really need this for my Final Project.
    Thanks.

    • I just added an extension for the MetroTextBox control to specify those required fields. I will try to work on a tutorial for this one.

      • sonu

        Sir which extension you have used ? Is it error Provider ?

        • Yes correct that is error provider.

          • Thenndral

            Hi Dennis,

            Did you made any tutorial? If not please let me know how to add extension.

            Thanks,
            thenndral

          • Éverton

            How to use Error Provider ? Please

  • Rizky Adhibta Putra

    sir, its posible to make autocomplete on metro textbox?
    thanks

    • Laurence Salvador

      Up, sir denise, sana maging possible to sa metro mo, need this badly… wla kasi option for suggestion sa metrotextbox

      • You can check my GitHub account updates is already there.

  • Morgan

    Hi, I’ve a problem when I add the button in MetroTextBox. When the mouse hover the button becomes empty. See the joined picture.
    Has anyone the same problem ?

    Thanks

    • Please watch again the video. You need to add 2 images.

      • Morgan

        I’m sorry, but I’ve just watch again the video, and I see only the property “Image” in CustomButton.
        The other image you add in video is the icon

      • salman shakeel

        hey dennis how to use a metro form instead of old windows form i cant find meetro form to add in my project

        • Please check my blog post on how to use MetroFramework. Form is not added manually, you need to change something on the code.

    • elouajibimad

      Same Problem Here

  • Thenndral

    Hi Dennis,

    Could you please tell me how to disable right click context menu in textbox?

    I need this requirement to prevent copy & paste.

    for windows(default) textbox I did this code:

    ‘TextBox RightClick Disable

    Public Sub TB_DisableContextMenu(ByRef txtbox As Control)

    txtbox.ContextMenuStrip = New ContextMenuStrip()

    End Sub

    If I do the same logic, its not working.

    Method 1: (form loading)
    MetroContextMenu1.Show(txtEmail, New Point(0, txtEmail.Height))

    Method 2:

    ‘TextBox RightClick Disable

    Public Sub TB_DisableContextMenu(ByRef txtbox As MetroFramework.Controls.MetroTextBox)

    Dim cMenu As New ContextMenuStrip()

    cMenu.Show(txtbox, New Point(0, txtbox.Height))

    End Sub

    Both method is not working. how can I disable right click context menu.

    Thanks,
    thenndral

    • You have to modify the MetroTextBox control to acquire this functionality. Just set the ShortcutsEnabled to false

      • Thenndral

        Hi Dennis,

        Thanks for your reply.
        I’m using Vb 2010 and MetroFramework 1.3.5.0

        I forget to mention before in my previous post, In MetroTextbox I can’t find the properties “ShortcutsEnabled”. Could you please guide me. I’m missing something? and also please tell me the use of MetroTextButton.

        PS. note: I attached the image of properties and reference page.

        https://uploads.disquscdn.com/images/6f94d4c0afdac0a54f52ad54c85b7eedf113f5084723dba3480896bb060bc2d5.png

        Thanks,
        thenndral

        • Thenndral

          Hi Dennis,

          Thanks for your reply.

          Could you please give me the link to download. I can’t able to find.

          In the latest update, “ShortcutsEnabled” example is available?

          Please guide me.
          Thanks,
          thenndral

        • This can be added on the source code. Need to update the MetroTextBox control

          • Thenndral

            Thanks for your reply.
            I’m using MetroFramework 1.3.5.
            Could you tell me how to update MetroTextBox control?

            Thanks,
            thenndral

      • Thenndral

        Hi Dennis,

        “ShortcutsEnabled” have some demerits. If I use this property I can’t use any shortcut ie. Mouse right click or Ctrl + C, +V.

        for some textbox control, i need to give permission to the user can Copy or Paste and diable rightclick option. In this case empty menustrip will useful for me. so I tried the code as i send in previous post.

        Could you give me suggestion for me in the above requirement.

        Thanks,
        thenndral

      • Thenndral

        Hi Dennis,

        Thanks for your reply.

        Could you please give me the link to download. I can’t able to find.

        In the latest update, “ShortcutsEnabled” example is available?

        Please guide me.
        Thanks,
        thenndral

  • lee

    Claer Button It will disappear to build. What?

  • Meyka Jograt

    How can I resize the textbox ?

    • James

      Change the W and H from the properties

  • SPQ GROUP

    How to change font?

    • You can only change the size, by design it was made to have the same font for the whole controls to make the same look and feel. But can be updated through the MetroFramework source code.

  • Alessandro Spina

    Hi, Dennis.
    Is there a problem with clearbutton on metrotextbox when the property showButton is False?
    I’m using VB.net 2015

    Thanks in advance.

    • As far as I know there is no problem. Have you encounter any issue?

      • Alessandro Spina

        Yes. I must set the showbutton, but I need only the clearbutton. This isn’t possible. Another question is that I’m using the metrotextbox on a custom user control and I’m not able to set the metrostyle to the user control, so I have to pass all style properties manually, then the “X” of the clearbutton appears always with white background.

        Thanks in advance for the replay and thanks for the great job!

  • BITWIT

    Hi, How do I write a code for click event in the metrotextbox button ?!

  • Mateusz Łozowski

    It is possible to add Event onClick on this magnifer?

    • You can use txtBox.ButtonClick += txtBox_ButtonClick;

      • Mateusz Łozowski

        thanks!

      • Sachith Wickramaarachchi

        Can you provide me sample code.how to get textbox button click event

  • pianoboy11

    Is it possible to scroll to the end of the metrotextbox. How to I get access to the ScrollToCAret function using the metrotextbox control