StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
WinForms (How do I?)
»
Keeping button controls in sync with MaintenanceFormToolStrip items
Keeping button controls in sync with MaintenanceFormToolStrip items
Post Reply
Like
0
Keeping button controls in sync with MaintenanceFormToolStrip items
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
franka
franka
posted 19 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 22,
Visits: 35
I have a form that has New, Edit, Delete, Save and Undo buttons. I want to keep those buttons in sync with the items on the MaintenceFormToolStrip. I've tried the following code in both the ItemClicked event of the MaintenanceFormToolStrip and the EditingStateChanged event of the primary BO but they don't stay in sync. Suggestions? Thanks!!
Me
.btnNew.Enabled =
Me
.MaintenanceFormToolStrip1.Items(0).Enabled
Me
.btnEdit.Enabled =
Me
.MaintenanceFormToolStrip1.Items(3).Enabled
Me
.btnDelete.Enabled =
Me
.MaintenanceFormToolStrip1.Items(4).Enabled
Me
.btnSave.Enabled =
Me
.MaintenanceFormToolStrip1.Items(6).Enabled
Me
.btnUndo.Enabled =
Me
.MaintenanceFormToolStrip1.Items(7).Enabled
Reply
Like
0
Reply
StrataFrame Team
S
StrataFrame Team
posted 19 Years Ago
ANSWER
Post Details
Share Post
S
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
You would probably do best to handle the form's EditingStateChanged event which gets raised for each business object. The problem with testing on the enabled state of the MaintenanceFormToolstrip is that it may not be set, yet... events get handled in whatever order the delegate feels like invoking them (two handlers on the same event are not guaranteed to fire in any specific order...). So, your best bet is to look at the source code for the handler of the EditingStateChanged event within the MaintenanceFormToolstrip. It cycles through the collections of business objects that are selected through the IncludeInForm*** properties and handles the events appropriately. It might be easier to just copy that code over
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Keeping button controls in sync with MaintenanceFormToolStrip items
franka
-
19 Years Ago
You would probably do best to handle the form's EditingStateChanged...
StrataFrame Team
-
19 Years Ago
I cloned the code from the MaintenanceToolStrip control and now the...
franka
-
19 Years Ago
Hrm... in this scenario, you'll actually want to handle the processing...
StrataFrame Team
-
19 Years Ago
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