property ComboBox.AdjustSearchColumn as Boolean
Returns or sets a property that indicates whether the SearchColumnIndex could point to a hidden column.

 TypeDescription 
   Boolean A boolean expression that indicates whether the control adjusts the SearchColumnIndex property to point to a visible column.  
By default, the AdjustSearchColumn property is True. If the AdjustSearchColumn property is True, when the user hides a column using the Visible property, the SearchColumnIndex property gets a new value in order to point to a visible column. The SearchColumnIndex property indicates the column being displayed in the control's label area, when SingleEdit property is True.  Use the AdjustSearchColumn property to let the control to display a hidden column in the control's label area. 

For instance, lets say that we have a drop down window with some information and we need to display other information in the control's label when the user selects an item. The sample adds two columns, one is displayed in the drop down window, and the second column ( hidden column ) is displayed on the control's label.  

The VB sample looks like follows:

If we show the "Hidden" column like the sample looks like follows:

For instance you can use this feature if the Style property is DropDownList property to display an owner draw cell in the control's label area. Use the CellOwnerDraw property to draw a cell.

The following sample displays the list of items being checked separated by comma using the control's owner draw feature ( you are simulating a check list editor ):

The sample adds two columns. The hidden column is used to let user paint whatever he needs.

The following C++ sample adds two columns, and displays values from the hidden column when a new items is selected:

The following VB.NET sample adds two columns, and displays values from the hidden column when a new items is selected:

The following C# sample adds two columns, and displays values from the hidden column when a new items is selected:

The following VFP sample adds two columns, and displays values from the hidden column when a new items is selected:

 

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.