DevExpress MaintenanceFormBarManager - Adding Items to standard toolbar


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yeah, it can be a little cumbersome at times, but I am glad you got it going Smile
Fabian R Silva, -
Fabian R Silva, -
StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
Thanks Trent, you point me in the right direction, the .net toolbars are a little complicatted and a little more the devexpress one :/ I see that devexpress stuff is sometimes over complicated...
I created another bar in the  MaintenanceFormBarManager1 on my "base class" form and put on it needed buttons, and on the new() constructor of this I put:

'bars(0) is the Devexpress SF maintenance toolbar, I don't like to use whole row...
Me.MaintenanceFormBarManager1.Bars(0).OptionsBar.UseWholeRow = False

'The dockcol, dockrow and offset properties don't appears on the designer, but I see it with the savelayout method on the barmanager.........I save 2 xml, 1 before and 1 after change things... and compare them.
'Dim fileName As String = "c:\XtraBars_test.xml"
'Me.MaintenanceFormBarManager1.SaveLayoutToXml(fileName)
With
myAnotherToolbar
    .DockCol = 1
    .
DockRow = 0
    .
Offset = 366
End With

I change the private to public modifier on MaintenanceFormBarManager1 to allow me later to add new bars in runtime to the same manager (via code, the designer on the subclassed form put this on read only mode) and then I can create new bars, with new buttons and add this to the manager :/ (not tested yet)
I not found a better solution... but this seems that will work Smile thanks for your great help.

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
This is one of the issues that I have with the way that DevExpress manages their toolbars.  They have their own toolbar class and manager, and when set in code, it doesn't really place nice with the form designer serialization.

This is one of those things that I would have to play with on the DevExpress side to tell you what to change because off of the top of my head I really don't know.  We don't use DevExpress so I am not as familiar with their controls.  Sorry that I don't have a straight answer for you, but it took some effort to reproduce the MaintenanceFormToolstrip behavior with their controls because they use a ManagerControl that is a component and manages all other bars...so this will probably be one of those things that you just use the designer to get the buttons, etc. on the bar, then in the New or OnLoad of the form set the position of the bar to the desired location.  This is the approach that we use to try to get the MaintenanceFormToolstrip setup.

Fabian R Silva, -
Fabian R Silva, -
StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
Hello, sorry for revive this post, I have a similar problem and don't found it on the forum.



I have a problem with the devexpress wrapper and DevEx.MaintenanceFormToolbar/BarManager.



I try to put some buttons on the Maitenance ToolBar ("MaintenanceFormTools") but when I close and open the designer it don't save the changes, then I created another toolbar, I set the property optionbar.usewholerow on false in the Maitenance ToolBar, created another toolbar and it allow me to put on this new toolbar buttons, but when I close and open the designer... again the property "usewholerow" is set to "true" and can't put the new toolbar on the same line, I try to inherit the maintenance bar manager and maintenance toolbar witout success, I cannot change the properties of the toolbar, and some errors appears.

I have to modify the source code and recompile or I have another option to change the "usewholerow" on the form designer?



I attached two images, one with usewholerow (bad) and one witout it (good, the one with usewholerow = false), the good example, when I close and open the designer, becomes bad again...



sorry for me bad english w00t and thanks guys for the great support



- Fabian
Attachments
good.jpg (145 views, 24.00 KB)
bad.jpg (146 views, 19.00 KB)
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You can create an new toolbar (or just a class) that inherits from MaintenanceFormToolStrip and add the new buttons to it.  That new toolbar will then show up in your toolbox and can be dropped on a form just like the default MaintenanceFormToolstrip.
Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I have added three extra buttons on the standard tool bar beside the navigation buttons, however they only show up in designTime mode and not in run-time. Is there anyway to make these buttons visible at run-time?  If I place the buttons on a new toolbar it works fine but I want to keep all the buttons on one toolbar. 
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