User Profile

Collapse

Profile Sidebar

Collapse
QuangNhat
QuangNhat
Last Activity: May 9 '12, 09:48 AM
Joined: Apr 30 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I want to create a input (input commands) that it have a function like intellsense. I have found on internet and I found 2 ways: use rich textbox + custom code (harder) and autocomplete combobox.
    My combobox (more important properties):
    AutoCompleteMod e = SuggestAppend
    AutoCompleteSou rce = ListItems
    DropDownStyle = Simple
    DataSource = MyDataBindingSo urce
    My combobox display a list of commands. When user type,...
    See more | Go to post

    Leave a comment:


  • :), I have just find the answer, I add a command, result:
    Code:
    if (e.KeyValue == 13)
                {
                    if (Combobox.Text != "")
                        StringGlobal = Combobox.Text;
                    if (Combobox.Text == "")
                        Combobox.Text = StringGlobal;
                }
    But I use mouse to chose the item, text is cleared.
    See more | Go to post
    Last edited by Meetee; May 1 '12, 11:17 AM. Reason: code tags added

    Leave a comment:


  • Press Enter key, then Combobox clear text, how to stop it ?

    Hi,
    I use Combobox in DropDownStyle = simple, and AutoCompleteMod e, I bind DataSource for Combobox. So I have a Combobox AutoComplete with a list from Database.
    When I use in DropDownStyle = DropDownList, it don't have problem.
    But when I use it in Simple, when I chose a item by press Enter, Text of Combobox is cleared. I use PreviewKeyDown and set again text for Combobox. But there are 2 times occur this event, and text is set...
    See more | Go to post

  • QuangNhat
    replied to Uppercase in Combobox text
    I try this and good

    private void cboOperationCod e_KeyPress(obje ct sender, KeyPressEventAr gs e)
    {
    if (e.KeyChar >= 'a' && e.KeyChar <= 'z')
    e.KeyChar = Convert.ToChar( e.KeyChar.ToStr ing().ToUpper() );
    }
    See more | Go to post
    Last edited by Niheel; Apr 30 '12, 10:10 AM. Reason: your solution was posted, future reference this is closed for reply

    Leave a comment:

No activity results to display
Show More
Working...