Objective Grid: Enabling listbox mode

Article ID: 113
Last updated: 11 Apr, 2018
Article ID: 113
Last updated: 11 Apr, 2018
Revision: 3
Views: 2073
Posted: 09 Jan, 2001
by Meltreger B.
Updated: 11 Apr, 2018
by Meltreger B.

Problem


How can I create a grid with listbox functionality?


Cause



Action


The following example shows you how to enable listbox-mode:

//////////////////////////////////////////////////////////////////
void CMyGridView::OnInitialUpdate( )
{
CGXRecordView::OnInitialUpdate( );

// Initialize default style
StandardStyle( ).SetControl(GX_IDS_CTRL_STATIC);
SetReadOnly(TRUE);

// Initialization for listbox-mode
HideCols(0, 0);
CGXProperties* pProp = GetParam( )->GetProperties( );
pProp->SetDisplayHorzLines(FALSE);
pProp->SetDisplayVertLines(FALSE);
GetParam( )->SetActivateCellFlags(FALSE);
GetParam( )->EnableMoveCols(FALSE);
GetParam( )->EnableSelection(GX_SELFULL);
GetParam( )->SetSpecialMode(GX_MODELBOX_SS);
GetParam( )->SetHideCurrentCell(GX_HIDE_ALLWAYS);

// select first row
SetCurrentCell(1,0);
SelectRange(CGXRange( ).SetTable( ), FALSE);
SelectRange(CGXRange( ).SetRows(1), TRUE);

}

This article was:   Helpful | Not helpful
Report an issue
Article ID: 113
Last updated: 11 Apr, 2018
Revision: 3
Views: 2073
Posted: 09 Jan, 2001 by Meltreger B.
Updated: 11 Apr, 2018 by Meltreger B.

Others in this category