Objective Grid: Drawing text in a combobox cell

Article ID: 526
Last updated: 16 Apr, 2018
Article ID: 526
Last updated: 16 Apr, 2018
Revision: 3
Views: 2134
Posted: 19 Jan, 2001
by Meltreger B.
Updated: 16 Apr, 2018
by Meltreger B.

Problem


How can I tell the combo box control that it should draw text in the whole cell when no push button is visible


Cause



Action


You may set

m_bInactiveDrawAllCell = TRUE;

This is a new attribute in the CGXComboBox and CGXComboBoxWnd class.

You can set this attribute when registering the control in your OnInitialUpdate( ) method.

Example:

// allow user to input any text
{
CGXComboBox* pWnd = new CGXComboBox(this, GX_IDS_CTRL_COMBOBOX, GX_IDS_CTRL_COMBOBOX+1, GXCOMBO_NOTEXTFIT);

// Draw text over push button when inactive
pWnd->m_bInactiveDrawAllCell = TRUE;

RegisterControl(GX_IDS_CTRL_COMBOBOX, pWnd);

}

Now, when you apply the GX_IDS_CTRL_COMBOBOX combo box to your cells, they will all draw the text over the push button when the push button is invisible.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 526
Last updated: 16 Apr, 2018
Revision: 3
Views: 2134
Posted: 19 Jan, 2001 by Meltreger B.
Updated: 16 Apr, 2018 by Meltreger B.

Others in this category