as i wanted to ask a while ago:
why can't i uninstall stimulsoft on vista? i have the demo and the licenced version installed.
cause on another pc my code works, can you give me instructions how to remove (both) and reinstall the (licenced) package?
Problem disabling menu and toolbar items
Problem disabling menu and toolbar items
Hello,
It is true that in Ribbon interface now you can disable only whole panel and not some individual buttons.
The following code disables and enables Save buttons without any problems:
Please check that you have all necessary rights as an Administrator when you install/uninstall packages.
You can also uninstall any version 'by hand'. For this just open the following folder:
c:\windows\assembly in Windows Explorer and remove 'Stimulsoft' libraries from there.
Dlls of new versions you can drag and drop in that folder.
Also you need to delete the Tab in Toolbox of the Visual Studio and add it again with link to new dlls.
P.S. 2008.2 version must be installed on Vista 32/64 without any problems, because now we are using third-party installer and it does not have any problems with installing.
Thank you.
The code is correct and must work as for enabling and for disabling buttons as well.stefan_l wrote:
i'm having problems with the StiDesignerControl concerning disabling save-buttons.
all was working fine with this code in "form1.initialize":
StiReport.ClearImageCache();
StiReport.ClearReportCache();
Stimulsoft.Report.Design.Toolbars.StiStandardToolbarService.GetService().ShowReportSave = false;
StiMainMenuService mainMenuService = StiMainMenuService.GetService();
mainMenuService.ShowFileReportSave = false;
mainMenuService.ShowFilePageSaveAs = false; // doesn't work in ribbon style anyway
StiDesigner.DontAskSaveReport = true;
StiDesigner.SavingReport += new StiSavingObjectEventHandler(StiSavingDocument);
report = new StiReport();
report.Designer = new StiDesigner();
report.Designer.UseAliases = false;
which (don't ask me why exactly the last two lines were necessary) disabled the save-buttons of my form2.stidesignercontrol1 when i assigned report to form2.stidesignercontrol1.Report over a setter and form2.showed it. in standalone-designer i was not able to get this running (disabling buttons).
but now i'm trying to enable the save-buttons fromout form2 again in certain circumstances (e.g. after a save-as processed). unfortunately i don't have much experience with services and am wondering when/how to do this.
ps: reading all these comments that all didn't work when i tried it out tell me that it might not be very easy to disable/enable the save buttons as one wants at runtime. also a comment whether this is supported or not would be helpful.
It is true that in Ribbon interface now you can disable only whole panel and not some individual buttons.
pps: the main problem is: each time this code in the constructor is processed
public DesignerForm()
{
InitializeComponent();
StiStandardToolbarService.GetService().ServiceEnabled = false;
StiMainMenuService.GetService().ServiceEnabled = false;
StiConfig.Services.Add(toolbarService);
StiConfig.Services.Add(mainMenuService); StiConfig.Save();
}
StiStandardToolbarService toolbarService = StiStandardToolbarService.GetService();
StiMainMenuService mainMenuService = StiMainMenuService.GetService();
the designerform will jump to the dispose method after assigning a report to it
public void assignreport(StiReport r)
{
this.stiDesignerControl1.Report = r;
this.stiDesignerControl1.ReportFileName = r.ReportName;
}
even if you take the code out again, the services block up something... that means on vista i'm dependant on system restore now to continue developing and would like to know the exact solution or "not possible to disable save-button while designerform is shown" by you.
The following code disables and enables Save buttons without any problems:
Code: Select all
Stimulsoft.Report.Design.Toolbars.StiStandardToolbarService.GetService().ShowReportSave = !Stimulsoft.Report.Design.Toolbars.StiStandardToolbarService.GetService().ShowReportSave;
StiMainMenuService mainMenuService = StiMainMenuService.GetService();
mainMenuService.ShowFileReportSave = !mainMenuService.ShowFileReportSave;
mainMenuService.ShowFilePageSaveAs = !mainMenuService.ShowFilePageSaveAs; // doesn't work in ribbon style anyway
StiReport report = new StiReport();
report.Design();
You can also uninstall any version 'by hand'. For this just open the following folder:
c:\windows\assembly in Windows Explorer and remove 'Stimulsoft' libraries from there.
Dlls of new versions you can drag and drop in that folder.
Also you need to delete the Tab in Toolbox of the Visual Studio and add it again with link to new dlls.
P.S. 2008.2 version must be installed on Vista 32/64 without any problems, because now we are using third-party installer and it does not have any problems with installing.
Thank you.