private void OnMouseMove(object sender, MouseEventArgs args) { m_IconPanel.resetPanelTextBackColor(); ////2017/01/09 BackColor = System.Drawing.SystemColors.GradientActiveCaption; //Color.LightCyan; BorderStyle = BorderStyle.FixedSingle; if (m_PanelIcon != null) { m_PanelIcon.BackColor = System.Drawing.SystemColors.GradientActiveCaption;//Color.LightCyan; //2016/01/08 disable-> m_PanelIcon.BorderStyle = BorderStyle.FixedSingle; } Cursor.Current = Cursors.Hand;//變換滑鼠 }
private void RecalcLayout(BandPanel bandPanel, int index) { int vPos = (index <= selectedBand) ? buttonHeight * index : buttonHeight * index + selectedBandHeight; int height = selectedBand == index ? selectedBandHeight + buttonHeight : buttonHeight; // the band dimensions bandPanel.Location = new Point(0, vPos); bandPanel.Size = new Size(ClientRectangle.Width, height); // the contained button dimensions bandPanel.Controls[0].Location = new Point(0, 0); bandPanel.Controls[0].Size = new Size(ClientRectangle.Width, buttonHeight); // the contained content panel dimensions bandPanel.Controls[1].Location = new Point(0, buttonHeight); bandPanel.Controls[1].Size = new Size(ClientRectangle.Width - 2, height - 8); IconPanel IP = (IconPanel)bandPanel.Controls[1]; IP.resetPanelTextBackColor(1);//2016/01/08 避免系統反應太慢,造成畫面出現一個以上的選擇UI }