property Control.Height as Long
Specifies the control's height.

 TypeDescription 
   Long A long expression that indicates the control's height, in pixels.  

By default, the Height property is 128 pixels. Use the Height property to specify the height of the inside control. The Height property has effect only if Create method is called after. Use the Width property to specify the control's width. 

The following VB sample adds a Microsoft Chart Control:

With ExMenu1.Items
    With .Add(" ActiveX ", EXMENULibCtl.ItemTypeEnum.SubControl, 1234).SubControl
        .Width = 200
        .Height = 200
        .ControlID = "MSChart20Lib.MSChart"
        .Create
    End With
End With
ExMenu1.Refresh

The following C++ sample adds a Microsoft Chart Control:

#include "Item.h"
#include "Menu.h"
#include "Control.h"
	
CItem item = m_menu.GetItems().Add( " ActiveX ", COleVariant( (long)3 /*SubControl*/ ), COleVariant( (long)1234 ) );
CControl control = item.GetSubControl();
control.SetWidth( 200 );
control.SetHeight( 200 );
control.SetControlID( "MSChart20Lib.MSChart" );
control.Create();
m_menu.Refresh();

The following VB.NET sample adds a Microsoft Chart Control:

With AxExMenu1.Items
    With .Add(" ActiveX ", EXMENULib.ItemTypeEnum.SubControl, 1234).SubControl
        .Width = 200
        .Height = 200
        .ControlID = "MSChart20Lib.MSChart"
        .Create()
    End With
End With
AxExMenu1.CtlRefresh()

The following C# sample adds a Microsoft Chart Control:

EXMENULib.Menu items = axExMenu1.Items;
EXMENULib.Control control = items.Add(" ActiveX ", EXMENULib.ItemTypeEnum.SubControl, 1234).SubControl;
control.Width = 200;
control.Height = 200;
control.ControlID = "MSChart20Lib.MSChart";
control.Create();
axExMenu1.CtlRefresh();

The following VFP sample adds a Microsoft Chart Control:

With thisform.ExMenu1.Items
    With .Add(" ActiveX ", 3, 1234).SubControl && EXMENULibCtl.ItemTypeEnum.SubControl
        .Width = 200
		.Height = 200
        .ControlID = "MSChart20Lib.MSChart"
        .Create
    EndWith
EndWith
thisform.ExMenu1.Object.Refresh



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