System.Windows.Forms.ComboBox.GetItemHeight C# (CSharp) Method

GetItemHeight() public method

public GetItemHeight ( int index ) : int
index int
return int
		public int GetItemHeight (int index)
		{
			if (DrawMode == DrawMode.OwnerDrawVariable && IsHandleCreated)
			{
				
				if (index < 0 || index >= Items.Count)
					throw new ArgumentOutOfRangeException ("The item height value is less than zero");
				
				object item = Items[index];
				if (item_heights.Contains (item))
					return (int)item_heights[item];
				
				//	MeasureItemEventArgs args = new MeasureItemEventArgs (DeviceContext, index, ItemHeight);
				//	OnMeasureItem (args);
				//	item_heights [item] = args.ItemHeight;
				return this.Height;
				//return args.ItemHeight;
			}
			
			return ItemHeight;
		}

Usage Example

Example #1
0
 /// <include file='doc\WinBarComboBox.uex' path='docs/doc[@for="ToolStripComboBox.GetItemHeight"]/*' />
 public int GetItemHeight(int index)
 {
     return(ComboBox.GetItemHeight(index));
 }
All Usage Examples Of System.Windows.Forms.ComboBox::GetItemHeight