private void SetButtonText(TabBarButton btn, int index, ConnectionTag tag) { btn.HeadText = (index+1).ToString(); string t = tag.FormatTabText(); btn.Text = (t==null || t.Length==0)? " " : t; //�e�L�X�g�Ȃ�����HeadText��Ȃ��Ȃ��Ă��܂��̂ł�ނȂ���� }
private Control CreateNewButton(ConnectionTag ct) { TabBarButton b = new TabBarButton(); ct.Button = b; SetButtonText(b, Controls.Count-1, ct); _tabToolTip.SetToolTip(b, ct.FormatFrameText()); //b.Image = _imageList.Images[(int)e.item.Type]; b.Tag = ct; b.Font = _basicFont; b.Width = GetNecessaryButtonWidth(b); b.Visible = true; b.TabStop = false; b.Click += new EventHandler(this.OnButtonClick); b.MouseDown += new MouseEventHandler(OnMouseDown); b.MouseUp += new MouseEventHandler(OnMouseUp); b.MouseMove += new MouseEventHandler(OnMouseMove); return b; }