Designer: i don't want to save "View" settings
- Fabio Pagano
- Posts: 355
- Joined: Mon Apr 16, 2007 12:38 pm
- Location: Bari (Italy)
Designer: i don't want to save "View" settings
In designer, if user closes the dictionary (toggling "View / Dictionary"), this setting is "remembered" next time, so dictionary won't appear. I want to ignore this setting and i want to force to always show the dictionary panel. But i don't want to disable "View / Dictionary" (so that user can't toggle), i only want not to remember the setting so that dictionary panel will always be visible.
Thanks.
Thanks.
Designer: i don't want to save "View" settings
All settings of the Designer's layout are stored in the DockingPanels.config file. This file is located in the following path:
c:\Documents and Settings\"USER ACCOUNT NAME"\Local Settings\Application Data\Stimulsoft\
So changing of this settings allows you to remember visibility of the Dictionary.
Thank you.
c:\Documents and Settings\"USER ACCOUNT NAME"\Local Settings\Application Data\Stimulsoft\
So changing of this settings allows you to remember visibility of the Dictionary.
Thank you.
- Fabio Pagano
- Posts: 355
- Joined: Mon Apr 16, 2007 12:38 pm
- Location: Bari (Italy)
Designer: i don't want to save "View" settings
If i have correctly understood, this doesn't answer to my question. I always want to show the dictionary panel, ignoring user last choice.
Thanks.
Thanks.
Designer: i don't want to save "View" settings
You can enable the Dictionary in runtime via the following code
If necessary, we can add such an option for the report settings.
Thank you.
Code: Select all
StiDictionaryPanelService dictionary = new StiDictionaryPanelService();
dictionary.Init(designer);
Thank you.
- Fabio Pagano
- Posts: 355
- Joined: Mon Apr 16, 2007 12:38 pm
- Location: Bari (Italy)
Designer: i don't want to save "View" settings
Help me to understand. I don't use internal report code, so i do all settings from my vb.net program. So in my vb.net program i have tried the following:Edward wrote:You can enable the Dictionary in runtime via the following code
If necessary, we can add such an option for the report settings.Code: Select all
StiDictionaryPanelService dictionary = new StiDictionaryPanelService(); dictionary.Init(designer);
Code: Select all
Dim DictionaryPanelService As Stimulsoft.Report.Design.Panels.StiDictionaryPanelService = Stimulsoft.Report.Design.Panels.StiDictionaryPanelService.GetService
DictionaryPanelService.Init(myReport.Designer)
So i assume that the code you have given was intended for internal report code. Instead, as above said, i need to make the dictionary always visible from my vb.net code.
Note that this is not a "must" in my application, it's only a "security behavior" so that if the user closes the dictionary panel, next time it appears anyway.
If, as you said, to "add an option for the report settings" means that i can do this from my code, to me it would be ok.
Thanks.
Designer: i don't want to save "View" settings
Please place this code in the LoadingEvent of the main form in your application.
Also please define a method, as following:
After that the designer will be always visible even if the user closes it in the previous run.
Thank you.
Code: Select all
AddHandler StiDesigner.LoadingDesigner, New EventHandler(AddressOf Me.StiDesigner_LoadingDesigner)
Code: Select all
Private Sub StiDesigner_LoadingDesigner(ByVal sender As Object, ByVal e As EventArgs)
New StiDictionaryPanelService().Init(TryCast(sender,StiDesigner))
End Sub
Thank you.
Designer: i don't want to save "View" settings
The null reference exception occurs when designer is not created. It is the reason I think in your code.
We've added StiDesigner.LoadedDesigner static event in the build from August, 22. So tomorrow you will be able to download it.
Please see the code which guarantees that Dictionary always be visible even if the user closes the dictionary in the previous session.
Please add the following command to your Application when it is executed only once, e.g. in the Load event of the main form in your application:
Also please define the following method:
Thank you.
We've added StiDesigner.LoadedDesigner static event in the build from August, 22. So tomorrow you will be able to download it.
Please see the code which guarantees that Dictionary always be visible even if the user closes the dictionary in the previous session.
Please add the following command to your Application when it is executed only once, e.g. in the Load event of the main form in your application:
Code: Select all
AddHandler StiDesigner.LoadedDesigner, New EventHandler(AddressOf Me.StiDesigner_LoadedDesigner)
Code: Select all
Private Sub StiDesigner_LoadedDesigner(ByVal sender As Object, ByVal e As EventArgs)
Dim dockingPanel As StiDockingPanel
Dim designer As StiDesigner = TryCast(sender,StiDesigner)
Dim serviceDictionary As StiPanelService = StiDictionaryPanelService.GetService(designer)
If Not serviceDictionary.DockingControl.IsVisible Then
designer.DockingManager.ClosedControls.Remove(serviceDictionary.DockingControl)
dockingPanel = New StiDockingPanel(designer.DockingManager)
dockingPanel.Controls.Add(serviceDictionary.DockingControl)
dockingPanel.DockPanelToForm(designer, serviceDictionary.DockStyle)
End If
End Sub
- Fabio Pagano
- Posts: 355
- Joined: Mon Apr 16, 2007 12:38 pm
- Location: Bari (Italy)
Designer: i don't want to save "View" settings
Sorry, i don't find in what namespace is "StiDockingPanel".
Thanks.
Thanks.
Designer: i don't want to save "View" settings
StiDockingPanel is placed in the "Stimulsoft.Controls" namespace.
Thank you.
Thank you.
- Fabio Pagano
- Posts: 355
- Joined: Mon Apr 16, 2007 12:38 pm
- Location: Bari (Italy)
Designer: i don't want to save "View" settings
I'm resuming this thread because now i'm converting from version 2008.2.247.0 of 03/06/2008 to version 2008.3.311.0 of 19/11/2008.
I have the following code to always show the dictionary panel in designer, and it worked with 2008.2.247.0 version:
With 2008.3.311.0 version i have some errors, example:
Dim serviceDictionary As Stimulsoft.Report.Design.Panels.StiPanelService = Stimulsoft.Report.Design.Panels.StiDictionaryPanelService.GetService(designer)
gives
"Value of type 'Stimulsoft.Report.Design.StiDesigner' cannot be converted to 'Stimulsoft.Report.Design.StiDesignerControl'
How can i, in version 2008.3.311.0, always show the Dictionary panel in the designer?
Thank you.
I have the following code to always show the dictionary panel in designer, and it worked with 2008.2.247.0 version:
Code: Select all
Private Sub StiDesigner_LoadedDesigner(ByVal sender As Object, ByVal e As EventArgs)
Dim dockingPanel As Stimulsoft.Controls.StiDockingPanel
Dim designer As Stimulsoft.Report.Design.StiDesigner = TryCast(sender, Stimulsoft.Report.Design.StiDesigner)
Dim serviceDictionary As Stimulsoft.Report.Design.Panels.StiPanelService = Stimulsoft.Report.Design.Panels.StiDictionaryPanelService.GetService(designer)
If Not serviceDictionary.DockingControl.IsVisible Then
designer.DockingManager.ClosedControls.Remove(serviceDictionary.DockingControl)
dockingPanel = New Stimulsoft.Controls.StiDockingPanel(designer.DockingManager)
dockingPanel.Controls.Add(serviceDictionary.DockingControl)
dockingPanel.DockPanelToForm(designer, serviceDictionary.DockStyle)
End If
End Sub
Dim serviceDictionary As Stimulsoft.Report.Design.Panels.StiPanelService = Stimulsoft.Report.Design.Panels.StiDictionaryPanelService.GetService(designer)
gives
"Value of type 'Stimulsoft.Report.Design.StiDesigner' cannot be converted to 'Stimulsoft.Report.Design.StiDesignerControl'
How can i, in version 2008.3.311.0, always show the Dictionary panel in the designer?
Thank you.