MaintenanceFormToolbar question...


Author
Message
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
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.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
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. Ermm
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
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?
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Yes, but they would have to be at the very end.  They could not be injected between the existing button controls.
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Cool. Let me push a little further. BigGrin 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.Wink
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Gotcha. Thanks Smile
Vikram Saxena
Vikram Saxena
StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)
Group: Forum Members
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.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
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.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search