2011-09-26 1 views

답변

2

언급 한대로, ToolStripControlHostToolStripDesignerAvailability 속성을 사용했다.

자세한 내용은 here

1

가장 쉬운 방법은 StatusStrip에서 제어하는 ​​다음 ToolStripComboBox의를 사용하여 자신을 그림과 장소를하는 것입니다 ... 상태 표시 줄에 여러 열 콤보 상자가 필요합니다. ToolStripComboBox는 derives from the ToolStripControlHost이므로 일반 ComboBox와 다릅니다.

Private Sub comboStatus_DrawItem(ByVal sender As Object, ByVal e As DrawItemEventArgs) 
    Dim comboStatus As ComboBox = sender 
    e.DrawBackground() 

    If e.Index > -1 Then 
    //Do you drawing. 
    End If 
End Sub 

그리기 자세한 내용은 ComboBox.DrawItem Event 참조 :

Dim comboStatus As New ToolStripComboBox 
With DirectCast(comboStatus.Control, ComboBox) 
    .DrawMode = DrawMode.OwnerDrawFixed 
    AddHandler .DrawItem, AddressOf comboStatus_DrawItem 
End With 
StatusStrip1.Items.Add(comboStatus) 

그리고는 당신이 DrawItem 이벤트를 사용합니다.

+0

우리는 Infragistics UltraCombo foe 2 열 콤보 박스를 사용합니다 ... 그래서 문제는 UltraCombo를 StatusStrip에 통합하는 것입니다 ... – serhio