Suppresses showing/hiding the drop down portion for the current event.
| C# | void object.Suppress(); |
| VB.NET | object.Suppress() |
| C++ | HRESULT object->Suppress(); |
| C | HRESULT object->raw_Suppress(); |
object
The Suppress method suppresses showing/hiding the drop down portion for the current event.
Once an ItemClick or ItemDblClk event is processed, the drop down portion may automatically become visible or may be hidden in response. This default action is built into the control. It is possible to suppress the default response by using the DropDown.Suppress method while handling the ItemClick or ItemDblClk event.
This method has no effect on a simple combo box.
{
switch (e.areaType) {
case SftBoxAreaConstants.areaSftBoxColumn:
if (e.colNum == 0)
SetSortDirection(!m_SortDirection);
break;
case SftBoxAreaConstants.areaSftBoxCellGraphic:
if (e.part == SftBoxPortionConstants.partSftBoxDropDown)
axSftBox1.DropDown.Suppress(); // Make sure we don't close the drop down
ToggleImage(axSftBox1.get_Cell(e.itemIndex, e.colNum).Image);
break;
case SftBoxAreaConstants.areaSftBoxItem:
if (e.part == SftBoxPortionConstants.partSftBoxDropDown)
axSftBox1.DropDown.Suppress(); // Make sure we don't close the drop down
ToggleImage(axSftBox1.get_Item(e.itemIndex).Image);
break;
Private Sub AxSftBox1_ItemClick(ByVal sender As Object, ByVal e As AxSftBoxLib60._ISftBoxEvents_ItemClickEvent) Handles AxSftBox1.ItemClick
Select Case e.areaType
Case SftBoxAreaConstants.areaSftBoxColumn
If e.colNum = 0 Then
SetSortDirection(Not m_SortDirection)
End If
Case SftBoxAreaConstants.areaSftBoxCellGraphic
If e.part = SftBoxPortionConstants.partSftBoxDropDown Then
AxSftBox1.DropDown.Suppress() ' Make sure we don't close the drop down
End If
ToggleImage(AxSftBox1.get_Cell(e.itemIndex, e.colNum).Image)
Case SftBoxAreaConstants.areaSftBoxItem
If e.part = SftBoxPortionConstants.partSftBoxDropDown Then
AxSftBox1.DropDown.Suppress() ' Make sure we don't close the drop down
End If
ToggleImage(AxSftBox1.get_Item(e.itemIndex).Image)
{
switch (AreaType) {
case areaSftBoxColumn:
if (ColNum == 0)
SetSortDirection(!m_fSortDirection);
break;
case areaSftBoxCellGraphic:
if (Part == partSftBoxDropDown)
m_vBox->DropDown->Suppress(); // Make sure we don't close the drop down
ToggleImage(m_vBox->Cell[ItemIndex][ColNum]->Image);
break;
case areaSftBoxItem:
if (Part == partSftBoxDropDown)
m_vBox->DropDown->Suppress(); // Make sure we don't close the drop down
ToggleImage(m_vBox->Item[ItemIndex]->Image);
break;See Also SftBoxDropDown Object | Object Hierarchy