How can I use a drop down list as header.
You can do it like this:
// Apply combobox to a specific header
SetStyleRange(CGXRange(0,nCol),
CGXStyle( )
.SetControl(GX_IDS_CTRL_CBS_DROPDOWNLIST)
.SetHorizontalAlignment(DT_CENTER)
.SetWrapText(FALSE)
.SetVerticalAlignment(DT_VCENTER)
.SetFont(CGXFont( ).SetBold(TRUE))
.SetChoiceList("Dan D.\nBob L.\nGail J.\nJean J.\nBill B.\nBob M.")
.SetValue("Photographers") );
// - Or -
// Apply combobox to all headers
RowHeaderStyle( )
.SetControl(GX_IDS_CTRL_CBS_DROPDOWNLIST)
.SetHorizontalAlignment(DT_CENTER)
.SetWrapText(FALSE)
.SetVerticalAlignment(DT_VCENTER)
.SetFont(CGXFont( ).SetBold(TRUE))
.SetChoiceList("Dan D.\nBob L.\nGail J.\nJean J.\nBill B.\nBob M.")
.SetValue("Photographers") );
You need to also turn off selecting whole columns when clicking on a column header (see also: 'How can I disable users selecting cells with the mouse?’).