StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
WinForms (How do I?)
»
Tab focus for error provider
Tab focus for error provider
Post Reply
Like
0
Tab focus for error provider
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Trent Taylor
Trent Taylor
posted 19 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
Sure. Like I said, I did not test the code and you might have to make minor change here or there, but this should at least get you started.
Reply
Like
0
Andria Jensen
Andria Jensen
posted 19 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 336,
Visits: 497
Thanks Trent, I'll give that a try.
Reply
Like
0
Trent Taylor
Trent Taylor
posted 19 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
Right now there is not a way to do this automatically. But you can tie this in failry easy. Below is a sample of one possible way to achieve this. I did not test this code, but you should get the general idea.
Private
Sub
MyBO_BusinessRulesChecked(
ByVal
e
As
MicroFour.StrataFrame.Business.BusinessRulesCheckedEventArgs)
Handles
MyBO.BusinessRulesChecked
'-- Establish Locals
Dim
loRule
As
MicroFour.StrataFrame.Business.BrokenRule
Dim
loControl
As
System.Windows.Forms.Control
If
e.CountOfBrokenRulesTotal > 0
Then
'-- Get the first broken rule
loRule = MyBO.BrokenRules.ToArray()(0)
'-- Cycle through all of the controls on the form
For
Each
loControl
In
Me
.Controls
'-- See if the control supports the IBusinessBindable interface (SF Binding)
If
loControl.GetType().GetInterface(
"IBusinessBindable"
)
IsNot
Nothing
Then
'-- See if the control matches the field name in error
If
CType
(loControl, MicroFour.StrataFrame.UI.Windows.Forms.IBusinessBindable).BindingField.Equals(loRule.FieldName, StringComparison.OrdinalIgnoreCase)
Then
'-- Set the focus
loControl.Focus()
'-- Exit the loop
Exit
For
End
If
End
If
Next
End
If
End
Sub
Reply
Like
0
Andria Jensen
Andria Jensen
posted 19 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 336,
Visits: 497
If I have a form with multiple tabs on it, and there is an error on a tab not focused...is there a way to focus the tab with the error on it automatically?
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search