StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



MaintenanceFormToolbar question...Expand / Collapse
Author
Message
Posted 09/19/2006 10:33:00 AM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/09/2008 2:20:16 PM
Posts: 436, Visits: 944
I've created a SF DevExpress Maintenance form and I want to know if i could add my own buttons or what not to the MaintenanceFormToolbar.
Post #2903
Posted 09/19/2006 10:48:26 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 6:26:12 PM
Posts: 4,901, Visits: 4,887
The problem is the DevExpress toolbars...I really don't like the way that they manage their bars at all.  You will not be able to add new buttons to the MaintenanceFormToolbar itself, but you can add another toolbar through the same BarManager control.  At present this is just the way it is with the DevExpress toolbars since we have to be able to control the buttons of the MaintenanceFormToolbar.  Sorry.
Post #2904
Posted 09/19/2006 1:24:28 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/09/2008 2:20:16 PM
Posts: 436, Visits: 944
Would it be possible to add buttons to the ToolStrip if I were using just a SF Maintenance form without the DevExpress stuff?
Post #2907
Posted 09/19/2006 1:26:17 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 6:26:12 PM
Posts: 4,901, Visits: 4,887
Yes, but they would have to be at the very end.  They could not be injected between the existing button controls.
Post #2908
Posted 09/19/2006 1:32:28 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/09/2008 2:20:16 PM
Posts: 436, Visits: 944
Cool. Let me push a little further. I noticed that if i add a button using the shortcut there on the toolstrip you're right I could not move my item to the left... however when i went into the items collection through the properties menu i was able to position my button wherever i wanted it.

I guess I'm asking why you're telling me I can't inject my buttons inbetween your standard items? Will it mess up the code because the indexes arent the same or what?

Thanks.
Post #2909
Posted 09/19/2006 1:53:40 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 12/09/2008 3:36:08 PM
Posts: 2,686, Visits: 1,891
No, the problem is the initialization order... the MaintenanceFormToolstrip has its own InitializeComponent() method that gets called when it is instantiated... inside this method, the standard buttons get added to the collection.  However, the buttons that you add to the toolstip get added in the form's InitializeComponent() method, which is called after the MaintenanceFormToolstrip's InitializeComponent() method.  So, the standard buttons have already been added to the toolstrip when your form goes to add the rest of the buttons, so your buttons get added to the end.  The designer will never generate the code to properly order the buttons.  However, the order of the buttons certainly does not matter, so you can add any code you want after the form's InitializeComponent() method (in the constructor) to order the buttons in any way you like, but you have to do it manually.


www.bungie.net
Post #2910
Posted 09/19/2006 2:09:18 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/09/2008 2:20:16 PM
Posts: 436, Visits: 944
Gotcha. Thanks
Post #2911
Posted 02/16/2007 7:01:29 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 11/19/2007 4:06:18 AM
Posts: 41, Visits: 99
Can you please tell me how can i set the index or order for the new button. i am asking you the property i should set for the new items (buttons) i added in the tool strip.

Thanks.
Post #6851
Posted 02/16/2007 7:17:54 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 6:26:12 PM
Posts: 4,901, Visits: 4,887
You would have to do this at run-time.  The MaintenanceFormToolstrip is nothing more than a pre-built toolstrip control with some built-in functionality.  You can reference the Items collection and do anything you want.  ANything you do at design-time is going to be over-written due to the nature of the collection and how it is managed through .NET.
Post #6854
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse