Hi,

I want to draw combobox to bottom of form. I have following code :

ComboBox C = new ComboBox();
C.Font=FontNormal;
Size CSize=C.Size;
C.Location = new Point(0,this.Height - CSize.Height); // this.Height is
Height of parent control
this.Controls.Add(C);

By me it is correct but down part of my combobox is drawn out of control.
Why ?

Thank you

Re: BUG in Combobox.Location ? by Tim

Tim
Wed Feb 16 15:29:34 CST 2005

I am assuming that the parent is a Form. Try using the ClientRectangle
property instead.
C.Location = new Point(0, this.ClientRectangle.Height - CSize.Height);

In addition, if you want the ComboBox fixed to the bottom left corner of the
parent then consider using the following line.
C.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;

--
Tim Wilson
.Net Compact Framework MVP

"B.J." <BJ@discussions.microsoft.com> wrote in message
news:95524E60-0F4F-48EE-93C5-01DF3E287176@microsoft.com...
> Hi,
>
> I want to draw combobox to bottom of form. I have following code :
>
> ComboBox C = new ComboBox();
> C.Font=FontNormal;
> Size CSize=C.Size;
> C.Location = new Point(0,this.Height - CSize.Height); // this.Height is
> Height of parent control
> this.Controls.Add(C);
>
> By me it is correct but down part of my combobox is drawn out of control.
> Why ?
>
> Thank you



BUG is in Combobox.Font ? by BJ

BJ
Thu Feb 17 01:53:03 CST 2005

Hi,

It does not help me. But ... now I debugging my code and I wonder even if I
set to Combobox.Font font of size 1 or 100 I get still same Height of
Combobox.Size !
It is a bad isn't ??? When I change font of combobox also size of combobox
will change so why it is not reflected by Combobox.Size ???

B.J.

"Tim Wilson" wrote:

> I am assuming that the parent is a Form. Try using the ClientRectangle
> property instead.
> C.Location = new Point(0, this.ClientRectangle.Height - CSize.Height);
>
> In addition, if you want the ComboBox fixed to the bottom left corner of the
> parent then consider using the following line.
> C.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
>
> --
> Tim Wilson
> ..Net Compact Framework MVP
>
> "B.J." <BJ@discussions.microsoft.com> wrote in message
> news:95524E60-0F4F-48EE-93C5-01DF3E287176@microsoft.com...
> > Hi,
> >
> > I want to draw combobox to bottom of form. I have following code :
> >
> > ComboBox C = new ComboBox();
> > C.Font=FontNormal;
> > Size CSize=C.Size;
> > C.Location = new Point(0,this.Height - CSize.Height); // this.Height is
> > Height of parent control
> > this.Controls.Add(C);
> >
> > By me it is correct but down part of my combobox is drawn out of control.
> > Why ?
> >
> > Thank you
>
>
>

Re: BUG is in Combobox.Font ? by Tim

Tim
Thu Feb 17 06:39:20 CST 2005

Changing to use the ClientRectangle property didn't resolve your issue? What
type of control is the parent in this situation? When setting the Font to a
larger size it should increase the size of the ComboBox and this should be
shown through the Size property. Can you post all the code that you are
using so that we can better understand where you might be going wrong?

--
Tim Wilson
.Net Compact Framework MVP

"B.J." <BJ@discussions.microsoft.com> wrote in message
news:CC0D32F8-2178-4258-8980-753C0DD3A39D@microsoft.com...
> Hi,
>
> It does not help me. But ... now I debugging my code and I wonder even if
I
> set to Combobox.Font font of size 1 or 100 I get still same Height of
> Combobox.Size !
> It is a bad isn't ??? When I change font of combobox also size of combobox
> will change so why it is not reflected by Combobox.Size ???
>
> B.J.
>
> "Tim Wilson" wrote:
>
> > I am assuming that the parent is a Form. Try using the ClientRectangle
> > property instead.
> > C.Location = new Point(0, this.ClientRectangle.Height - CSize.Height);
> >
> > In addition, if you want the ComboBox fixed to the bottom left corner of
the
> > parent then consider using the following line.
> > C.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
> >
> > --
> > Tim Wilson
> > ..Net Compact Framework MVP
> >
> > "B.J." <BJ@discussions.microsoft.com> wrote in message
> > news:95524E60-0F4F-48EE-93C5-01DF3E287176@microsoft.com...
> > > Hi,
> > >
> > > I want to draw combobox to bottom of form. I have following code :
> > >
> > > ComboBox C = new ComboBox();
> > > C.Font=FontNormal;
> > > Size CSize=C.Size;
> > > C.Location = new Point(0,this.Height - CSize.Height); // this.Height
is
> > > Height of parent control
> > > this.Controls.Add(C);
> > >
> > > By me it is correct but down part of my combobox is drawn out of
control.
> > > Why ?
> > >
> > > Thank you
> >
> >
> >



Re: BUG is in Combobox.Font ? by BJ

BJ
Fri Feb 18 10:45:02 CST 2005

Hi,

I do web browser control (it will host in Internet Explorer - on
client-side). I simplified code and here it is (and also changing font size
for control has no effect on Combobox.Size) :

namespace T {
public class BrowserControl : System.Windows.Forms.Control {

const int FontSizeNormal=28;
const String FontFamilyNormal="Arial";

protected override void OnHandleCreated(EventArgs EA) {
Font FontNormal = new Font(FontFamilyNormal,FontSizeNormal);

ComboBox C = new ComboBox();
C.Font=FontNormal;
Size CSize=C.Size;
C.Location = new Point(0,this.Height - CSize.Height);
this.Controls.Add(C);

}
}
}

And in HTML page it is in <OBJECT HEIGHT="100" WIDTH="100" CLASSID="..."
...></OBJECT>

I use .NET version 1.1 on Windows Server 2003 EE, IE 6

Hope you will find where is problem ...

Re: BUG is in Combobox.Font ? by Tim

Tim
Fri Feb 18 11:52:59 CST 2005

So what is the overall goal of the control? Have you tried creating a
UserControl, instead of inheriting from Control, and using the designer to
create your control? This can be done by creating a "Windows Control
Library" project. Below, I have created a UserControl that contains a
ComboBox that is fixed to the bottom-left corner. I have tested this control
in a Windows Forms application as well as embedded in a web page and it
works as expected. I am using Windows 2000 Pro, VS.Net 2003 w/ .Net Fx 1.1
SP1, IE 6.

using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace WindowsControlLibrary1
{
public class UserControl1 : System.Windows.Forms.UserControl
{
private System.Windows.Forms.ComboBox comboBox1;
public UserControl1()
{
InitializeComponent();
this.comboBox1.Location = new Point(0, (this.Height -
this.comboBox1.Size.Height));
this.comboBox1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// comboBox1
//
this.comboBox1.Font = new System.Drawing.Font("Arial", 27.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0)));
this.comboBox1.Location = new System.Drawing.Point(8, 8);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(72, 50);
this.comboBox1.TabIndex = 0;
//
// UserControl1
//
this.Controls.Add(this.comboBox1);
this.Name = "UserControl1";
this.Size = new System.Drawing.Size(100, 100);
this.ResumeLayout(false);
}
#endregion
}
}

--
Tim Wilson
.Net Compact Framework MVP

"B.J." <BJ@discussions.microsoft.com> wrote in message
news:B701B4AC-9007-41D1-A6C5-E0A69C876FBF@microsoft.com...
> Hi,
>
> I do web browser control (it will host in Internet Explorer - on
> client-side). I simplified code and here it is (and also changing font
size
> for control has no effect on Combobox.Size) :
>
> namespace T {
> public class BrowserControl : System.Windows.Forms.Control {
>
> const int FontSizeNormal=28;
> const String FontFamilyNormal="Arial";
>
> protected override void OnHandleCreated(EventArgs EA) {
> Font FontNormal = new Font(FontFamilyNormal,FontSizeNormal);
>
> ComboBox C = new ComboBox();
> C.Font=FontNormal;
> Size CSize=C.Size;
> C.Location = new Point(0,this.Height - CSize.Height);
> this.Controls.Add(C);
>
> }
> }
> }
>
> And in HTML page it is in <OBJECT HEIGHT="100" WIDTH="100" CLASSID="..."
> ...></OBJECT>
>
> I use .NET version 1.1 on Windows Server 2003 EE, IE 6
>
> Hope you will find where is problem ...



Re: BUG is in Combobox.Font ? by BJ

BJ
Fri Feb 18 13:15:04 CST 2005

I could use it so, but still can't understand why it does not work for
control ...

Thank you for your comments.

"Tim Wilson" wrote:

> So what is the overall goal of the control? Have you tried creating a
> UserControl, instead of inheriting from Control, and using the designer to
> create your control? This can be done by creating a "Windows Control
> Library" project. Below, I have created a UserControl that contains a
> ComboBox that is fixed to the bottom-left corner. I have tested this control
> in a Windows Forms application as well as embedded in a web page and it
> works as expected. I am using Windows 2000 Pro, VS.Net 2003 w/ .Net Fx 1.1
> SP1, IE 6.
>
> using System;
> using System.Collections;
> using System.ComponentModel;
> using System.Drawing;
> using System.Data;
> using System.Windows.Forms;
> namespace WindowsControlLibrary1
> {
> public class UserControl1 : System.Windows.Forms.UserControl
> {
> private System.Windows.Forms.ComboBox comboBox1;
> public UserControl1()
> {
> InitializeComponent();
> this.comboBox1.Location = new Point(0, (this.Height -
> this.comboBox1.Size.Height));
> this.comboBox1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
> }
> protected override void Dispose( bool disposing )
> {
> if( disposing )
> {
> }
> base.Dispose( disposing );
> }
> #region Component Designer generated code
> /// <summary>
> /// Required method for Designer support - do not modify
> /// the contents of this method with the code editor.
> /// </summary>
> private void InitializeComponent()
> {
> this.comboBox1 = new System.Windows.Forms.ComboBox();
> this.SuspendLayout();
> //
> // comboBox1
> //
> this.comboBox1.Font = new System.Drawing.Font("Arial", 27.75F,
> System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
> ((System.Byte)(0)));
> this.comboBox1.Location = new System.Drawing.Point(8, 8);
> this.comboBox1.Name = "comboBox1";
> this.comboBox1.Size = new System.Drawing.Size(72, 50);
> this.comboBox1.TabIndex = 0;
> //
> // UserControl1
> //
> this.Controls.Add(this.comboBox1);
> this.Name = "UserControl1";
> this.Size = new System.Drawing.Size(100, 100);
> this.ResumeLayout(false);
> }
> #endregion
> }
> }
>
> --
> Tim Wilson
> ..Net Compact Framework MVP
>
> "B.J." <BJ@discussions.microsoft.com> wrote in message
> news:B701B4AC-9007-41D1-A6C5-E0A69C876FBF@microsoft.com...
> > Hi,
> >
> > I do web browser control (it will host in Internet Explorer - on
> > client-side). I simplified code and here it is (and also changing font
> size
> > for control has no effect on Combobox.Size) :
> >
> > namespace T {
> > public class BrowserControl : System.Windows.Forms.Control {
> >
> > const int FontSizeNormal=28;
> > const String FontFamilyNormal="Arial";
> >
> > protected override void OnHandleCreated(EventArgs EA) {
> > Font FontNormal = new Font(FontFamilyNormal,FontSizeNormal);
> >
> > ComboBox C = new ComboBox();
> > C.Font=FontNormal;
> > Size CSize=C.Size;
> > C.Location = new Point(0,this.Height - CSize.Height);
> > this.Controls.Add(C);
> >
> > }
> > }
> > }
> >
> > And in HTML page it is in <OBJECT HEIGHT="100" WIDTH="100" CLASSID="..."
> > ...></OBJECT>
> >
> > I use .NET version 1.1 on Windows Server 2003 EE, IE 6
> >
> > Hope you will find where is problem ...
>
>
>

Re: BUG is in Combobox.Font ? by Tim

Tim
Fri Feb 18 13:31:05 CST 2005

So did the UserControl work as expected? It should work for Control if you
really wanted it to. Try deriving the UserControl1 class, that I posted,
from System.Windows.Forms.Control and see if it works. So change this line
(public class UserControl1 : System.Windows.Forms.UserControl) to be this
line (public class UserControl1 : System.Windows.Forms.Control).

--
Tim Wilson
.Net Compact Framework MVP

"B.J." <BJ@discussions.microsoft.com> wrote in message
news:5759B8CE-F0FD-4F07-9403-51641C614028@microsoft.com...
> I could use it so, but still can't understand why it does not work for
> control ...
>
> Thank you for your comments.
>
> "Tim Wilson" wrote:
>
> > So what is the overall goal of the control? Have you tried creating a
> > UserControl, instead of inheriting from Control, and using the designer
to
> > create your control? This can be done by creating a "Windows Control
> > Library" project. Below, I have created a UserControl that contains a
> > ComboBox that is fixed to the bottom-left corner. I have tested this
control
> > in a Windows Forms application as well as embedded in a web page and it
> > works as expected. I am using Windows 2000 Pro, VS.Net 2003 w/ .Net Fx
1.1
> > SP1, IE 6.
> >
> > using System;
> > using System.Collections;
> > using System.ComponentModel;
> > using System.Drawing;
> > using System.Data;
> > using System.Windows.Forms;
> > namespace WindowsControlLibrary1
> > {
> > public class UserControl1 : System.Windows.Forms.UserControl
> > {
> > private System.Windows.Forms.ComboBox comboBox1;
> > public UserControl1()
> > {
> > InitializeComponent();
> > this.comboBox1.Location = new Point(0, (this.Height -
> > this.comboBox1.Size.Height));
> > this.comboBox1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
> > }
> > protected override void Dispose( bool disposing )
> > {
> > if( disposing )
> > {
> > }
> > base.Dispose( disposing );
> > }
> > #region Component Designer generated code
> > /// <summary>
> > /// Required method for Designer support - do not modify
> > /// the contents of this method with the code editor.
> > /// </summary>
> > private void InitializeComponent()
> > {
> > this.comboBox1 = new System.Windows.Forms.ComboBox();
> > this.SuspendLayout();
> > //
> > // comboBox1
> > //
> > this.comboBox1.Font = new System.Drawing.Font("Arial", 27.75F,
> > System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
> > ((System.Byte)(0)));
> > this.comboBox1.Location = new System.Drawing.Point(8, 8);
> > this.comboBox1.Name = "comboBox1";
> > this.comboBox1.Size = new System.Drawing.Size(72, 50);
> > this.comboBox1.TabIndex = 0;
> > //
> > // UserControl1
> > //
> > this.Controls.Add(this.comboBox1);
> > this.Name = "UserControl1";
> > this.Size = new System.Drawing.Size(100, 100);
> > this.ResumeLayout(false);
> > }
> > #endregion
> > }
> > }
> >
> > --
> > Tim Wilson
> > ..Net Compact Framework MVP
> >
> > "B.J." <BJ@discussions.microsoft.com> wrote in message
> > news:B701B4AC-9007-41D1-A6C5-E0A69C876FBF@microsoft.com...
> > > Hi,
> > >
> > > I do web browser control (it will host in Internet Explorer - on
> > > client-side). I simplified code and here it is (and also changing font
> > size
> > > for control has no effect on Combobox.Size) :
> > >
> > > namespace T {
> > > public class BrowserControl : System.Windows.Forms.Control {
> > >
> > > const int FontSizeNormal=28;
> > > const String FontFamilyNormal="Arial";
> > >
> > > protected override void OnHandleCreated(EventArgs EA) {
> > > Font FontNormal = new Font(FontFamilyNormal,FontSizeNormal);
> > >
> > > ComboBox C = new ComboBox();
> > > C.Font=FontNormal;
> > > Size CSize=C.Size;
> > > C.Location = new Point(0,this.Height - CSize.Height);
> > > this.Controls.Add(C);
> > >
> > > }
> > > }
> > > }
> > >
> > > And in HTML page it is in <OBJECT HEIGHT="100" WIDTH="100"
CLASSID="..."
> > > ...></OBJECT>
> > >
> > > I use .NET version 1.1 on Windows Server 2003 EE, IE 6
> > >
> > > Hope you will find where is problem ...
> >
> >
> >



Re: BUG is in Combobox.Font ? by BJ

BJ
Sat Feb 19 10:27:02 CST 2005

When I comment
this.comboBox1.Size = new System.Drawing.Size(72, 50);
it does not work neither for : UserControl.

"Tim Wilson" wrote:

> So did the UserControl work as expected? It should work for Control if you
> really wanted it to. Try deriving the UserControl1 class, that I posted,
> from System.Windows.Forms.Control and see if it works. So change this line
> (public class UserControl1 : System.Windows.Forms.UserControl) to be this
> line (public class UserControl1 : System.Windows.Forms.Control).
>
> --
> Tim Wilson
> ..Net Compact Framework MVP
>
> "B.J." <BJ@discussions.microsoft.com> wrote in message
> news:5759B8CE-F0FD-4F07-9403-51641C614028@microsoft.com...
> > I could use it so, but still can't understand why it does not work for
> > control ...
> >
> > Thank you for your comments.
> >
> > "Tim Wilson" wrote:
> >
> > > So what is the overall goal of the control? Have you tried creating a
> > > UserControl, instead of inheriting from Control, and using the designer
> to
> > > create your control? This can be done by creating a "Windows Control
> > > Library" project. Below, I have created a UserControl that contains a
> > > ComboBox that is fixed to the bottom-left corner. I have tested this
> control
> > > in a Windows Forms application as well as embedded in a web page and it
> > > works as expected. I am using Windows 2000 Pro, VS.Net 2003 w/ .Net Fx
> 1.1
> > > SP1, IE 6.
> > >
> > > using System;
> > > using System.Collections;
> > > using System.ComponentModel;
> > > using System.Drawing;
> > > using System.Data;
> > > using System.Windows.Forms;
> > > namespace WindowsControlLibrary1
> > > {
> > > public class UserControl1 : System.Windows.Forms.UserControl
> > > {
> > > private System.Windows.Forms.ComboBox comboBox1;
> > > public UserControl1()
> > > {
> > > InitializeComponent();
> > > this.comboBox1.Location = new Point(0, (this.Height -
> > > this.comboBox1.Size.Height));
> > > this.comboBox1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
> > > }
> > > protected override void Dispose( bool disposing )
> > > {
> > > if( disposing )
> > > {
> > > }
> > > base.Dispose( disposing );
> > > }
> > > #region Component Designer generated code
> > > /// <summary>
> > > /// Required method for Designer support - do not modify
> > > /// the contents of this method with the code editor.
> > > /// </summary>
> > > private void InitializeComponent()
> > > {
> > > this.comboBox1 = new System.Windows.Forms.ComboBox();
> > > this.SuspendLayout();
> > > //
> > > // comboBox1
> > > //
> > > this.comboBox1.Font = new System.Drawing.Font("Arial", 27.75F,
> > > System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
> > > ((System.Byte)(0)));
> > > this.comboBox1.Location = new System.Drawing.Point(8, 8);
> > > this.comboBox1.Name = "comboBox1";
> > > this.comboBox1.Size = new System.Drawing.Size(72, 50);
> > > this.comboBox1.TabIndex = 0;
> > > //
> > > // UserControl1
> > > //
> > > this.Controls.Add(this.comboBox1);
> > > this.Name = "UserControl1";
> > > this.Size = new System.Drawing.Size(100, 100);
> > > this.ResumeLayout(false);
> > > }
> > > #endregion
> > > }
> > > }
> > >
> > > --
> > > Tim Wilson
> > > ..Net Compact Framework MVP
> > >
> > > "B.J." <BJ@discussions.microsoft.com> wrote in message
> > > news:B701B4AC-9007-41D1-A6C5-E0A69C876FBF@microsoft.com...
> > > > Hi,
> > > >
> > > > I do web browser control (it will host in Internet Explorer - on
> > > > client-side). I simplified code and here it is (and also changing font
> > > size
> > > > for control has no effect on Combobox.Size) :
> > > >
> > > > namespace T {
> > > > public class BrowserControl : System.Windows.Forms.Control {
> > > >
> > > > const int FontSizeNormal=28;
> > > > const String FontFamilyNormal="Arial";
> > > >
> > > > protected override void OnHandleCreated(EventArgs EA) {
> > > > Font FontNormal = new Font(FontFamilyNormal,FontSizeNormal);
> > > >
> > > > ComboBox C = new ComboBox();
> > > > C.Font=FontNormal;
> > > > Size CSize=C.Size;
> > > > C.Location = new Point(0,this.Height - CSize.Height);
> > > > this.Controls.Add(C);
> > > >
> > > > }
> > > > }
> > > > }
> > > >
> > > > And in HTML page it is in <OBJECT HEIGHT="100" WIDTH="100"
> CLASSID="..."
> > > > ...></OBJECT>
> > > >
> > > > I use .NET version 1.1 on Windows Server 2003 EE, IE 6
> > > >
> > > > Hope you will find where is problem ...
> > >
> > >
> > >
>
>
>

