HeaderPane
Main
Hide
Share Link
Print

ShowHeaderDropDown

Defines the presence of column headers in the dropdown portion.

C

BOOL WINAPI SftBox_GetShowHeaderDropDown(HWND hwndCtl);
void WINAPI SftBox_SetShowHeaderDropDown(HWND hwndCtl, BOOL fSet);

C++

BOOL CSftBox::GetShowHeaderDropDown() const;
void CSftBox::SetShowHeaderDropDown(BOOL fSet);

Parameters

hwndCtl

The window handle of the combo box control.

fSet

Set to TRUE to show column headers in the dropdown portion, otherwise set to FALSE to hide the column headers.

Returns

GetShowHeaderDropDown returns TRUE if column headers are shown in the dropdown portion, otherwise FALSE is returned.

Comments

The GetShowHeaderDropDown and SetShowHeaderDropDown functions define the presence of column headers in the dropdown portion.

Column headers can be shown in the dropdown portion, in the static portion (see SetShowHeaderMain) or both. The column headers of both portions use the same column definitions (see SetColumns).

The column headers are displayed as buttons if the column header display style is SFTBOX_COLSTYLE_BUTTONTEXT, otherwise they are displayed as titles. The display style is defined using SetHeaderStyle.

SetShowHeader with SFTBOX_COLSTYLE_NONE also hides the column headers in the dropdown portion. SetShowHeader with any other style leaves this setting unchanged.

Examples

C View entire sample code

{
    SFTBOX_COLUMN aCols[2];
    LONG index;
    int i;

    InitColumn(&aCols[0], 0, 100, TEXT("Color"));
    InitColumn(&aCols[1], 1, 100, TEXT("Description"));
    SftBox_SetColumns(hwndBox, 2, aCols);
    SftBox_SetShowHeaderDropDown(hwndBox, TRUE);// Column titles in the dropdown only
    SftBox_SetDroppedHeight(hwndBox, 12);       // Show up to 12 items
    SftBox_SetDropDownOptimalWidth(hwndBox, TRUE);// The dropdown is as wide as its columns
    SftBox_SetDisableNoScroll(hwndBox, TRUE);   // Scroll bars always shown, needed for the sizing box
    SftBox_SetShowResizer(hwndBox, TRUE);       // The user can resize the dropdown
    SftBox_SetDarkMode(hwndBox, SFTBOX_DARKMODE_AUTO);

    // Register the size of the cell pictures before adding items.

C++ View entire sample code

void CMainDlg::InitColorList(CSftBox& box, COLORREF custom, COLORREF selected)
{
    SFTBOX_COLUMN aCols[2];
    LONG index;

    InitColumn(&aCols[0], 0, 100, _T("Color"));
    InitColumn(&aCols[1], 1, 100, _T("Description"));
    box.SetColumns(2, aCols);
    box.SetShowHeaderDropDown(TRUE);    // Column titles in the dropdown only
    box.SetDroppedHeight(12);           // Show up to 12 items
    box.SetDropDownOptimalWidth(TRUE);  // The dropdown is as wide as its columns
    box.SetDisableNoScroll(TRUE);       // Scroll bars always shown, needed for the sizing box
    box.SetShowResizer(TRUE);           // The user can resize the dropdown
    box.SetDarkMode(SFTBOX_DARKMODE_AUTO);

    // Register the size of the cell pictures before adding items.

See Also C/C++ API | Categories | Notifications


Last Updated 11/21/2026 - (email)
© 2026 Softel vdm, Inc.