Tabcontrol validating

May i know is there any event similar to Deselecting event or any other property or function or some work around to achieve this functionality. This functionality can be achieved in Windows Tab Contro by using Deseleting event of Tab Control.Tab Pages This property returns the collection of tab pages in this tab control. Image List This property returns or sets the images to display on the control’s tabs.Each tab consists of a Tab Page, which acts as a container for other controls that are displayed when the tab is selected. When an Image List is set you can use the Tab Page’s Image Index property to select an image to display on the tab: See the Primal Forms 2011: Spotlight of the Image List Control blog article for more details on how to use an Image List.Note: Pressing Ctrl Tab will select the next Tab Page in the Tab Control.Is there a way to prevent the user from leaving a tab on a Tab Control until all the controls on that tab have finished validating? Another approach would be to somehow cancel the pending validating event when the user selects another tab page. I can setup a tab page leave event, but to what benefit? According to MSDN events happen in following order: Focus events occur in the following order: 1.. I would allow user to fill pages in the order he/she prefers and jump between them at will. Being able to do that might help for my particular circumstances. For certain control, once it has focus, it will validate its data for closing, leaving, etc.. So the only problem when changing pages is when all the child controls on the form have no focus, then swith pages will not trigger the child controls' validating events. The problem I am experiencing is when a control fails its validating event and the user clicks another tab things get messy. Drumm" all the controls on that tab have finished validating? Drumm" all the controls on that tab have finished validating?

Ideally, I think the best solution is not to leave a tab until the validating event has completed successfully. Being able to do that might help for my particular circumstances. If you have multi-tab entry form final validation should occur only when final tab page is filled and confirmed. I guess maybe I should have asked only how to prevent a user from leaving a tab page. I think you should hook the Validating event for all the controls on your form.Selected Tab This property returns or sets the currently selected tab page.You can use this property to programmatically change the current tab: Selected Index This property returns or sets the index of the currently selected tab page.If you have any questions or concerns, please feel free to post it in the group. Best regards, Jeffrey Tan Microsoft Online Partner Support Get Secure!- This posting is provided "as is" with no warranties and confers no rights.

Leave a Reply