■ BarManager 클래스 : 바 관리자 생성하기

------------------------------------------------------------------------------------------------------------------------


TestProject.zip


MainForm.cs

 

 

using DevExpress.XtraEditors;

using DevExpress.XtraBars;

 

namespace TestProject

{

    /// <summary>

    /// 메인 폼

    /// </summary>

    public partial class MainForm : XtraForm

    {

        //////////////////////////////////////////////////////////////////////////////////////////////////// Field

        ////////////////////////////////////////////////////////////////////////////////////////// Private

 

        #region Field

 

        /// <summary>

        /// 바 관리자

        /// </summary>

        private BarManager barManager;

 

        #endregion

 

        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor

        ////////////////////////////////////////////////////////////////////////////////////////// Public

 

        #region 생성자 - MainForm()

 

        /// <summary>

        /// 생성자

        /// </summary>

        public MainForm()

        {

            InitializeComponent();

 

            this.barManager = new BarManager();

 

            this.barManager.Form = this;

 

            this.barManager.BeginUpdate();

 

            Bar mainBar   = new Bar(this.barManager, "메인 메뉴") { DockStyle = BarDockStyle.Top   , DockRow = 0 };

            Bar statusBar = new Bar(this.barManager, "상태바"   ) { DockStyle = BarDockStyle.Bottom              };

            Bar fileBar   = new Bar(this.barManager, "파일 툴바") { DockStyle = BarDockStyle.Top                 };

 

            this.barManager.Bars.Add(mainBar  );

            this.barManager.Bars.Add(statusBar);

            this.barManager.Bars.Add(fileBar  );

 

            this.barManager.MainMenu  = mainBar;

            this.barManager.StatusBar = statusBar;

 

            this.barManager.EndUpdate();

        }

 

        #endregion

    }

}

 

------------------------------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요