Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Regarding Textbox, Treeview and ListBox properties

Regarding Textbox, Treeview and ListBox properties

Scheduled Pinned Locked Moved C#
help
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aruna_koride
    wrote on last edited by
    #1

    Hi all I am developing instant message application, I need to select a node from treeview and enter the text in the textbox,click Send button to append the text to another ListBox. I have problems in following: 1.When I select a node and enter the text in the textbox,the node is unselected immediately, I wanted to keep node highlighted. 2.When I enter the text and hit enter, I wanted to do same function as Send button, instead the cursor is going to next line on hitting enter key. Please help me , I tried changing all the events/properties but didn't work. Aruna

    A 1 Reply Last reply
    0
    • A aruna_koride

      Hi all I am developing instant message application, I need to select a node from treeview and enter the text in the textbox,click Send button to append the text to another ListBox. I have problems in following: 1.When I select a node and enter the text in the textbox,the node is unselected immediately, I wanted to keep node highlighted. 2.When I enter the text and hit enter, I wanted to do same function as Send button, instead the cursor is going to next line on hitting enter key. Please help me , I tried changing all the events/properties but didn't work. Aruna

      A Offline
      A Offline
      Andrew Lygin
      wrote on last edited by
      #2

      Hi, Aruna. 1. treeview.HideSelection = false. 2. You can a) set form.AcceptButton = btnSend if your form is a dialog or you can b) handle KeyDown event of the textbox:

      private void textbox_KeyDown(object sender, KeyEventArgs e)
      {
      if (e.KeyData == Keys.Enter)
      {
      // Handle Enter here.
      }
      }

      A 1 Reply Last reply
      0
      • A Andrew Lygin

        Hi, Aruna. 1. treeview.HideSelection = false. 2. You can a) set form.AcceptButton = btnSend if your form is a dialog or you can b) handle KeyDown event of the textbox:

        private void textbox_KeyDown(object sender, KeyEventArgs e)
        {
        if (e.KeyData == Keys.Enter)
        {
        // Handle Enter here.
        }
        }

        A Offline
        A Offline
        aruna_koride
        wrote on last edited by
        #3

        Thanks a lot Andrew! My problem solved with your help.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups