Click here to Skip to main content
15,891,372 members
Home / Discussions / C#
   

C#

 
GeneralRe: Making a file readOnly Pin
Wjousts25-Sep-03 12:00
Wjousts25-Sep-03 12:00 
GeneralRe: Making a file readOnly Pin
kman25-Sep-03 12:17
kman25-Sep-03 12:17 
QuestionToolbar button circumvents textbox validation? Pin
Wjousts25-Sep-03 11:29
Wjousts25-Sep-03 11:29 
AnswerRe: Toolbar button circumvents textbox validation? Pin
ankita patel25-Sep-03 12:24
ankita patel25-Sep-03 12:24 
GeneralRe: Toolbar button circumvents textbox validation? Pin
Wjousts25-Sep-03 13:05
Wjousts25-Sep-03 13:05 
AnswerRe: Toolbar button circumvents textbox validation? Pin
J. Dunlap25-Sep-03 13:12
J. Dunlap25-Sep-03 13:12 
GeneralRe: Toolbar button circumvents textbox validation? Pin
Wjousts25-Sep-03 13:34
Wjousts25-Sep-03 13:34 
GeneralRe: Toolbar button circumvents textbox validation? Pin
James T. Johnson25-Sep-03 17:29
James T. Johnson25-Sep-03 17:29 
I think the problem is caused because the Toolbar doesn't take the focus away from any controls in the application. An act required for the validation event to fire.

You can fake validation by setting the focus to another control then restoring it. If you just drop a Panel onto your form then you won't even have to deal with something that is visible.

Something like this at the beginning of your ButtonClick event of your ToolBar should work:

Control control = ActiveControl;
 
if( control != null )
{
	panel1.Focus();
 
	if( control != ActiveControl )
	{
		control.Focus();
	}
}
HTH,

James

"then when you go to bed...wait, you dont do that do you....ok....when you plug into the 'hive mind' to charge yourself, ill hack into your head"
Nnamdi Onyeyiri over MSN

GeneralRe: Toolbar button circumvents textbox validation? Pin
Wjousts26-Sep-03 4:31
Wjousts26-Sep-03 4:31 
GeneralCreating a Wizard Type Application Pin
Mark Sanders25-Sep-03 9:53
Mark Sanders25-Sep-03 9:53 
GeneralRe: Creating a Wizard Type Application Pin
Wjousts25-Sep-03 13:21
Wjousts25-Sep-03 13:21 
GeneralRe: Creating a Wizard Type Application Pin
Azel Low27-Sep-03 6:15
Azel Low27-Sep-03 6:15 
GeneralProblems in VS .NET 2003 Pin
abbomar25-Sep-03 9:24
abbomar25-Sep-03 9:24 
Generalre: socket connection to a url Pin
mikemilano25-Sep-03 8:23
mikemilano25-Sep-03 8:23 
GeneralRe: re: socket connection to a url Pin
devvvy25-Sep-03 8:34
devvvy25-Sep-03 8:34 
GeneralRe: re: socket connection to a url Pin
mikemilano25-Sep-03 8:40
mikemilano25-Sep-03 8:40 
GeneralRe: re: socket connection to a url Pin
devvvy25-Sep-03 8:43
devvvy25-Sep-03 8:43 
GeneralRe: re: socket connection to a url Pin
mikemilano25-Sep-03 9:04
mikemilano25-Sep-03 9:04 
GeneralRe: re: socket connection to a url Pin
devvvy25-Sep-03 9:16
devvvy25-Sep-03 9:16 
GeneralRe: re: socket connection to a url Pin
mikemilano25-Sep-03 9:21
mikemilano25-Sep-03 9:21 
GeneralRe: re: socket connection to a url Pin
devvvy25-Sep-03 9:30
devvvy25-Sep-03 9:30 
GeneralRe: re: socket connection to a url Pin
Blake Coverett25-Sep-03 20:49
Blake Coverett25-Sep-03 20:49 
GeneralRe: re: socket connection to a url Pin
devvvy25-Sep-03 23:24
devvvy25-Sep-03 23:24 
GeneralRe: re: socket connection to a url Pin
Blake Coverett25-Sep-03 20:57
Blake Coverett25-Sep-03 20:57 
GeneralWindows Form DataGrid paging Pin
devvvy25-Sep-03 8:10
devvvy25-Sep-03 8:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.