BCGControlBar Library for .NET
OnCalculateSize Method (ToolbarButton)




Specifies the basic size which as a rule depends on the column width and row height of the toolbar.
Calculates the size of the toolbar button according to its default size and content.
Syntax
'Declaration
 
Public Overrides Function OnCalculateSize( _
   ByVal sizeDefault As Size _
) As Size
'Usage
 
Dim instance As ToolbarButton
Dim sizeDefault As Size
Dim value As Size
 
value = instance.OnCalculateSize(sizeDefault)
public override Size OnCalculateSize( 
   Size sizeDefault
)
public: Size OnCalculateSize( 
   Size sizeDefault
) override 
public:
Size OnCalculateSize( 
   Size sizeDefault
) override 

Parameters

sizeDefault
Specifies the basic size which as a rule depends on the column width and row height of the toolbar.

Return Value

The default implementation takes into account the text and image sizes (if displayed), their positions (text below image or text at the right side of the image), the toolbar dock state and calculates the result size accordingly.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ToolbarButton Class
ToolbarButton Members
Base Implementation in OnCalculateSize

Send Feedback