C# Tutorial 84: How to Create An AutoComplete TextBox In C#

Поделиться
HTML-код
  • Опубликовано: 2 авг 2013
  • c# - AutoComplete TextBox Control .
    ★★★Top Online Courses From ProgrammingKnowledge ★★★
    Python Programming Course ➡️ bit.ly/2vsuMaS ⚫️ bit.ly/2GOaeQB
    Java Programming Course ➡️ bit.ly/2GEfQMf ⚫️ bit.ly/2Vvjy4a
    Bash Shell Scripting Course ➡️ bit.ly/2DBVF0C ⚫️ bit.ly/2UM06vF
    Linux Command Line Tutorials ➡️ bit.ly/2IXuil0 ⚫️ bit.ly/2IXukt8
    C Programming Course ➡️ bit.ly/2GQCiD1 ⚫️ bit.ly/2ZGN6ej
    C++ Programming Course ➡️ bit.ly/2V4oEVJ ⚫️ bit.ly/2XMvqMs
    PHP Programming Course ➡️ bit.ly/2XP71WH ⚫️ bit.ly/2vs3od6
    Android Development Course ➡️ bit.ly/2UHih5H ⚫️ bit.ly/2IMhVci
    C# Programming Course ➡️ bit.ly/2Vr7HEl ⚫️ bit.ly/2W6RXTU
    JavaFx Programming Course ➡️ bit.ly/2XMvZWA ⚫️ bit.ly/2V2CoAi
    NodeJs Programming Course ➡️ bit.ly/2GPg7gA ⚫️ bit.ly/2GQYTQ2
    Jenkins Course For Developers and DevOps ➡️ bit.ly/2Wd4l4W ⚫️ bit.ly/2J1B1ug
    Scala Programming Tutorial Course ➡️ bit.ly/2PysyA4 ⚫️ bit.ly/2PCaVj2
    Bootstrap Responsive Web Design Tutorial ➡️ bit.ly/2DFQ2yC ⚫️ bit.ly/2VoJWwH
    MongoDB Tutorial Course ➡️ bit.ly/2LaCJfP ⚫️ bit.ly/2WaI7Ap
    QT C++ GUI Tutorial For Beginners ➡️ bit.ly/2vwqHSZ
    ★★★ Online Courses to learn ★★★
    Get 2 FREE Months of Unlimited Classes from skillshare - skillshare.eqcm.net/r1KEj
    Data Science - bit.ly/2lD9h5L | bit.ly/2lI8wIl
    Machine Learning - bit.ly/2WGGQpb | bit.ly/2GghLXX
    Artificial Intelligence - bit.ly/2lYqaYx | bit.ly/2NmaPya
    MERN Stack E-Degree Program - bit.ly/2kx2NFe | bit.ly/2lWj4no
    DevOps E-degree - bit.ly/2k1PwUQ | bit.ly/2k8Ypfy
    Data Analytics with R - bit.ly/2lBKqz8 | bit.ly/2lAjos3
    AWS Certification Training - bit.ly/2kmLtTu | bit.ly/2lAkQL1
    Projects in Java - bit.ly/2kzn25d | bit.ly/2lBMffs
    Machine Learning With TensorFlow - bit.ly/2m1z3AF | bit.ly/2lBMhnA
    Angular 8 - Complete Essential Guide - bit.ly/2lYvYRP
    Kotlin Android Development Masterclass - bit.ly/2GcblsI
    Learn iOS Programming Building Advance Projects - bit.ly/2kyX7ue
    ★★★ Follow ★★★
    My Website - www.codebind.com
    DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
    AutoComplete TextBox in C#
    Create An AutoComplete TextBox Control In C#
    TextBox AutoComplete in C#
    How to implement AutoComplete in TextBoxes n C#
    Autocomplete textbox in windows c#
    How to make Auto complete text box
    AutoComplete TextBox
    Searches related to autocomplete textbox c#
    autocomplete textbox c# from database
    autocomplete textbox c# winform
    autocomplete textbox c# web application
    autocomplete textbox c# wpf
    c sharp autocomplete textbox in c#
    microsoft autocomplete textbox in c#
    wpf autocomplete textbox
    autocomplete combobox

