vb.net - How to make paragraphed text appear in a multi-line textbox when a treenode is selected -


i reckon simple thing can't seem know how pull off new vb.net.

on form, have treeview control have populated nodes using nodes collection treenode editor. have multi-line textbox. when node selected, pre-defined text assigned particular node appears in textbox.

what want achieve paragraphs of text formatting, inputted textbox , not single lines of text shown in code below.

for instance, when user clicks node titled 'soccer', formatted body of text like:

“this sport.

it sport played between 2 teams of eleven players spherical ball.

it played 250 million players in on 200 countries.”

to appear in textbox. please how can code this? using visual basic 2010 express. code using @ moment shown below. thank in advance.

 private sub treeview1_afterselect(sender system.object, e system.windows.forms.treevieweventargs) handles treeview1.afterselect                   dim selectednode treenode          selectednode = treeview1.selectednode          if selectednode.text = "soccer"              textbox1.text = "this sport." 'i have paragraphed text appear in                                                      'textbox1 instead of single line of text          else              if selectednode.text = "moon"                  textbox1.text = "this name of car." 'i have paragraphed text                                                                'appear in textbox1 instead of single                                                                'line of text              end if          end if      end sub

you should add '\n' in end of line.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -