Control designer setting in code

Stimulsoft Reports.NET discussion
Post Reply
shmuly
Posts: 58
Joined: Wed Jul 05, 2006 2:19 pm

Control designer setting in code

Post by shmuly »

Is there a way to control the settings in the designer via code? I am not looking to control which buttons show up as that is documented. I want to allow the user to show and hide the band headers but I want it to be turned off by default.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Control designer setting in code

Post by Jan »

Hello,

You can use following code:

Code: Select all

StiSettings.Load();
StiSettings.Set("StiDesigner", "ShowHeaders", false);
StiSettings.Save();
Thank you.
shmuly
Posts: 58
Joined: Wed Jul 05, 2006 2:19 pm

Control designer setting in code

Post by shmuly »

Thanks for the response.

1 - Just to confirm, the user will still have the option to turn it back on via the toolbar,
2 - Is there a list of all the available settings that can be set?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Control designer setting in code

Post by Jan »

Hello,

Please check code below:

Code: Select all

StiSettings.Set("StiDesigner", "AlignToGrid", info.AlignToGrid);
				StiSettings.Set("StiDesigner", "ShowGrid", info.ShowGrid);
				StiSettings.Set("StiDesigner", "ShowHeaders", info.ShowHeaders);
				StiSettings.Set("StiDesigner", "ShowOrder", info.ShowOrder);
				StiSettings.Set("StiDesigner", "ShowRulers", info.ShowRulers);
				StiSettings.Set("StiDesigner", "RunDesignerAfterInsert", info.RunDesignerAfterInsert);
				StiSettings.Set("StiDesigner", "UseLastFormat", info.UseLastFormat);
				StiSettings.Set("StiDesigner", "AutoSaveReportToReportClass", info.AutoSaveReportToReportClass);
				StiSettings.Set("StiDesigner", "ShowDimensionLines", info.ShowDimensionLines);
				StiSettings.Set("StiDesigner", "GenerateLocalizedName", info.GenerateLocalizedName);

				StiSettings.Set("StiDesigner", "GridSizeCentimetres", info.GridSizeCentimetres);
				StiSettings.Set("StiDesigner", "GridSizeMillimeters", info.GridSizeMillimeters);
				StiSettings.Set("StiDesigner", "GridSizeInch", info.GridSizeInch);
				StiSettings.Set("StiDesigner", "GridSizeHundredthsOfInch", info.GridSizeHundredthsOfInch);
				StiSettings.Set("StiDesigner", "GridSizePixels", info.GridSizePixels);
		
				StiSettings.Set("StiDesigner", "FillBands", info.FillBands);
				StiSettings.Set("StiDesigner", "FillCrossBands", info.FillCrossBands);
				StiSettings.Set("StiDesigner", "FillContainer", info.FillContainer);
				StiSettings.Set("StiDesigner", "FillComponent", info.FillComponent);
				StiSettings.Set("StiDesigner", "UseComponentColor", info.UseComponentColor);
				StiSettings.Set("StiDesigner", "QuickInfoOverlay", info.QuickInfoOverlay);

				StiSettings.Set("StiDesigner", "DrawMarkersWhenMoving", info.DrawMarkersWhenMoving);
				StiSettings.Set("StiDesigner", "MarkersStyle", info.MarkersStyle);
				StiSettings.Set("StiDesigner", "GridMode", info.GridMode);
				StiSettings.Set("StiDesigner", "QuickInfoType", info.QuickInfoType);

				StiSettings.Set("StiDesigner", "DrawEventMarkers", info.DrawEventMarkers);
				StiSettings.Set("StiDesigner", "Zoom", info.Zoom);
				StiSettings.Set("StiDesigner", "ViewMode", info.ViewMode);
Thank you.
Post Reply