Комментарии • 64

  • @thedude4039
    @thedude4039 3 года назад +1

    0:00 When I heard this first breath I knew this was gonna be a great video...

  • @ga7853
    @ga7853 4 года назад

    Thank you for explaining the difference between Suggest and SuggestAppend.

  • @jade01ist
    @jade01ist 7 лет назад +2

    At last I found what I was looking for.

  • @stutitehri993
    @stutitehri993 10 лет назад +1

    nice explanation on web service

  • @H.B-Records
    @H.B-Records 10 лет назад +1

    Thank you very much

  • @samiihaq
    @samiihaq 3 года назад

    Is there a way to ask for users input and save in the listbox permanently?

  • @quanhoang2139
    @quanhoang2139 10 лет назад +1

    thanks you so much

  • @jgavv5163
    @jgavv5163 7 лет назад +1

    Hi do you have any tutorial how to serach word's in textbox nad display on textbox connected with database where you have a tabele coled vacobluary. In that tabele you have only Question_ID, Question_Name And Question_answer. So if you tape in textbox word will serach in tabele and populate the answer if it match with data? Thank you

    • @micahparker5297
      @micahparker5297 4 года назад

      No.. Sorry. BUT, I have a solution, here.
      www.codeproject.com/Articles/365974/Autocomplete-Menu
      An autocompletemenu, which can give you suggestions for completing text, just by making a String[] Array, right from the AutoCompleteMenu properties panel!
      More info is in the link.

  • @LearnKinyarwanda
    @LearnKinyarwanda 5 лет назад +1

    Hi! Kindly let me know how to use a textfile located somewhere in my computer's directory as an autocomplete source, instead of using a custom source!

    • @micahparker5297
      @micahparker5297 4 года назад

      That isn't possible, IMHO, because Microsoft hasn't 100% developed that yet.
      Regards

  • @zainibosal2664
    @zainibosal2664 2 года назад

    Great
    Work sir

  • @carlosmartinez2514
    @carlosmartinez2514 3 года назад

    Thank you bro my respect for you

  • @mdmohiyuddinkhan
    @mdmohiyuddinkhan 10 лет назад

    hi all, the autocomplete textbox is searching from starting, i want something like string search, example if i type a then it has to show all words which has a. The same like in phones now a days come for contact search. can any body helps me on this... it would be great help. I want this for C# windows application. for Web application through ajax tool kit it is already there.
    Thanks

  • @master765gt8
    @master765gt8 7 лет назад +1

    Can you do it like you have the text box and if you press yes it will open up an different text box and if you press no it will open a different text box?

  • @carpal4489
    @carpal4489 4 года назад

    Thank you so much 💪😒❣️❣️

  • @thiagozdzk2242
    @thiagozdzk2242 3 года назад

    Very good!

  • @obaialsamman8587
    @obaialsamman8587 8 месяцев назад

    Thank you so much 😊

  • @looshy13
    @looshy13 Год назад

    Thank you!

  • @baalagee
    @baalagee 9 лет назад +2

    May i know how to load current project directory in text box? can u explain sir?

    • @micahparker5297
      @micahparker5297 4 года назад

      - Won't work. Since VS(Visual Studio) is already using that folder/file, it will come across with an error-dialog: "An error has occurred! It seems the file you are accessing is being used by another process. Please shutdown the other process."
      Sorry, bud.

  • @andilesimelane4771
    @andilesimelane4771 7 лет назад +2

    Hi thanks for this can we also do it in Java, using netbeans

  • @prahaladkumar3802
    @prahaladkumar3802 10 лет назад +1

    i like this video .

  • @MarioAxl
    @MarioAxl 5 лет назад

    You should have framework 4.8 installed, Con el framework 4.8 aparecen más propiedades. para los que no encuentran el autocomplete.

  • @doieslovebot9289
    @doieslovebot9289 6 лет назад

    Hello, is there any way to use autocomplete with multiple words inside the textbox?

    • @micahparker5297
      @micahparker5297 4 года назад

      You'd have to re-code the textbox to do that. Sorry.
      Regards

    • @micahparker5297
      @micahparker5297 4 года назад

      @@mondron Actually, my first comment was incorrect. A good AutoCompletion is here: www.codeproject.com/Articles/365974/Autocomplete-Menu
      It is compatible with both RichTextBox & TextBox Controls.
      I hope I helped you :)

  • @theyuriharrison
    @theyuriharrison 10 лет назад +1

    nice

  • @advaitkale1782
    @advaitkale1782 5 лет назад +2

    Connect auto source to Database???

  • @pratikawate5826
    @pratikawate5826 3 года назад

    I am getting an "Invalid Cast Exception" I tried everything but none worked for me please help🙏

  • @rajanj8058
    @rajanj8058 10 лет назад +1

    I am creating a spelling game and want to know how I can create a textbox (using C# or any other program) so that once a word is entered, it detects whether it is right or wrong and accordingly comes up with a correct or wrong message?? Any help would be appreciated!!!

  • @TutorialsMethod
    @TutorialsMethod 6 лет назад +1

    sir! i want to make auto complete like programming editor when we write our code any where it gives us suggestions ..can you help me please i am waiting for your response

    • @micahparker5297
      @micahparker5297 4 года назад +1

      That is a tall order - I suggest doing this: Make a syntax highlight. If they are inputting the right code, it will highlight the syntax in a color you want. If they aren't, you can totally highlight it in red or something.
      I don't have sample code, but search it in google and you're bound to find something that peaks your interest.
      Regards

    • @bmzih
      @bmzih 4 года назад

      @@micahparker5297 can you help me. I've got an assignment where I need to develop a simple IDE that supports C#. The problem is that they want where if you write a wrong code, it highlights it. Just the way you write a wrong code in Vb there is a red line that shows it has errors. If you have any suggestions it can help

    • @micahparker5297
      @micahparker5297 4 года назад

      @@bmzih Oh, I see what you want -- Luckily, this is really easy. So, you want to highlight it in Red? Sadly, you can't do red under-lining, but you CAN color the incorrect text. Here, use this:
      // getting keywords/functions
      string keywords = @"\b(abstract|as|base|break|case|catch|checked|continue|default|delegate|do|else|event|explicit|extern|false|finally|fixed|for|foreach|goto|if|implicit|in|interface|internal|is|lock|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|switch|this|throw|true|try|typeof|unchecked|unsafe|using|virtual|volatile|while)\b";
      MatchCollection keywordMatches = Regex.Matches(codeRichTextBox.Text, keywords);
      // getting types/classes from the text
      string types = @"\b(Console)\b";
      MatchCollection typeMatches = Regex.Matches(codeRichTextBox.Text, types);
      // getting comments (inline or multiline)
      string comments = @"(\/\/.+?$|\/\*.+?\*\/)";
      MatchCollection commentMatches = Regex.Matches(codeRichTextBox.Text, comments, RegexOptions.Multiline);
      // getting strings
      string strings = "\".+?\"";
      MatchCollection stringMatches = Regex.Matches(codeRichTextBox.Text, strings);
      string stringz = "bool|byte|char|class|const|decimal|double|enum|float|int|long|sbyte|short|static|string|struct|uint|ulong|ushort|void";
      MatchCollection stringzMatchez = Regex.Matches(codeRichTextBox.Text, stringz);
      // saving the original caret position + forecolor
      int originalIndex = codeRichTextBox.SelectionStart;
      int originalLength = codeRichTextBox.SelectionLength;
      Color originalColor = Color.Black;
      // MANDATORY - focuses a label before highlighting (avoids blinking)
      menuStrip1.Focus();
      // removes any previous highlighting (so modified words won't remain highlighted)
      codeRichTextBox.SelectionStart = 0;
      codeRichTextBox.SelectionLength = codeRichTextBox.Text.Length;
      codeRichTextBox.SelectionColor = originalColor;
      // scanning...
      foreach (Match m in keywordMatches)
      {
      codeRichTextBox.SelectionStart = m.Index;
      codeRichTextBox.SelectionLength = m.Length;
      codeRichTextBox.SelectionColor = Color.Blue;
      }
      foreach (Match m in typeMatches)
      {
      codeRichTextBox.SelectionStart = m.Index;
      codeRichTextBox.SelectionLength = m.Length;
      codeRichTextBox.SelectionColor = Color.DarkCyan;
      }
      foreach (Match m in commentMatches)
      {
      codeRichTextBox.SelectionStart = m.Index;
      codeRichTextBox.SelectionLength = m.Length;
      codeRichTextBox.SelectionColor = Color.Green;
      }
      foreach (Match m in stringMatches)
      {
      codeRichTextBox.SelectionStart = m.Index;
      codeRichTextBox.SelectionLength = m.Length;
      codeRichTextBox.SelectionColor = Color.Brown;
      }
      foreach (Match m in stringzMatchez)
      {
      codeRichTextBox.SelectionStart = m.Index;
      codeRichTextBox.SelectionLength = m.Length;
      codeRichTextBox.SelectionColor = Color.Purple;
      }
      // restoring the original colors, for further writing
      codeRichTextBox.SelectionStart = originalIndex;
      codeRichTextBox.SelectionLength = originalLength;
      codeRichTextBox.SelectionColor = originalColor;
      // giving back the focus
      codeRichTextBox.Focus();
      - Is this what you needed? Put it into the TextChanged event of a RICHTEXTBOX. Don't do textbox, they don't have certain requirements for it.
      This happily creates a Syntax-Check, without needing to install a Nu-get package.
      If you need C# Syntax, then use this. I inputted all C#-Keywords in correct coloring(From the Microsoft Site.), so you will maybe only need to double-check it once.
      So, in summary, this code will highlight any C#-Code the user inputs into the RichTextBox. I made it color it BLUE, but, you can change any of them, if you want to. Basically, if the user inputs Non-C# Code, then it will NOT be highlighted in blue(or whatever color.) Instead, it will just be regular text. If you want something more, ask me!
      If you need help with anything else, I am always here to help.
      Thank you for asking, @Ned
      Regards,
      Micah

  • @kentdmayor6417
    @kentdmayor6417 6 лет назад +1

    Tried to to this but for some reason, it won't work even though I already followed the instructions correctly and carefully. Need help, please

    • @micahparker5297
      @micahparker5297 4 года назад

      Hmm, use this: www.codeproject.com/Articles/365974/Autocomplete-Menu

  • @nahidmasudbro
    @nahidmasudbro Год назад

    I'm going to show the word that the letter I type is inside. example: where "c" exist in Ja"c"k, "C"haran, "C"haitrika, Bla"c"k. Sir how i make it.

  • @juliancastelan9664
    @juliancastelan9664 5 лет назад +2

    why does my source collection not allow me to paste multiple lines?

    • @micahparker5297
      @micahparker5297 4 года назад

      Because it wasn't designed for that... It can't comprehend it when you paste something. It is waiting for you to type, not paste.

  • @user-rs5wv4zb1y
    @user-rs5wv4zb1y 8 месяцев назад

    thanks!!

  • @sanjayajanakantha7883
    @sanjayajanakantha7883 2 года назад

    thank you

  • @muhammadafzal237
    @muhammadafzal237 3 года назад

    Sir how to create textbox auto complete from c# database data

  • @tuanphamhoang87
    @tuanphamhoang87 8 лет назад +1

    why can't textbox execute autocomplete when i choose multiline?

    • @micahparker5297
      @micahparker5297 4 года назад

      Because, the AutoComplete isn't meant for multiline. If it was, I'd bet that they would have added an AutoComplete for RichTextBox.
      Also, the maker of this video seems to be ignorant, so I will answer your questions.
      Regards

  • @SHIDO_
    @SHIDO_ Год назад

    How make items in right no left

  • @bothannwinn870
    @bothannwinn870 6 лет назад +1

    my android studio doesn't contain Design mode? Why?

  • @noijze
    @noijze 6 лет назад +5

    saus raw saus

    • @RAIRAIIRAI
      @RAIRAIIRAI 6 лет назад

      lmao exactly what i was thinking

  • @khalidpierre4336
    @khalidpierre4336 6 лет назад +1

    Can you give us the source code

  • @doge7831
    @doge7831 3 года назад

    It does not work with rich text boxes

  • @fadilibrahim
    @fadilibrahim Год назад

    👍👍

  • @EugenDET
    @EugenDET 5 лет назад

    Was für eine Scheiße...

  • @fiverrdesigns3780
    @fiverrdesigns3780 3 года назад

    thank you

  • @rawaise
    @rawaise 10 лет назад +1

    nice