Re: BUG is in Combobox.Font ? by Tim

Tim
Sat Feb 19 11:24:31 CST 2005

This probably has to do with the ComboBox getting set to a default size at
some point in it's creation process. So you can either explicitly set a Size
or you can move the code that is used to set the Location into an OnResize
override for the UserControl. So add this method to the UserControl1 class.

protected override void OnResize ( System.EventArgs e )
{
this.comboBox1.Location = new Point(0, (this.Height -
this.comboBox1.Size.Height));
base.OnResize(e);
}

--
Tim Wilson
.Net Compact Framework MVP

"B.J." <BJ@discussions.microsoft.com> wrote in message
news:76327E68-9EEC-45C4-A868-C2BCA7D793CE@microsoft.com...
> When I comment
> this.comboBox1.Size = new System.Drawing.Size(72, 50);
> it does not work neither for : UserControl.
>
> "Tim Wilson" wrote:
>
> > So did the UserControl work as expected? It should work for Control if
you
> > really wanted it to. Try deriving the UserControl1 class, that I posted,
> > from System.Windows.Forms.Control and see if it works. So change this
line
> > (public class UserControl1 : System.Windows.Forms.UserControl) to be
this
> > line (public class UserControl1 : System.Windows.Forms.Control).
> >
> > --
> > Tim Wilson
> > ..Net Compact Framework MVP
> >
> > "B.J." <BJ@discussions.microsoft.com> wrote in message
> > news:5759B8CE-F0FD-4F07-9403-51641C614028@microsoft.com...
> > > I could use it so, but still can't understand why it does not work for
> > > control ...
> > >
> > > Thank you for your comments.
> > >
> > > "Tim Wilson" wrote:
> > >
> > > > So what is the overall goal of the control? Have you tried creating
a
> > > > UserControl, instead of inheriting from Control, and using the
designer
> > to
> > > > create your control? This can be done by creating a "Windows Control
> > > > Library" project. Below, I have created a UserControl that contains
a
> > > > ComboBox that is fixed to the bottom-left corner. I have tested this
> > control
> > > > in a Windows Forms application as well as embedded in a web page and
it
> > > > works as expected. I am using Windows 2000 Pro, VS.Net 2003 w/ .Net
Fx
> > 1.1
> > > > SP1, IE 6.
> > > >
> > > > using System;
> > > > using System.Collections;
> > > > using System.ComponentModel;
> > > > using System.Drawing;
> > > > using System.Data;
> > > > using System.Windows.Forms;
> > > > namespace WindowsControlLibrary1
> > > > {
> > > > public class UserControl1 : System.Windows.Forms.UserControl
> > > > {
> > > > private System.Windows.Forms.ComboBox comboBox1;
> > > > public UserControl1()
> > > > {
> > > > InitializeComponent();
> > > > this.comboBox1.Location = new Point(0, (this.Height -
> > > > this.comboBox1.Size.Height));
> > > > this.comboBox1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
> > > > }
> > > > protected override void Dispose( bool disposing )
> > > > {
> > > > if( disposing )
> > > > {
> > > > }
> > > > base.Dispose( disposing );
> > > > }
> > > > #region Component Designer generated code
> > > > /// <summary>
> > > > /// Required method for Designer support - do not modify
> > > > /// the contents of this method with the code editor.
> > > > /// </summary>
> > > > private void InitializeComponent()
> > > > {
> > > > this.comboBox1 = new System.Windows.Forms.ComboBox();
> > > > this.SuspendLayout();
> > > > //
> > > > // comboBox1
> > > > //
> > > > this.comboBox1.Font = new System.Drawing.Font("Arial", 27.75F,
> > > > System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
> > > > ((System.Byte)(0)));
> > > > this.comboBox1.Location = new System.Drawing.Point(8, 8);
> > > > this.comboBox1.Name = "comboBox1";
> > > > this.comboBox1.Size = new System.Drawing.Size(72, 50);
> > > > this.comboBox1.TabIndex = 0;
> > > > //
> > > > // UserControl1
> > > > //
> > > > this.Controls.Add(this.comboBox1);
> > > > this.Name = "UserControl1";
> > > > this.Size = new System.Drawing.Size(100, 100);
> > > > this.ResumeLayout(false);
> > > > }
> > > > #endregion
> > > > }
> > > > }
> > > >
> > > > --
> > > > Tim Wilson
> > > > ..Net Compact Framework MVP
> > > >
> > > > "B.J." <BJ@discussions.microsoft.com> wrote in message
> > > > news:B701B4AC-9007-41D1-A6C5-E0A69C876FBF@microsoft.com...
> > > > > Hi,
> > > > >
> > > > > I do web browser control (it will host in Internet Explorer - on
> > > > > client-side). I simplified code and here it is (and also changing
font
> > > > size
> > > > > for control has no effect on Combobox.Size) :
> > > > >
> > > > > namespace T {
> > > > > public class BrowserControl : System.Windows.Forms.Control {
> > > > >
> > > > > const int FontSizeNormal=28;
> > > > > const String FontFamilyNormal="Arial";
> > > > >
> > > > > protected override void OnHandleCreated(EventArgs EA) {
> > > > > Font FontNormal = new Font(FontFamilyNormal,FontSizeNormal);
> > > > >
> > > > > ComboBox C = new ComboBox();
> > > > > C.Font=FontNormal;
> > > > > Size CSize=C.Size;
> > > > > C.Location = new Point(0,this.Height - CSize.Height);
> > > > > this.Controls.Add(C);
> > > > >
> > > > > }
> > > > > }
> > > > > }
> > > > >
> > > > > And in HTML page it is in <OBJECT HEIGHT="100" WIDTH="100"
> > CLASSID="..."
> > > > > ...></OBJECT>
> > > > >
> > > > > I use .NET version 1.1 on Windows Server 2003 EE, IE 6
> > > > >
> > > > > Hope you will find where is problem ...
> > > >
> > > >
> > > >
> >
> >
> >