예제 #1
0
        public BandPanel(string caption, ContentPanel content, BandTagInfo bti)
        {
            BandButton bandButton = new BandButton(caption, bti);

            bandButton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;//設定文字對其方式
            Controls.Add(bandButton);
            Controls.Add(content);
        }
예제 #2
0
        public void AddBand(Image im, string caption, ContentPanel content, int setIndex = -1)
        {
            content.outlookBar = this;
            int index;

            if (setIndex < 0)//為了日後手動指定做修改 at 2017/09/11
            {
                index = Controls.Count;
            }
            else
            {
                index = setIndex;
            }
            BandTagInfo bti       = new BandTagInfo(this, index);
            BandPanel   bandPanel = new BandPanel(im, caption, content, bti);

            Controls.Add(bandPanel);
            UpdateBarInfo();
            RecalcLayout(bandPanel, index);
        }