471,594 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

How to set control focus


In my C# application i have a treeview control and listview control, the
treeview is on the left side of the from and the listview is on the right.
When i click on an item in treeview i got code to force the listview to
selected the appropriate item and set focus on the listview, but the focus
never work it always stay on the treeview control.

Here my sample code

private void Treeview1_NodeClick(..)
listview1.items[0].selected = true;

Can anyone see what is wrong with my codes.... i really really want the
listview to have the focus when the user had clicked on any item in the
treeview. The reason because i have a lot of comment from my users said
that the listview should have the focus so that they can do other
performance without having to click on the listview first.

Any sample codes would be appreciative, looking forward hearing from you

Dec 21 '06 #1
1 8363
Are you calling the base.treeviewNodeClick after the focus command?
Also, some users have dumb requests. You should ignore those requests
and stick with standards. Let the user drive the focus manually. You
can set the selection and the tab order to help them.

Dec 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Julie | last post: by
reply views Thread by Vinod. | last post: by
2 posts views Thread by Elliot M. Rodriguez | last post: by
3 posts views Thread by Paul | last post: by
1 post views Thread by robin9876 | last post: by
1 post views Thread by Ryan | last post: by
3 posts views Thread by zacks | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.