Inherited ComboBox height won't change 
Author Message
 Inherited ComboBox height won't change

Hi,

I'm using VB.NET in an windows application project where
I have a own control that is inherited from System.Windows.Forms.ComboBox.

Now I'd like to change the height of the combobox but i seems impossible!
No matter how I try, it changes back to 24 px.

I'd tried to override DefaultSize property and changing Size och Height
but nothing happens.

The default height for a combobox is 21 px and thats fine with me, but why
do I get 24 px when I inherit it?

Thanks in advance,

Stefan Rotter



Sun, 26 Sep 2004 21:46:06 GMT  
 Inherited ComboBox height won't change
try changing the fontsize


Quote:
> Hi,

> I'm using VB.NET in an windows application project where
> I have a own control that is inherited from System.Windows.Forms.ComboBox.

> Now I'd like to change the height of the combobox but i seems impossible!
> No matter how I try, it changes back to 24 px.

> I'd tried to override DefaultSize property and changing Size och Height
> but nothing happens.

> The default height for a combobox is 21 px and thats fine with me, but why
> do I get 24 px when I inherit it?

> Thanks in advance,

> Stefan Rotter



Sun, 26 Sep 2004 22:10:28 GMT  
 Inherited ComboBox height won't change
I've tried that but it doesn't work.


Mon, 27 Sep 2004 01:23:26 GMT  
 Inherited ComboBox height won't change
I have tested it with a very simple customer control which inherits from
the Combox class, and the height remains 21inch.

Please test it with a simple one see if the problem still persists.

This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET? http://www.asp.net



Mon, 27 Sep 2004 18:15:19 GMT  
 Inherited ComboBox height won't change
In addition, the Combox class doesn't export the OnPaint event for us to
overide. That is, we cannot change its appearance because the
implementation of its own Paint override ours.

This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET? http://www.asp.net



Mon, 27 Sep 2004 18:17:14 GMT  
 Inherited ComboBox height won't change
But if I use the code

MyBase.SetStyle(ControlStyles.UserPaint, True)

in the sub New() of the inherited class I can override the OnPaint event.
It works fine for me to do that when the DropDownStyle = DropDownList and
I can make it look like I want.

But I still get 24 px height...



Mon, 27 Sep 2004 23:47:33 GMT  
 Inherited ComboBox height won't change
I tried it and got the same result. It seems that we couldn't change its
height even though we override its OnPaint event.

This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET? http://www.asp.net



Tue, 28 Sep 2004 09:52:46 GMT  
 Inherited ComboBox height won't change
If we set the DropDownStyle property to Simple or DropDownList, we can
change the Height property.

This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET? http://www.asp.net



Tue, 28 Sep 2004 10:10:13 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Controls won't stay put on inherited winform

2. combobox height change in frame

3. Combobox - Unusual behaviour when changing the dropdown height.

4. to change the Height of a DropDown Combobox

5. Changing ComboBox Height

6. set combobox's list height?

7. Border won't immediately follow new height

8. VB6 toolbar won't stay correct height

9. Video, playing mpeg's and changing video height

10. Help: Can't set form height greater than screen height

11. combobox won't be plat

12. Combobox.clear doesn't generate Change event

 

 
Powered by phpBB® Forum Software