Forum  General Visual ...  How do I...?  Tab/Set focus to next user control within listview ?
Previous Previous
 
Next Next
New Post 4/23/2012 1:43 PM
  kerv21
82 posts
No Ranking


Tab/Set focus to next user control within listview ? 
Modified By kerv21  on 4/23/2012 4:44:29 PM)

Hi,

I am using a listview control with a user control as the list items.  (code below shows how I add the user control as a listview item)
My question is how would I set the focus to the next user control within the listview (if one exists) once the user presses tab  or enter key on the last textbox within the currently selected user control ?  (In other words when the user exits the last entry field in the current user control I want the focus to shift to the next user control within the list if one exists)

 

Dim objControl As New ListViewItem
objControl.Dock = DockStyle.Fill
Dim lv As New ListViewItem
lv.Tag = objControl
lv.SubItems.Add(objControl)

 

lvItems.Items.Add(lv)

 

 
New Post 4/26/2012 1:55 PM
  palli
14298 posts
1st Level Poster




Re: Tab/Set focus to next user control within listview ? 

Hi Kerv,

I don't understand your code and you must be mising types here, as ListViewItem doesn't have the Dock property.

In any case, based on your text, I created a small demo application here. This application declares a UserControl with 1 textbox and then adds one instance to each of the ListView's three control type columns. Focusing on the first (leftmost) textbox and tabbing will get you to the next column on the right until you reach the far right, then focus is lost. We already have an enhancement request on that problem. Please view it here and follow up on our progress.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  General Visual ...  How do I...?  Tab/Set focus to next user control within listview ?
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS