First of all sory for my bad english
well i want to make a button to change text when i have select an item at Listview
i have make this but it doesnt works
it changes the name even i have select or not an item
If someone can help me i will be thankfull
well i want to make a button to change text when i have select an item at Listview
i have make this but it doesnt works
it changes the name even i have select or not an item
VB.NET:
[COLOR=#000088]Private[/COLOR][COLOR=#000088]Sub[/COLOR][COLOR=#000000] Button1_TextChanged[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]ByVal[/COLOR][COLOR=#000000] sender [/COLOR][COLOR=#000088]As[/COLOR][COLOR=#000088]Object[/COLOR][COLOR=#666600],[/COLOR][COLOR=#000088]ByVal[/COLOR][COLOR=#000000] e [/COLOR][COLOR=#000088]As[/COLOR][COLOR=#000000] System[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]EventArgs[/COLOR][COLOR=#666600])[/COLOR][COLOR=#000088]Handles[/COLOR][COLOR=#000000] Button1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]TextChanged[/COLOR]
[COLOR=#000088]If[/COLOR][COLOR=#000000] ListView1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]SelectedItems[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]Count [/COLOR][COLOR=#666600]>[/COLOR][COLOR=#006666]0[/COLOR][COLOR=#000088]Then[/COLOR][COLOR=#000000]
Button1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]Text [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"Edit"
[/COLOR][COLOR=#000088]Else[/COLOR][COLOR=#000000]
Button1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]Text [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"Add"
[/COLOR][COLOR=#000088]End[/COLOR][COLOR=#000088]If
[/COLOR][COLOR=#000088]End[/COLOR][COLOR=#000088]Sub[/COLOR]
If someone can help me i will be thankfull