Current location: Hot Scripts Forums » Programming Languages » Windows .NET Programming » [SOLVED] [2005] ComboBox: Relation between ItemHeight and MaxDropDownItems?


[SOLVED] [2005] ComboBox: Relation between ItemHeight and MaxDropDownItems?

Reply
  #1 (permalink)  
Old 04-21-08, 06:07 PM
tim8w tim8w is offline
Wannabe Coder
 
Join Date: Nov 2004
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy [SOLVED] [2005] ComboBox: Relation between ItemHeight and MaxDropDownItems?

What is the relationship between ItemHeight and MaxDropDownItems? I would have thought that the total DropDownHeight would be a multiple of the two. It doesn't appear to be. Anyone know the answer to this?
Reply With Quote
  #2 (permalink)  
Old 04-21-08, 08:06 PM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
ItemHeight, is used in ListBoxes to vary the height of an item in the list.
All items in the list can have the same height or they can each have different heights.

MaxDropDownItems, is used with DropDownBoxes to limit the number of items that will be displayed when the DropDownBox is open. Default Max is 100.
__________________
Jerry Broughton
Reply With Quote
  #3 (permalink)  
Old 04-21-08, 10:46 PM
tim8w tim8w is offline
Wannabe Coder
 
Join Date: Nov 2004
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
Cool

job0107,
I know what they are. I'm trying to have 20 items displayed in a DropDown all 25 pixels high. They problem is that the higher the ItemHeight, the less items that get displayed...
Reply With Quote
  #4 (permalink)  
Old 04-23-08, 12:56 AM
tim8w tim8w is offline
Wannabe Coder
 
Join Date: Nov 2004
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Resolved: [2005] ComboBox: Relation between ItemHeight and MaxDropDownItems?

Figured out what I was looking for.

Here's the two modes in question:

ComboBox.DrawMode = DrawMode.OwnerDrawVariable

(1) MeasureItem gets called and ItemHeight can be modified. Each item can have a "Variable" height set for it.
(2) MaxDropDownItems never is reached because of the variable ItemHeight.

ComboBox.DrawMode = DrawMode.OwnerDrawFixed

(1) MeasureItem doesn't get called and there is no way to set the ItemHeight. Each item has a fixed height.
(2) MaxDropDownItems are displayed.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 02:16 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.