Here is the syntax for TreeView.KeyDown().

Here is the syntax for TreeView.KeyDown().

Post by baobo » Thu, 14 May 2009 11:52:16


Last year my question of what TreeView's KeyDown event's syntax is was
unanswered. After a lot of trial & error, it is:

TreeView1_KeyDown(KeyCode As Integer, ByVal Shift As Integer)

VBA help *wrongly* says KeyDown(KeyCode As Integer, Shift As Integer).

(And expected syntax KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer) is equally wrong. TreeView belongs to
MSComCtlLib, not MSForms. MSComCtlLib has no object like
"ReturnInteger", etc.)

A small repayment for all ye Knights of the Group who've helped me in
the past.

***
 
 
 

1. treeView and KeyDown question

2. treeView keydown

What is wrong in this code?

private void tree_KeyDown(object sender, System.Windows.Forms.KeyEventArgs
e)

{

if (e.KeyCode == Keys.Enter )

{

ConnString = "workstation id=HRV;packet size=4096;integrated
security=SSPI;data source=HRV;persist security info=False;initial
catalog=DVD Kolekcija";

bDb = new Db(ConnString);

grid.Refresh();


grid.Table = bDb.datasetDVD.Tables ["DVD"];

}

}



I press ENTER when I'm on treeview control but nothing happens!



Hrcko

3. Treeview & keydown

4. KeyPreview/KeyDown on TreeView control - Possible Bug?

5. Can't use Keydown event in treeview

6. KeyDown event catching in TreeView AfterLabelEdit event

7. Can't use Keydown event in treeview

8. here's what i have and am looking for

9. Hostbased authentication problem...here's the Debug output.....I am STUCK !!!

10. Here's the code I am using

11. AM/AM, AM/AM Modeling

12. Single table shape syntax for treeview

13. Correct syntax in treeview attributes

14. Single table shape syntax for treeview

15. Need help with e4x syntax for children in ADG TreeView column