Note that there are some explanatory texts on larger screens.

plurals
  1. PODisable editing child controls of custom DevComponents.DotNetBar control
    text
    copied!<p>I have created a new Custom Control inheriting from <code>Bar control</code> of <code>DevComponents.DotNetBar</code> controls. Next, I have created a new dock tab in it and have added my other controls to it.</p> <p>After I compile my Custom Control and add my created Custom Control in a new Windows Form, Dock Tab Controls are editable at design time.</p> <p>I don't want that anybody can edit these controls (Dock Tab Controls) in design time. How can I disable editing the controls at design time from the form (not the same as editing the control itself)?</p> <pre><code>public partial class barFloorsGrouping : Bar { public barFloorsGrouping() { InitializeComponent(); } [ReadOnly(true)] public new System.Windows.Forms.AccessibleRole AccessibleRole { get { return base.AccessibleRole; } private set { base.AccessibleRole = System.Windows.Forms.AccessibleRole.ToolBar; } } [Browsable(false), ReadOnly(true)] public new bool AlwaysDisplayDockTab { get { return base.AlwaysDisplayDockTab; } private set { base.AlwaysDisplayDockTab = true; } } [Browsable(false), ReadOnly(true)] public new bool AlwaysDisplayKeyAccelerators { get { return base.AlwaysDisplayKeyAccelerators; } private set { base.AlwaysDisplayKeyAccelerators = true; } } [ReadOnly(true)] public new bool AntiAlias { get { return base.AntiAlias; } private set { base.AntiAlias = true; } } [Browsable(false), ReadOnly(true)] public new bool AutoCreateCaptionMenu { get { return base.AutoCreateCaptionMenu; } } [ReadOnly(true)] public new bool AutoHide { get { return base.AutoHide; } } [Browsable(false), ReadOnly(true)] public new bool AutoHideTabTextAlwaysVisible { get { return base.AutoHideTabTextAlwaysVisible; } } [Browsable(false), ReadOnly(true)] public new bool AutoSyncBarCaption { get { return base.AutoSyncBarCaption; } private set { base.AutoSyncBarCaption = true; } } [Browsable(false), ReadOnly(true)] public new eBarType BarType { get { return base.BarType; } private set { base.BarType = eBarType.DockWindow; } } [ReadOnly(true)] public new bool CanAutoHide { get { return base.CanAutoHide; } } [ReadOnly(true)] public new bool CanDockTab { get { return base.CanDockTab; } private set { base.CanDockTab = false; } } [ReadOnly(true)] public new bool CanUndock { get { return base.CanUndock; } private set { base.CanUndock = false; } } [Browsable(false), ReadOnly(true)] public new bool CloseSingleTab { get { return base.CloseSingleTab; } } [Browsable(false), ReadOnly(true)] public new bool DisplayMoreItemsOnMenu { get { return base.DisplayMoreItemsOnMenu; } private set { base.DisplayMoreItemsOnMenu = true; } } [ReadOnly(true)] public new DockStyle Dock { get { return base.Dock; } } [Browsable(false), ReadOnly(true)] public new bool DockTabCloseButtonVisible { get { return base.DockTabCloseButtonVisible; } } [Browsable(false), ReadOnly(true)] public new bool FadeEffect { get { return base.FadeEffect; } private set { base.FadeEffect = true; } } [Browsable(false), ReadOnly(true)] public new eGrabHandleStyle GrabHandleStyle { get { return base.GrabHandleStyle; } private set { base.GrabHandleStyle = eGrabHandleStyle.Caption; } } [Browsable(false), ReadOnly(true)] public new eLayoutType LayoutType { get { return base.LayoutType; } private set { base.LayoutType = eLayoutType.DockContainer; } } [Browsable(false), ReadOnly(true)] public new bool MenuBar { get { return base.MenuBar; } } [Browsable(false), ReadOnly(true)] public new bool TabNavigation { get { return base.TabNavigation; } private set { base.TabNavigation = true; } } [Browsable(false), ReadOnly(true)] public new bool WrapItemsDock { get { return base.WrapItemsDock; } private set { base.WrapItemsDock = true; } } protected override void OnPaint(PaintEventArgs pe) { base.OnPaint(pe); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload