2016-07-22 2 views
2

선택 상자는, , 또는 핫 프레스드 정상, 장애인이 될 수 ComboBoxState을 보유하고 있습니다.ComboBox가 "뜨겁다"는 것은 무엇을 의미합니까?

처음 세 개는 분명해 보이지만 "덥다"는 무엇입니까?

+0

[VisualStyleElement.ComboBox.DropDownButton.Hot 재산권 (https://msdn.microsoft.com/en-us/library /system.windows.forms.visualstyles.visualstyleelement.combobox.dropdownbutton.hot(v=vs.110).aspx) – Fabio

+0

다음 링크를 참조하십시오. http://stackoverflow.com/questions/36287605/hot-tracking-list -item-selection-in-a-combo-box 도움이 되길 바랍니다. –

+0

하지만이 "뜨거운 상태"는 무엇입니까? 그것은 어떻게 생겼습니까? – Athena

답변

1

마우스가 컨트롤 위에있을 때 그건 :

protected override void OnPaint(PaintEventArgs e) { 
    int top = 16; 
    foreach (ComboBoxState cbs in new ComboBoxState[] { ComboBoxState.Normal, 
                 ComboBoxState.Disabled, 
                 ComboBoxState.Pressed, 
                 ComboBoxState.Hot}) { 
    Rectangle r = new Rectangle(16, top, 84, 21); 
    ComboBoxRenderer.DrawTextBox(e.Graphics, r, cbs); 
    TextRenderer.DrawText(e.Graphics, cbs.ToString(), this.Font, r, Color.Black); 
    ComboBoxRenderer.DrawDropDownButton(e.Graphics, 
             new Rectangle(16 + 84, top, 21, 21), cbs); 
    top += 23; 
    } 
} 

enter image description here

+0

아, 알겠습니다. 완전한. 고맙습니다! – Athena

관련 문제