Welcome to ComponentOne Sizer for .NET

ComponentOne Sizer for .NET E-mail sent to documentation@componentone.com is for documentation feedback only. We welcome any suggestions to help improve our documentation.

Welcome to ComponentOne Sizer for .NET

Previous Next

ComponentOne Sizer™ for .NET provides two components that help create resolution-independent applications without having to write any code. The components are C1SizerLight and C1Sizer.

ComponentOne has a user-friendly distribution policy. We want every programmer to obtain a copy of ComponentOne Sizer for .NET to try for as long as they wish. Those who like the product and find it useful may buy a license for a reasonable price. The only restriction is that unlicensed copies of ComponentOne Sizer for .NET will display a ComponentOne banner every time they are loaded to remind developers to license the product.

We are confident that you will like ComponentOne Sizer for .NET. If you have any suggestions or ideas for new features that you would like to see included in a future version, or ideas for new controls, please call us or write:

ComponentOne LLC
201 South Highland Avenue
3rd Floor
Pittsburgh, PA 15206 • USA
412.681.4343
412.681.4384 (Fax)

http://www.componentone.com

What's New in ComponentOne Sizer for .NET

Installing Sizer for .NET

END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

Licensing FAQs

Technical Support

Redistributable Files

Namespaces

Creating a .NET Project

Customizing the Visual Studio Toolbox

Migrating a C1Sizer Project to Visual Studio 2005

Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.


What's New in ComponentOne Sizer for .NET

What's New in ComponentOne Sizer for .NET

This documentation was last revised on September 29, 2005.

Overview of What's New in ComponentOne Sizer for .NET

Sizer for .NET now contains Task-Based Help in the documentation to help aid n specific tasks. Task-Based Help is similar to tutorials by the detailed step by step explanation on how to do a task except that it focuses on one task instead of a group of tasks. This makes it easier for developers to find information on one specific topic.


Feature Overview

Feature Overview

There are no new features in Sizer for .NET at this time.For your reference, a few major features that have been recently added to Sizer for .NET are included below:

Design-Time Context Menus

The additions were updated on January 6, 2005.

C1Sizer now has design-time context menus to set splitters and fixed size bands. Right-clicking on the splitter at design time opens the new context menus.


Task-Based Help Overview

Task-Based Help Overview

The new Task-Based Help section uses several important features of the Sizer for .NET component to create richly formatted documents. The additions were updated on June 7, 2005. The following topics have been added to the task based help for Sizer for .NET:

Task-Based Help | Description
Position controls on the C1Sizer grid at runtime | This topic illustrates how to position controls on the C1Sizer grid at runtime.
Show gridlines of a C1Sizer control | This topic explains how to show the gridlines of a C1Sizer control using the OnPaint event.
Add drag and drop support to a C1Sizer control | This topic demonstrates how to add drag and drop support to a C1Sizer control using the DoDragDrop method.
Store layout information for the C1Sizer control | This topic shows you how to store information for the C1Sizer control using the GridDefinition property.
Print the contents of C1Sizer | This topic demonstrates how to print the contents of a C1Sizer component.
Add a C1SizerLight component to a form at runtime | This topic explains how to add a C1SizerLight component to a form at runtime.


Class Members

Class Members

Below is the most recent member added to the C1.C1Sizer component:

C1SizerLight Class | Description
C1SizerLight.ResizingControl Event | This event allows you to prevent specific controls from being resized by the C1SizerLight.


Installing Sizer for .NET

Installing Sizer for .NET

This section describes the setup files and system requirements for Sizer for .NET. It also explains how to install demonstration versions of ComponentOne products and uninstall Sizer for .NET.

Sizer for .NET Setup Files

System Requirements

Installing Demonstration Versions

Uninstalling Sizer for .NET


Sizer for .NET Setup Files

Sizer for .NET Setup Files

The installation program will create the following directory: C:\Program Files\ComponentOne Studio.NET, which contains the following subdirectories:

bin | Contains copies of all binaries (DLLs, EXEs) in the ComponentOne Visual Studio.NET package.
Common | Contains support and data files that are used by many of the demo programs.
Help | Contains online documentation for all Studio components.
C1Sizer | Contains samples and tutorials for the C1Sizer component.


System Requirements

System Requirements

· Operating Systems:

Windows 2000

Windows 2003 Server

Windows NT 4

Windows XP, SP1, SP2

· Environments (Visual Studio 2005):

.NET Framework 2.0

C# .NET

Visual Basic .NET

· Environments:

.NET Framework 1.0

.NET Framework1.1

C# .NET

Delphi

Visual Basic .NET

· Hard Disk Space: 2 MB

· Disc Drive: CD or DVD-ROM drive if installing from CD


Installing Demonstration Versions

Installing Demonstration Versions

If you wish to try Sizer for .NET or any of our other products and do not have a registration key, follow the steps through the installation wizard and use the default serial number.

The only difference between unregistered (demonstration) and registered (purchased) versions of our products is that registered versions will stamp every application you compile so a ComponentOne banner will not appear when your users run the applications.


Uninstalling Sizer for .NET

Uninstalling Sizer for .NET

To uninstall Sizer for .NET, open the Control Panel and select the Add or Remove Programs. Select Sizer for .NET and click the Remove button.


END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

IMPORTANT-READ CAREFULLY: This End User License Agreement (this "EULA") contains the terms and conditions that govern your use of the SOFTWARE (as defined below) and imposes material limitations to your rights. You should read this EULA carefully and treat it as valuable property.

I. THIS EULA.

1. Software Covered by this EULA. This EULA governs your use of the ComponentOne, LLC ("C1") software product(s) enclosed or otherwise accompanied herewith (individually and collectively, the "SOFTWARE"). The term "SOFTWARE" includes, to the extent provided by C1: 1) any revisions, updates and/or upgrades thereto; 2) any data, image or executable files, databases, data engines, computer software, or similar items customarily used or distributed with computer software products; 3) anything in any form whatsoever intended to be used with or in conjunction with the SOFTWARE; and 4) any associated media, documentation (including physical, electronic and online) and printed materials (the "Documentation").

2. This EULA is a Legally Binding Agreement Between You and C1. If you are acting as an agent of a company or another legal person, such as an officer or other employee acting for your employer, then "you" and "your" mean your principal, the entity or other legal person for whom you are acting. However, importantly, even if you are acting as an agent for another, you may still be personally liable for violation of federal and State laws, such as copyright infringement.

By signifying your acceptance of the terms of this EULA, you intend to be, and hereby are, legally bound to this EULA to the same extent as if C1 and you physically signed this EULA. By installing, copying, or otherwise using the SOFTWARE, you agree to be bound by all the terms and conditions of this EULA. If you do not agree to all of such terms and conditions, you may not install or use the SOFTWARE. If you do not agree with any of the terms herewith and, for whatever reason, installation has begun or has been completed, you should cancel installation or un-install the SOFTWARE, as the case may be. Furthermore, you should promptly return the SOFTWARE to the place of business from which you obtained it in accordance with any return policies of such place of business. Return policies may vary among resellers; therefore you must comply with the return policies of your supplier as you agreed at the point of purchase. If the place of business from which you purchased the SOFTWARE does not honor a full refund for a period of thirty (30) days from the date of purchase, you may then return the SOFTWARE directly to C1 for a refund provided that such returns is authorized within the same thirty (30) days time period. To return the product directly to C1, you must first obtain a Return Authorization Number by contacting C1, and you must forward to C1 all items purchased, including the proof of purchase. The return must be postage-prepaid, and post-marked within thirty (30) days from the proof of purchase, time being of the essence. The return option to C1 is only available to the original purchaser of an unopened factory packaged item.

II. YOUR LICENSE TO DEVELOP AND TO DISTRIBUTE.

As provided in more detail below, this EULA grants you two licenses: 1) a license to use the SOFTWARE to develop other software products (the "Development License"); and 2) a license to use and/or distribute the Developed Software (the "Distribution License"). These licenses (individually and collectively, the "Licenses") are explained and defined in more detail below.

1. Definitions. The following terms have the respective meanings as used in this EULA:

"Network Server" means a computer with one or more computer central processing units (CPU's) that operates for the purpose of serving other computers logically or physically connected to it, including, but not limited to, other computers connected to it on an internal network, intranet or the Internet.

"Web Server" means a type of Network Server that serves other computers which, are specifically connected to it through either an intranet or the Internet.

"Developed Software" means those computer software products that are developed by or through the use of the SOFTWARE.

"Developed Web Server Software" means those Developed Software products that reside logically or physically on at least one Web Server and are operated (meaning the computer software instruction set is carried out) by the Web Server's central processing unit(s) (CPU).

"Redistributable Files" means the SOFTWARE files or other portions of the SOFTWARE that are provided by C1 and are identified as such in the Documentation for distribution by you with the Developed Software.

"Developer" means a human being or any other automated device using the SOFTWARE in accordance with the terms and conditions of this EULA.

"Developer Seat License" means that each Developer using or otherwise accessing the programmatic interface or the SOFTWARE must obtain the right to do so by purchasing a separate End User License.

“Source Code” shall mean computer software code or programs in human readable format, such as a printed listing of such a program written in a high-level computer language. The term "Source Code" includes, but is not limited to, documents and materials in support of the development effort of the SOFTWARE, such as flow charts, pseudo code and program notes.

2. Your Development License. You are hereby granted a limited, royalty-free, non-exclusive right to use the SOFTWARE to design, develop, and test Developed Software, on the express condition that, and only for so long as, you fully comply with all terms and conditions of this EULA.

The SOFTWARE is licensed to you on a Developer Seat License basis.

Developer Seat License basis means that you may perform an installation of the SOFTWARE for use in designing, testing and creating Developed Software by a single Developer on one or more computers, each with a single set of input devices, so long as 1) such computer/computers is/are used only by one single Developer at any given time and not concurrently and, 2) the user is the primary User to whom the license has been granted. Conversely, you may not install or use the SOFTWARE on a computer that is a network server or a computer at which the SOFTWARE is used by more than one Developer. You may not network the SOFTWARE or any component part of it, where it is or may be used by more than one Developer unless you purchase an additional Development License for each Developer. You must purchase another separate license to the SOFTWARE in order to add additional developer seats, whether the additional developers are accessing the SOFTWARE in a stand-alone environment or on a computer network.

The license rights granted under this Agreement may be limited to a specified number of days after you first install the SOFTWARE unless you supply information required to license or verify your licensed copy, as the case may be, within the time and the manner described during the SOFTWARE setup sequence and/or in the dialog boxes appearing during use of the SOFTWARE. You may need to verify the SOFTWARE through the use of the Internet, email or telephone; toll charges may apply. You may need to re-verify the SOFTWARE if you modify your computer hardware. Product verification is based on the exchange of information between your computer and C1. None of this information contains personally identifiable information nor can they be used to identify any personal information about you or any information you store in your computer. YOU ACKNOWLEDGE AND UNDERSTAND THAT THERE ARE TECHNOLOGICAL MEASURES IN THE SOFTWARE THAT ARE DESIGNED TO PREVENT UNLICENSED OR ILLEGAL USE OF THE SOFTWARE. YOU AGREE THAT C1 MAY USE SUCH MEASURES AND YOU AGREE TO FOLLOW ANY REQUIREMENTS REGARDING SUCH TECHNOLOGICAL MEASURES. YOU ACKNOWLEDGE AND AGREE THAT THE SOFTWARE WILL CEASE TO FUNCTION UNLESS AND UNTIL YOU VERIFY THE APPLICABLE SOFTWARE SERIAL KEY.

You agree that C1 may audit your use of the SOFTWARE for compliance with these terms at any time, upon reasonable notice. In the event that such audit reveals any use of the SOFTWARE other than in full compliance with the terms of this EULA, you shall reimburse C1 for all reasonable expenses related to such audit in addition to any other liabilities you may incur as a result of such non-compliance.

In all cases, (a) you may not use C1's name, logo, or trademarks to market your Developed Software without the express written consent of C1; (b) you must include the following C1 copyright notice in your Developed Software documentation and/or in the "About Box" of your Developed Software, and wherever the copyright/rights notice is located in the Developed Software (“Portions Copyright © ComponentOne, LLC 1991-2005. All Rights Reserved.”); (c) you agree to indemnify, hold harmless, and defend C1, its suppliers and resellers, from and against any claims or lawsuits, including attorney's fees that may arise from the use or distribution of your Developed Software; (d) you may use the SOFTWARE only to create Developed Software that is significantly different than the SOFTWARE.

3. Your Distribution License.

License to Distribute Developed Software. Subject to the terms and conditions in this EULA, you are granted the license to use and to distribute Developed Software on a royalty-free basis, provided that the Developed Software incorporates the SOFTWARE as an integral part of the Developed Software in machine-language compiled format (customarily an ".exe", or ".dll", etc.). You may not distribute, bundle, wrap or subclass the SOFTWARE as Developed Software which, when used in a "designtime" development environment, exposes the programmatic interface of the SOFTWARE. You may distribute, on a royalty-free basis, Redistributable Files with Developed Software only. You may not add or transfer the SOFTWARE license key to the computer where the Developed Software is installed. Users of the Developed Software may not use the SOFTWARE or the Redistributable Files, directly or indirectly, for development purposes. In particular, if you create a control (or user control) using the SOFTWARE as a constituent control, you are not licensed to distribute the control you created with the SOFTWARE to users for development purposes.

4. Specific Product Limitations. Notwithstanding anything in this EULA to the contrary, if the license you have purchased is for any of the following products, then the following additional limitations will apply:

a. ComponentOne Reports for .NET Designer Edition. ComponentOne Reports for .NET Designer Edition includes at least: 1) one dynamic link library file (c1.win.c1reportdesigner.dll) known as C1ReportDesigner Component, 2) one executable file (ReportDesigner.exe) known as C1ReportDesigner Application and, 3) the Source Code of the C1ReportDesigner Application. The C1ReportDesigner Component is subject to the general terms and restrictions set forth in this EULA. The C1ReportDesigner Application is an executable file used to design and prepare reports; the C1ReportDesigner Application may be distributed, free of royalties, only in conjunction with the Developed Software.

C1 hereby also grants you the right to use and to modify the C1ReportDesigner Application Source Code to create derivative works that are based on the licensed Source Code. You may distribute such derivative works, solely in object code format and exclusively in conjunction with and/or as a part of the Developed Software. You are expressly not granted the right to distribute, disclose or otherwise make available to any third party the licensed Source Code, any portion, modified version or derivative work thereof, in source code format.

C1 shall retain all right, title and interest in and to the licensed Source Code, and all C1 updates, modifications or enhancements thereof. Nothing herein shall be deemed to transfer any ownership or title rights in and to the licensed Source Code from C1 to you.

SOURCE CODE IS LICENSED TO YOU AS IS. C1 DOES NOT AND SHALL NOT PROVIDE YOU WITH ANY TECHNICAL SUPPORT FOR YOUR SOURCE CODE LICENSE.

b. VSView Reporting Edition (ActiveX). VSView Reporting Edition includes at least one executable file listed as “VSRptX.exe” (where X indicates the version number i.e.7,8, etc.), known as “Designer.” The file "VSRptX.exe”, or any upgrade or future versions of the Designer, are subject to the restrictions set forth in this EULA and may not be distributed with your Developed Software or in any other way.

c. Studio Products. You may not share the component parts of the Studio Products licensed to you with other Developers, nor may you allow the use and/or installation of such components by other Developers.

5. Updates/Upgrades; Studio Subscription. Subject to the terms and conditions of this EULA, the Licenses are perpetual. Updates and upgrades to the SOFTWARE may be provided by C1 from time-to-time, and, if so provided by C1, are provided upon the terms and conditions offered at that time by C1 in its sole discretion. C1 may provide updates and upgrades to the SOFTWARE for free or for any charge, at any time or never, and through its chosen manner of access and distribution, all in C1's sole discretion.

C1 licenses certain of its separately-licensed products bundled together in a product suite, called the C1 "Studio" product line (the "Studio Products"). The exact separately-licensed products that are bundled into the Studio Products may change from time-to-time in C1's sole discretion. If the SOFTWARE is identified as a C1 "Studio" product, then the SOFTWARE is one of the Studio Products. The SOFTWARE and the Studio Products are revised from time-to-time (meaning, for example, revised with updates, upgrades and, in the case of Studio products, some times changes to the mix of products included in the bundle). To receive any such revisions to the SOFTWARE or the Studio Products, as the case may be, you must have a valid SOFTWARE license or a valid Studio subscription. Together with the Licenses, the original purchaser is granted a one-year subscription from the date of purchase. Upon expiration, you must renew your license subscription to continue to be entitled to receive SOFTWARE and/or the Studio Products revisions as the case may be.

6. Serial Number. With your license, you will be issued a unique serial number (the "Serial Number") used for the activation of the SOFTWARE. The Serial Number is subject to the restrictions set forth in this EULA and may not be disclosed or distributed either with your Developed Software or in any other way. The disclosure or distribution of the Serial Number constitutes a breach of this EULA, the effect of which shall be the immediate termination and revocation of all the rights granted herein.

7. Evaluation Copy. If you are using an "evaluation copy", specifically designated as such by C1 on its website or elsewhere, then the Licenses are limited as follows: a) you are granted a license to use the SOFTWARE for a period of thirty (30) days counted from the day of installation (the "Evaluation Period"); b) upon completion of the Evaluation Period, you shall either i) delete the SOFTWARE from the computer containing the installation, or you may ii) obtain a paid license of the SOFTWARE from C1 or any of its resellers; and c) any Developed Software developed with the Evaluation Copy may not be distributed or used for any commercial purpose.

III. INTELLECTUAL PROPERTY.

1. Copyright. You agree that all right, title, and interest in and to the SOFTWARE (including, but not limited to, any images, photographs, animations, video, audio, music, text, and “applets” incorporated into the SOFTWARE), and any copies of the SOFTWARE, and any copyrights and other intellectual properties therein or related thereto are owned exclusively by C1, except to the limited extent that C1 may be the rightful license holder of certain third-party technologies incorporated into the SOFTWARE. The SOFTWARE is protected by copyright laws and international treaty provisions. The SOFTWARE is licensed to you, not sold to you. C1 reserves all rights not otherwise expressly and specifically granted to you in this EULA.

2. Backups. You may make a copy of the SOFTWARE solely for backup or archival purposes. Notwithstanding the foregoing, you may not copy the printed Documentation.

3. General Limitations. You may not reverse engineer, decompile, or disassemble the SOFTWARE, except and only to the extent that applicable law expressly permits such activity notwithstanding this limitation.

4. Software Transfers. You may not rent or lease the SOFTWARE. You may permanently transfer all of your rights under the EULA, provided that you retain no copies, that you transfer all the SOFTWARE (including all component parts, the media and printed materials, any updates, upgrades, this EULA and, if applicable, the Certificate of Authenticity), and that the transferee agrees to be bound by the terms of this EULA. If the SOFTWARE is an update or upgrade, any transfer must include all prior versions of the SOFTWARE.

5. Termination. Without prejudice to any other rights it may have, C1 may terminate this EULA and the Licenses if you fail to comply with the terms and conditions contained herein. In such an event, you must destroy all copies of the SOFTWARE and all of its component parts.

6. Export Restrictions. You acknowledge that the SOFTWARE is of U.S. origin. You acknowledge that the license and distribution of the SOFTWARE is subject to the export control laws and regulations of the United States of America, and any amendments thereof, which restrict exports and re-exports of software, technical data, and direct products of technical data, including services and Developed Software. You agree that you will not export or re-export the SOFTWARE or any Developed Software, or any information, documentation and/or printed materials related thereto, directly or indirectly, without first obtaining permission to do so as required from the United States of America Department of Commerce's Bureau of Export Administration ("BXA"), or other appropriate governmental agencies, to any countries, end-users, or for any end-uses that are restricted by U.S. export laws and regulations, and any amendments thereof, which include, but are not limited to: Restricted Countries, Restricted End-Users, and Restricted End-Uses.

These restrictions change from time to time. You represent and warrant that neither the BXA nor any other United States federal agency has suspended, revoked or denied your export privileges. C1 acknowledges that it shall use reasonable efforts to supply you with all reasonably necessary information regarding the SOFTWARE and its business to enable you to fully comply with the provisions of this Section. If you have any questions regarding your obligations under United States of America export regulations, you should contact the Bureau of Export Administration, United States Department of Commerce, Exporter Counseling Division, Washington DC. U.S.A. (202) 482-4811, http://www.bxa.doc.gov.

7. U.S. Government Restricted Rights. The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. You will comply with any requirements of the Government to obtain such RESTRICTED RIGHTS protection, including without limitation, the placement of any restrictive legends on the SOFTWARE, and any license agreement used in connection with the distribution of the SOFTWARE. Manufacturer is ComponentOne, LLC, 201 South Highland Avenue , 3rd Floor, Pittsburgh, Pennsylvania 15206 USA. For solicitations issued by the Government on or after December 1, 1995 and the Department of Defense on or after September 29, 1995, the only rights provided in the software and documentation provided herein shall be those contained in this EULA. Under no circumstances shall C1 be obligated to comply with any Governmental requirements regarding the submission of or the request for exemption from submission of cost or pricing data or cost accounting requirements. For any distribution of the SOFTWARE that would require compliance by C1 with the Government's requirements relating to cost or pricing data or cost accounting requirements, you must obtain an appropriate waiver or exemption from such requirements for the benefit of C1 from the appropriate Government authority before the distribution and/or license of the SOFTWARE to the Government.

IV. WARRANTIES AND REMEDIES.

1. Limited Warranty. C1 warrants that the original media, if any, are free from defects for ninety (90) days from the date of delivery of the SOFTWARE. C1 also warrants that: (i) it has the full power to enter into this Agreement and grant the license rights set forth herein; (ii) it has not granted and will not grant any rights in the Software to any third party which grant is inconsistent with the rights granted to you in this Agreement; and (iii) the Software does not and will not infringe any trade secret, copyright, trademark or other proprietary right held by any third party and does not infringe any patent held by any third party. EXCEPT AS OTHERWISE PROVIDED IN THE PRECEDING SENTENCE, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, C1 EXPRESSLY DISCLAIMS ANY WARRANTY FOR THE SOFTWARE, DOCUMENTATION AND ANYTHING ELSE PROVIDED BY C1 HEREBY AND C1 PROVIDES THE SAME IN “AS IS” CONDITION WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE AND DOCUMENTATION REMAINS WITH YOU. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHERS WHICH VARY FROM STATE TO STATE.

2. Limited Remedy. C1 PROVIDES NO REMEDIES OR WARRANTIES, WHETHER EXPRESS OR IMPLIED, FOR ANY SAMPLE APPLICATION CODE, REDISTRIBUTABLE FILES, TRIAL VERSION AND THE NOT FOR RESALE VERSION OF THE SOFTWARE. ANY SAMPLE APPLICATION CODE, TRIAL VERSION AND THE NOT FOR RESALE VERSION OF THE SOFTWARE ARE PROVIDED “AS IS”.

C1's entire liability and your exclusive remedy under this EULA shall be, at C1's sole option, either (a) return of the price paid for the SOFTWARE; (b) repair the SOFTWARE through updates distributed online or otherwise in C1's discretion; or (c) replace the SOFTWARE with SOFTWARE that substantially performs as described in the SOFTWARE documentation, provided that you return the SOFTWARE in the same manner as provided in Section I.2 for return of the SOFTWARE for non-acceptance of this EULA. Any media for any repaired or replacement SOFTWARE will be warranted for the remainder of the original warranty period or thirty (30) days, whichever is longer. THESE REMEDIES ARE NOT AVAILABLE OUTSIDE OF THE UNITED STATES OF AMERICA. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL C1 BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFIT, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF C1 HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES IN CERTAIN CASES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

V. MISCELLANEOUS.

1. This is the Entire Agreement. This EULA (including any addendum to this EULA included with the SOFTWARE) is the final, complete and exclusive statement of the entire agreement between you and C1 relating to the SOFTWARE. This EULA supersedes any prior and contemporaneous proposals, purchase orders, advertisements, and all other communications in relation to the subject matter of this EULA, whether oral or written. No terms or conditions, other than those contained herein, and no other understanding or agreement which in any way modifies these terms and conditions, shall be binding upon the parties unless entered into in writing executed between the parties, or by other non-oral manner of agreement whereby the parties objectively and definitively act in a manner to be bound (such as by continuing with an installation of the SOFTWARE, etc.). Employees, agents and other representatives of C1 are not permitted to orally modify this EULA.

2. You Indemnify C1. . You agree to indemnify, hold harmless, and defend C1 and its suppliers and resellers from and against any and all claims or lawsuits, including attorney's fees, which arise out of or result from your distribution of your Developed Software, your Developed Web Server Software or from your breach of any of the terms and conditions of this EULA.

3. Interpretation of this EULA. If for any reason a court of competent jurisdiction finds any provision of this EULA, or any portion thereof, to be unenforceable, that provision of this EULA will be enforced to the maximum extent permissible so as to effect the intent of the parties, and the remainder of this EULA will continue in full force and effect. Formatives of defined terms shall have the same meaning of the defined term. Failure by either party to enforce any provision of this EULA will not be deemed a waiver of future enforcement of that or any other provision. Except as otherwise required or superseded by law, this EULA is governed by the laws of the Commonwealth of Pennsylvania, without regard to its conflict of laws principles. The parties consent to the personal jurisdiction and venue of the Commonwealth of Pennsylvania, in the County of Allegheny, and agree that any legal proceedings arising out of this EULA shall be conducted solely in such Commonwealth. If the SOFTWARE was acquired outside the United States, then local law may apply.


Licensing FAQs

Licensing FAQs

This section describes the main technical aspects of licensing. It may help the user to understand and resolve licensing problems he may experience when using ComponentOne .NET and ASP.NET products.

What is Licensing?

How does Licensing Work?

Common Scenarios

Troubleshooting


What is Licensing?

What is Licensing?

Previous Next

Licensing is a mechanism used to protect intellectual property by ensuring that users are authorized to use software products.

Licensing is not only used to prevent illegal distribution of software products. Many software vendors, including ComponentOne, use licensing to allow potential users to test products before they decide to purchase them.

Without licensing, this type of distribution would not be practical for the vendor or convenient for the user. Vendors would either have to distribute evaluation software with limited functionality, or shift the burden of managing software licenses to customers, who could easily forget that the software being used is an evaluation version and has not been purchased.


How does Licensing Work?

How does Licensing Work?

Previous Next

ComponentOne uses a licensing model based on the standard set by Microsoft, which works with all types of components.

NOTE: The Compact Framework components use a slightly different mechanism for licensing than the other ComponentOne components due to platform differences.

When a user decides to purchase a product, he receives an installation program and a Serial Number. During the installation process, the user is prompted for the serial number that is saved on the system. (Users can also enter the serial number by clicking the "License" button on the About Box of any ComponentOne product.)

When a licensed component is added to a form or web page, Visual Studio asks the newly created component for licensing information. The component looks for licensing information stored in the system and generates a key, which Visual Studio saves in two files:

1. a "<projectName>.licenses" resource file which contains the actual key and

2. a "licenses.licx" file that contains references to those resources.

These files are automatically added to the project.

Note that the licenses.licx file is usually not shown in the Solution Explorer; it appears if you press the "Show All Files" button in the Solution Explorer's toolbox, or select "Project | Show All Files" from Visual Studio's main menu.

Later, when the component is created at run time, it gets passed the key that was created at design time and can decide whether to simply accept the key, to throw an exception and fail altogether, or to display some information reminding the user that the software has not been licensed.

All ComponentOne products are designed to display licensing information if the product is not licensed. None will throw licensing exceptions and prevent applications from running.


Common Scenarios

Common Scenarios

Creating components at design time

Creating components at run time

Inheriting from licensed components

Using licensed components in console applications

Using licensed components in Visual C++ applications


Creating components at design time

Creating components at design time

This is the most common scenario and also the simplest: the user adds one or more controls to the form, the licensing information is stored in the licenses.licx file, and the component works.

Note that the mechanism is exactly the same for Windows Forms and Web Forms (ASP.NET) projects.


Creating components at run time

Creating components at run time

This is also a fairly common scenario. You do not need an instance of the component on the form, but would like to create one or more instances at run time.

In this case, the project will not contain a licenses.licx file (or the file will not contain an appropriate key for the component) and therefore licensing will fail.

To fix this problem, add an instance of the component to a form in the project. This will create the licenses.licx file and things will then work as expected. (The component can be removed from the form after the licenses.licx file has been created).


Inheriting from licensed components

Inheriting from licensed components

If a component that inherits from a licensed component is created, the licensing information to be stored in the form is still needed. This can be done in two ways:

· Add a LicenseProvider attribute to the component.

This will mark the component as licensed. When a component is added to a form, Visual Studio will create and manage the licenses.licx file, and the base class will handle the licensing process as usual. No additional work is needed. For example:

[LicenseProvider(typeof(LicenseProvider))]

class MyGrid: C1.Win.C1FlexGrid.C1FlexGrid

{

// ...

}

· Add an instance of the base component to the form.

This will embed the licensing information into the licenses.licx file as in the previous scenario, and the base component will find it and use it. As before, the extra instance can be deleted after the licenses.licx file has been created.


Using licensed components in console applications

Using licensed components in console applications

When building console applications, there are no forms to add components to, and therefore Visual Studio won't create a licenses.licx file.

In these cases, create a temporary Windows Forms application and add all the desired licensed components to a form. Then close the Windows Forms application and copy the licenses.licx file into the console application project.

Make sure the licensex.licx file is configured as an embedded resource. To do this, right-click the licenses.licx file in the Solution Explorer window and select Properties. In the property window, set the "Build Action" property to "Embedded Resource".


Using licensed components in Visual C++ applications

Using licensed components in Visual C++ applications

It seems there is a bug in VC++ 2003. The licenses.licx is ignored during the build process, therefore the licensing information is not included in VC++ applications.

To fix this problem, extra steps must be taken to compile the licensing resources and link them to the project. Note the following:

1. Build the C++ project as usual. This should create an exe file and also a licenses.licx file with licensing information in it.

2. Copy the licenses.licx file from the app directory to the target folder (Debug or Release).

3. Copy the C1Lc.exe utility and the licensed dlls to the target folder. (Don't use the standard lc.exe, it has bugs.)

4. Use C1Lc.exe to compile the licenses.licx file. The command line should look like this:

c1lc /target:MyApp.exe /complist:licenses.licx /i:C1.Win.C1FlexGrid.dll

5. Link the licenses into the project. To do this, go back to Visual Studio, right-click the project, select properties, and go to the Linker/Command Line option. Enter the following:

/ASSEMBLYRESOURCE:Debug\MyApp.exe.licenses

6. Rebuild the executable to include the licensing information in the application.


Troubleshooting

Troubleshooting

We try very hard to make the licensing mechanism as unobtrusive as possible, but problems may occur for a number of reasons.

Below is a description of the most common problems and their solutions.


I have a licensed version of a ComponentOne product but I still get the splash screen when I run my project.

I have a licensed version of a ComponentOne product but I still get the splash screen when I run my project.

Previous Next

If this happens, there must be a problem with the licenses.licx file in the project. It either doesn't exist, contains wrong information, or is not configured correctly.

First, try a full rebuild ("Rebuild All" from the Visual Studio Build menu). This will usually rebuild the correct licensing resources.

If that fails, follow these steps:

1. Open the project and go to the Solution Explorer window.

2. Click the "Show All Files" button on the top of the window.

3. Find the licenses.licx file and delete it.

4. Close the project and reopen it.

5. Open the main form and add an instance of each licensed control.

6. Check the Solution Explorer window, there should be a licenses.licx file there.

7. Rebuild the project using the "Rebuild All" option (not just "Rebuild").


I have a licensed version of a ComponentOne product on my web server but the components still behave as unlicensed.

I have a licensed version of a ComponentOne product on my web server but the components still behave as unlicensed.

Previous Next

There is no need to install any licenses on machines used as servers and not used for development.

The components must be licensed on the development machine, therefore the licensing information will be saved into the executable (exe or dll) when the project is built. After that, the application can be deployed on any machine, including web servers.


I downloaded a new build of a component that I have purchased, and now I'm getting the splash screen when I build my projects.

I downloaded a new build of a component that I have purchased, and now I'm getting the splash screen when I build my projects.

Previous Next

Make sure that the license key is still valid. If you licensed the component over a year ago, your subscription may have expired. In this case, you have two options:

Option 1 - Renew your subscription to get a new license key.

If you choose this option, you will receive a new key that you can use to license the new components (from the installation utility or directly from the About Box).

The new subscription will entitle you to a full year of upgrades and to download the latest maintenance builds directly from http://prerelease.componentone.com/.

Option 2 – Continue to use the components you have.

Subscriptions expire, products do not. You can continue to use the components you received or downloaded while your subscription was valid.


Technical Support

Technical Support

ComponentOne Sizer for .NET is developed and supported by ComponentOne LLC, a company formed by the merger of APEX Software Corporation and VideoSoft. You can obtain technical support using any of the following methods:

ComponentOne Web Site

ComponentOne HelpCentral

Internet E-mail

Peer-to-Peer Newsgroup

Documentation


ComponentOne Web Site

ComponentOne Web Site

The ComponentOne Web site at www.componentone.com provides a wealth of information and software downloads for C1Sizer users:

· Descriptions of the various support options available through the ComponentOne Service Team.

· Answers to frequently asked questions (FAQ's) about C1Sizer, organized by functionality. Please consult the FAQ's before contacting us directly, as this can save you time and also introduce you to other useful information pertaining to C1Sizer.

· Free product updates, which provide you with bug fixes and new features.


ComponentOne HelpCentral

ComponentOne HelpCentral

ComponentOne HelpCentral is the new online resource for Visual Studio developers and Help authors. Visit HelpCentral to get information on ComponentOne products, view online demos, get Tech Tips and answers to frequently asked questions (FAQ's), search the ComponentOne knowledgebase and more!

You can access the new online resource at http://helpcentral.componentone.com/.


Internet E-mail

Internet E-mail

For technical support through the Internet, e-mail us at:

support.c1sizer.net@componentone.com

To help us provide you with the best support, please include the following information when contacting ComponentOne:

· Your ComponentOne product serial number.

· The version and name of your operating system.

· Your development environment and its version.

For more information on technical support, go to:

www.componentone.com/support


Peer-to-Peer Newsgroup

Peer-to-Peer Newsgroup

ComponentOne also sponsors a peer-to-peer newsgroup for C1Sizer users. ComponentOne does not offer formal technical support in this newsgroup, but instead sponsors it as a forum for users to post and answer each other's questions regarding C1Sizer. However, ComponentOne may monitor the newsgroup to ensure accuracy of information and provide comments when necessary. You can access the newsgroup from the ComponentOne Web site at http://helpcentral.componentone.com/Newsgroups.aspx.


Documentation

Documentation

ComponentOne documentation is available with each of our products in HTML Help, Microsoft Help 2.0 (.NET, ASP.NET and Mobile Device products only), and PDF format. All of the PDFs are also available on our Web site. If you have suggestions on how we can improve our documentation, please email the Documentation team. Please note that e-mail sent to the Documentation team is for documentation feedback only. Technical Support and Sales issues should be sent directly to their respective departments.


Redistributable Files

Redistributable Files

ComponentOne Sizer for .NET is developed and published by ComponentOne LLC. You may use it to develop applications in conjunction with Microsoft Visual Studio or any other programming environment that enables the user to use and integrate the control(s). You may also distribute, free of royalties, the following Redistributable Files with any such application you develop to the extent that they are used separately on a single CPU on the client/workstation side of the network:

· C1.Win.C1Sizer.dll

· C1.Win.C1Sizer.2.dll (if using Visual Studio 2005)

Site licenses are available for groups of multiple developers. Please contact Sales@ComponentOne.com for details.


Namespaces

Namespaces

Namespaces organize the objects defined in an assembly. Assemblies can contain multiple namespaces, which can in turn contain other namespaces. Namespaces prevent ambiguity and simplify references when using large groups of objects such as class libraries.

The general namespace for ComponentOne Windows products is C1.Win. The namespace for the C1Sizer control is C1.Win.C1Sizer. The following code fragment shows how to declare a C1Sizer control using the fully qualified name for this class:

· Visual Basic

· C#

· Delphi

Namespaces address a problem sometimes known as namespace pollution, in which the developer of a class library is hampered by the use of similar names in another library. These conflicts with existing components are sometimes called name collisions.

For example, if you create a new class named Column, you can use it inside your project without qualification. However, the C1Sizer assembly also implements a class called Column. So, if you want to use the C1Sizer class in the same project, you must use a fully qualified reference to make the reference unique. If the reference is not unique, Visual Studio .NET produces an error stating that the name is ambiguous. The following code snippet demonstrates how to declare these objects:

· Visual Basic

· C#

· Delphi

Fully qualified names are object references that are prefixed with the name of the namespace where the object is defined. You can use objects defined in other projects if you create a reference to the class (by choosing Add Reference from the Project menu) and then use the fully qualified name for the object in your code.

Fully qualified names prevent naming conflicts because the compiler can always determine which object is being used. However, the names themselves can get long and cumbersome. To get around this, you can use the Imports statement (using in C#) to define an alias — an abbreviated name you can use in place of a fully qualified name. For example, the following code snippet creates aliases for two fully qualified names, and uses these aliases to define two objects:

· Visual Basic

· C#

· Delphi

If you use the Imports statement without an alias, you can use all the names in that namespace without qualification provided they are unique to the project.

Note: As a warning about the code examples of this documentation, it is taken for granted that the following statement has been specified. This applies only to small code samples. Tutorials and other longer samples will specify complete qualifiers.

· Visual Basic

· C#

· Delphi


Creating a .NET Project

Creating a .NET Project

1. From the File menu in Microsoft Visual Studio .NET, select New and click Project. The New Project dialog box opens.

2. Under Project Types, choose either Visual Basic Projects or Visual C# Projects. Note that one of these options maybe be located under Other Languages.

3. Select Windows Application from the list of Templates in the right pane.

4. Enter or browse for a location for your application in the Location field and click OK. A new Microsoft Visual Studio .NET project is created in the specified location. In addition, a new Form1 is displayed in the Designer view.

5. Double-click the C1Sizer component from the Toolbox to add it to Form1. For more information on adding a component to the toolbox, see Customizing the Visual Studio Toolbox.


Customizing the Visual Studio Toolbox

Customizing the Visual Studio Toolbox

1. If the project is not open already then open the Visual Studio IDE (Microsoft Development Environment). Make sure the Toolbox is visible (select Toolbox in the View menu if necessary).

If you want the components to appear on their own tab in the Toolbox, right-click your mouse in the gray area of the tool box and select Add Tab from the context menu and type in the tab name, for example, “C1Sizer”.

Select the tab where you want the components to appear. Right-click the C1Sizer tab or one of the existing tabs and select Choose Items from the context menu. The Choose Toolbox Items dialog box appears.

6. In the Choose Toolbox Items dialog box, go to the .NET Framework Components tab. Sort the list by Namespace (click the Namespace column header). Go to the listing for the namespace you would like to add. Here you can check the components that will be installed on your toolbox:

7. Once you have added all of the necessary components to your Toolbox it will look similar to the Toolbox below:

Note: If the C1Sizer components don't appear in the C1Sizer tab then drag and drop them inside the tab area.


Migrating a C1Sizer Project to Visual Studio 2005

Migrating a C1Sizer Project to Visual Studio 2005

To migrate a project using ComponentOne components to Visual Studio 2005, there are two main steps that must be performed. First, you must convert your project to Visual Studio 2005, which includes removing any references to a previous assembly and adding a reference to the new assembly. Secondly, the .licx file, or licensing file, must be updated in order for the project to run correctly.

To convert the project:

1. Open Visual Studio 2005 and select File, Open Project.

2. Locate the .sln file for the project that you wish to convert to Visual Studio 2005. Select it and click Open. The Visual Studio Conversion Wizard appears.

3. Click Next.

4. Select Yes, create a backup before converting to create a backup of your current project and click Next.

5. Click Finish to convert your project to Visual Studio 2005. The Conversion Complete window appears.

6. Click Show the conversion log when the wizard is closed if you want to view the conversion log.

7. Click Close. The project opens. Now you must remove references to any of the previous ComponentOne .dlls and add references to the new ones.

8. Go to the Solution Explorer (View, Solution Explorer), select the project, and click the Show All Files button.

Note: The Show All Files button does not appear in the Solution Explorer toolbar if the Solution project node is selected.

9. Expand the References node, right-click C1.win.C1Sizer and select Remove.

10. Right-click the References node and select Add Reference.

11. Locate and select C1.Win.C1Sizer.2.dll. Click OK to add it to the project.

To update the .licx file:

1. In the Solution Explorer, right-click the licenses.licx file and select Delete.

2. Click OK to permanently delete licenses.licx. The project must be rebuilt to create a new, updated version of the .licx file.

3. Click the Start Debugging button to compile and run the project. The new .licx file may not be visible in the Solution Explorer.

4. Select File, Close to close the form and then double-click the Form.vb or Form.cs file in the Solution Explorer to reopen it. The new licenses.licx file appears in the list of files.

The migration process is complete.


C1Sizer Samples

C1Sizer Samples

Please be advised that this ComponentOne software title is accompanied by various sample projects and/or demos, which may or not make use of other ComponentOne development tools. While the sample projects and/or demos included with the software are used to demonstrate and highlight the product’s features, and how the control may be integrated with the rest of the ComponentOne product line, some of the controls used in the demo/sample project may not be included with the purchase of certain individual products.

The ComponentOne Samples are also available at http://helpcentral.componentone.com/ProductResources.aspx.


Visual Basic Samples

Visual Basic Samples

SizerTutorial1 | Demonstrates how to set up the grid and add controls. This sample uses the C1Sizer control.
SizerTutorial2 | Demonstrates how to add controls and set up the grid. This sample uses the C1Sizer control.


C# Samples

C# Samples

FakeOutlook | Create a user interface that looks like OutlookExpress. This sample uses the C1Sizer control.
FakeStudio | Create a user interface that looks like Visual Studio. This sample uses the C1Sizer control.
Light_MDI | Use the C1SizerLight with MDI forms. This sample uses the C1SizerLight control.
Light_Nested | Use C1SizerLight in forms with docked and nested controls. This sample uses the C1SizerLight control.
Light_Runtime | Control the C1SizerLight at runtime. This sample uses the C1SizerLight control.
Light_Toolbar | Automatically resize controls with a wrapping toolbar. The samples shows how the C1SizerLight component works when the form has a wrapping toolbar docked to the top. This sample uses the C1SizerLight control.


Using the C1SizerLight Component

Using the C1SizerLight Component

C1SizerLight is a non-visual component. When you add it to a form, it keeps track of the forms' size and position. When the form is resized, C1SizerLight resizes all contained controls proportionally, so the form retains its appearance at any resolution. C1SizerLight can also resize the fonts on all or some of the contained controls.

Using the C1SizerLight component is extremely easy. Start by creating a Windows Form as usual (or open an existing one), and simply add a C1SizerLight control to it. Then run the project and resize the form. All controls on the form will be automatically resized with the form (including their fonts).


Quick Tutorial

Quick Tutorial

To test this, open Visual Studio and create a new project, then populate the form so it looks like the following:

Now run the project and resize the form. If you make it smaller, parts of the controls will be clipped. If you make it bigger, you will see an empty gray area. You could make this better using the Dock and Align properties on the controls, but there is no combination of these two properties that will prevent the controls from overlapping each other or leaving blank areas on the form. Also, depending on your monitor's resolution, the fonts may appear very small when you enlarge the form.

Instead of making the form size fixed and giving up the resize feature, add a C1SizerLight component to the form. It is a non-visual component, so it will appear in the tray area below the form. You do not have to set any properties or write any code, just run the project again and resize the form. All contained controls will automatically resize and the form will retain its aspect:

Resizing Fonts

Notice that when you resized the form, the fonts in the button controls were resized to accommodate the new size. This is the default behavior provided by C1Sizer.

In some cases, you may want to prevent that and keep all the original font sizes. You can do this using the ResizeFonts property. Set ResizeFonts to False and the fonts will not resize.

You may also want to prevent font resizing in specific controls. For example, it would probably be a good idea to keep the font size constant for the list control on our sample form, and update the fonts on the buttons only. (In general, controls that can scroll their contents do not need the font resizing feature). To do this, you need to handle the C1SizerLight.ResizingFont event and cancel it for some controls. For example, the following event handler will cause the component to resize fonts in button controls only:

· Visual Basic

· C#

· Delphi

If you run the project again, you will notice that the ListBox control retains the original font when the form is resized.

Docked and Nested Controls

Although C1SizerLight provides a lot of easy-to-use power, you may still want to use the native layout capabilities in the .NET framework. For example, if you add a ToolBar or StatusBar control to the form, you probably want those controls docked to the top or bottom of the form, and C1SizerLight should not change their dimensions.

That is why C1SizerLight will not resize any docked controls. It will take into account the fact that they are docked and will reduce the form's client area accordingly, so all non-docked controls will still be resized correctly.

This makes it easy to use C1SizerLight and still takes advantage of the layout capabilities built into the .NET framework.

MDI Forms

C1SizerLight also works with MDI child forms. Simply add a C1SizerLight component to each child form and they will be resized proportionally, just like any regular form.


Using the C1Sizer Control

Using the C1Sizer Control

C1Sizer is a container control with a powerful grid layout manager that extends the basic layout capabilities provided by the .NET framework (Dock and Anchor properties). The C1Sizer control allows you to define a grid made up of bands, then add controls that snap to these bands. When the C1Sizer control is resized, the bands are automatically recalculated, and contained controls move automatically to their new positions. You can set up bands at design time and configure them to act as splitters, or to keep their size constant when the control is resized.

Think of C1Sizer as a piece of graph paper. Each component will occupy one or more of the little boxes on the paper. This is similar to tables in word processors such as Microsoft Word™, where you can merge adjacent cells, and to Java's Grid Bag Layout, which works in a similar way.

There are two basic approaches to using the C1Sizer control in your projects: You can set up the grid before or after you create the child controls.


Tutorial 1: Set up the grid then add controls

Tutorial 1: Set up the grid then add controls

1. Open Visual Studio and create a new project, then add a C1Sizer control to the form and set its Dock property to DockStyle.Fill so it takes up the whole form. At this point, the C1Sizer does not have a grid layout set up yet, or any child controls, so it will display a message with brief instructions on how to use the control, but this can be ignored for now.

2. Now, right-click the C1Sizer control and select the Edit Grid option from the menu. This will bring up the Grid Editor dialog so you can set up the grid layout. This is what the editor looks like:

3. Position the editor next to the grid so you can see the effect of the changes on the control. Next, click the Insert button until the grid has eight rows. Then, click the Columns tab and click Insert again until the grid has eight columns. This is what the control will look like at design time:

The grid is displayed at design time as a series of indented rectangles. Click OK to dismiss the editor, and add some controls to the form. Notice how the controls snap to the grid layout. You can resize any control and make it span any number of rows and columns.

4. To follow the tutorial, add some text boxes and label controls, and arrange them so the form looks like this:

Note: Remember to set the MultiLine property of the textbox controls to True, or they will not resize vertically.

If you think the controls are too close to each other or too far apart, change the SplitterWidth and BorderWidth properties to achieve the effect you want.

If you run the project now, you will see that when you resize the form, the textboxes and labels are automatically resized.

Cleaning Up the Grid

Right now the grid has eight rows and eight columns. Most of these bands are being used (controls are attached to them), but not all. To clean up the layout and get rid of unused bands, right click the C1Sizer control and select the "AutoGrid" option. This will clear any bands that have no controls attached to them.

Setting Up a Splitter

Each band (row or column) on the grid can be configured to act as a splitter. For example, if you wanted to allow users to control the size of the label area on the left, you would bring up the grid editor, select the first column and set the IsSplitter property to True, as shown below:

NOTE: A splitter can also be added by right-clicking the band and selecting Splitter from the context menu.

Notice the dark gray bar to the right of the first column. This indicates that the user will be able to drag that splitter at runtime, automatically resizing the labels and text boxes on the first two columns of the grid.

Setting Up a Fixed-Size Band

When the control is resized, the grid layout is adjusted to keep the proportion between the bands. You can designate certain bands as fixed size, and they will not be resized.

For example, we might want to allow only the bottom text box to be resized vertically, and keep the height of all others constant. To do this, bring up the grid editor, select the first six rows and set the IsFixedSize property to True, as show below:

NOTE: A fixed-sized band can also be configured by right-clicking the band and selecting Fixed Size from the context menu.

Notice the red markers on the first six rows. This indicates that those rows will not be resized with the form (the last two will).

Run the project once again to see the effect of these changes. Use the splitter to adjust the size of the labels and text boxes, then resize the form and notice how the top text boxes retain their height.


Tutorial 2: Add controls, then set up the grid

Tutorial 2: Add controls, then set up the grid

In the previous tutorial, we started with the grid and then added controls. You may prefer to work the other way around. Forget about the grid initially, and design your form the normal way. Then, when you are done, let C1Sizer create the grid for you automatically. (Of course, once the grid is created you may still modify it with the design time commands we used earlier to tweak the grid's appearance and behavior.)

1. Open Visual Studio and create a new project, then add a C1Sizer control to the form and set its Dock property to DockStyle.Fill so it takes up the whole form.

2. Now add some controls so the form looks like a FileOpen dialog:

You can use all the layout commands available in Visual Studio to set up this new form. There is nothing new so far.

3. Next, change the SplitterWidth property on the C1Sizer control to a small value, one or two pixels. This is recommended because the form has some buttons that are very close together, and we want them to stay that way when we create the grid.

4. To create the grid, right-click the C1Sizer control and select the AutoGrid option. The control will create a grid based on the position of the child controls. The grid will look like this:

If you run the project now, you will see that when you resize the form, the contained controls are resized proportionally.

5. In this case, however, you probably do not want the buttons and text boxes stretched vertically, only the list box. In this case, bring up the grid editor, select all rows except the one that contains the ListBox, and set the Band.IsFixedSize property to True, as shown below (note the fixed rows are highlighted in red in the designer):

6. The form is ready. Run the application and resize the form to see how controls snap to the grid and adjust the layout automatically.


C1Sizer Task-Based Help

C1Sizer Task-Based Help

The task-based help assumes that you are familiar with programming in Visual Basic.NET. By following the steps outlined in the help, you will be able to utilize the features of ComponentOne Sizer for .NET.

Position controls on the C1Sizer grid at runtime

Show gridlines of a C1Sizer control

Add drag and drop support to a C1Sizer control

Store layout information for the C1Sizer control

Print the contents of C1Sizer

Add a C1SizerLight component to a form at runtime


Position controls on the C1Sizer grid at runtime

Position controls on the C1Sizer grid at runtime

To position controls on the C1Sizer grid at runtime, simply move the control to the area where you want it to be located. The C1Sizer will snap the control to the nearest position on the grid, and will automatically resize the control when the form is resized. The control can be positioned over a single grid cell or it may span multiple cells.

The code below uses the C1Sizer.Row.Bounds and C1Sizer.Column.Bounds property to determine the position of a grid cell, and the Control. Bounds property to move the control.

· Visual Basic

· C#

· Delphi


Show gridlines of a C1Sizer control

Show gridlines of a C1Sizer control

To show the gridlines of a C1Sizer control, use the OnPaint event. For example, the code below uses the ControlPaint.DrawBorder3D method to show the C1Sizer gridlines.

· Visual Basic

· C#

· Delphi


Add drag and drop support to a C1Sizer control

Add drag and drop support to a C1Sizer control

To add drag and drop support, call the DoDragDrop method and handle the OnDragMove and OnDragDrop events. The code below shows how you can add drag and drop support so users can drag controls from one cell of the C1Sizer grid to another:

1. Set the C1Sizer's AllowDrop property to True

2. Handle the MouseDown event on the controls that are draggable and initiate dragging by calling the DoDragDrop method

· Visual Basic

· C#

· Delphi

3. Handle the OnDragMove and OnDragDrop events to accept the drop operation:

· Visual Basic

· C#

· Delphi


Store layout information for the C1Sizer control

Store layout information for the C1Sizer control

To store layout information for the C1Sizer control, use the GridDefinition property that gets or sets a string containing the grid information. This property is non-browsable, but can be used as any other property.

The code below shows how to implement two buttons that save and restore the grid definition and control positions.

· Visual Basic

· C#

· Delphi


Print the contents of C1Sizer

Print the contents of C1Sizer

There is no built-in support for printing the contents of a C1Sizer control, but the following method can be used to convert any control into an image, which can then be printed or saved.

· Visual Basic

· C#

· Delphi


Add a C1SizerLight component to a form at runtime

Add a C1SizerLight component to a form at runtime

To add a C1SizerLight component to a form at runtime, add the following code to your Form_Load event.

· Visual Basic

· C#

· Delphi

To create a generic form start-up procedure which every form will call, use the following code.

· Visual Basic

· C#

· Delphi


C1.Win.C1Sizer.2 Assembly

C1.Win.C1Sizer.2 Assembly

Namespaces

C1.Win.C1Sizer


C1.Win.C1Sizer Namespace

C1.Win.C1Sizer Namespace

C1.Win.C1Sizer Hierarchy

Classes

Class | Description
Band | Abstract class that serves as a base for the Row and Column classes.
BandCollection | Abstract class that serves as a base for the RowCollection and ColumnCollection classes.
C1Sizer | A container control with a powerful grid layout manager that extends the basic layout capabilities provided by the .NET framework (Dock and Anchor properties).
C1SizerEventArgs | Provides data for the SplitterMoving and SplitterMoved events of a C1Sizer control.
C1SizerLight | Component that resizes all controls on a form when the form is resized.
C1SizerLightEventArgs | Provides data for the ResizingFont event of a C1SizerLight component.
Column | Summary description for Column.
ColumnCollection | Collection of Column objects.
Grid | Summary description for Grid.
Row | Summary description for Row.
RowCollection | Collection of Row objects.

Delegates

Delegate | Description
C1SizerEventHandler | Represents the methods that will handle the SplitterMoving and SplitterMoved events of a C1Sizer control.
C1SizerLightEventHandler | Represents the method that will handle the ResizingFont event of a C1SizerLight component.

Enumerations

Enumeration | Description
AutoSizeEnum | Represents the possible sizing modes.

See Also

C1.Win.C1Sizer.2 Assembly


AutoSizeEnum Enumeration

AutoSizeEnum Enumeration

Represents the possible sizing modes.

[Visual Basic]

Public Enum AutoSizeEnum

[C#]

public enum AutoSizeEnum

[Delphi]

type AutoSizeEnum = (Grid, None);

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

Members

Member name | Description
Grid | Size child controls to snap to the sizer's AutoSizeEnum.Grid.
None | No resizing.

See Also

C1.Win.C1Sizer Namespace


Band Class

Band Class

Abstract class that serves as a base for the Row and Column classes.

For a list of all members of this type, see Band Members.

System.Object

C1.Win.C1Sizer.Band

C1.Win.C1Sizer.Column

C1.Win.C1Sizer.Row

[Visual Basic]

MustInherit Public Class Band

[C#]

public abstract class Band

[Delphi]

type Band = class abstract;

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


Band Members

Band Members

Band overview

Public Properties

Bounds | Gets a System.Drawing.Rectangle that represents the size and location of the band within the parent C1Sizer control.
Index | Gets the index of the Band in the owner collection.
IsFixedSize | Determines whether the Band should retain its size when the control is resized.
IsSplitter | Determines whether the band acts like a splitter (can be resized with the mouse at run time).
Size | Gets or sets the size of this Band object.

See Also


Band Properties

Band Properties

The properties of the Band class are listed here. For a complete list of Band class members, see the Band Members topic.

Public Properties

Bounds | Gets a System.Drawing.Rectangle that represents the size and location of the band within the parent C1Sizer control.
Index | Gets the index of the Band in the owner collection.
IsFixedSize | Determines whether the Band should retain its size when the control is resized.
IsSplitter | Determines whether the band acts like a splitter (can be resized with the mouse at run time).
Size | Gets or sets the size of this Band object.

See Also


Band.Bounds Property

Band.Bounds Property

Gets a System.Drawing.Rectangle that represents the size and location of the band within the parent C1Sizer control.

[Visual Basic]

Public ReadOnly Property Bounds As Rectangle

[C#]

public Rectangle Bounds {get;}

[Delphi]

public property Bounds: Rectangle read get_Bounds;

Remarks

You can use the Bounds property to determine the position of specific grid cells. For example, the code below moves a button control into cell 1,1 of the layout grid:

· Visual Basic

· C#

· Delphi

See Also


Band.Index Property

Band.Index Property

Gets the index of the Band in the owner collection.

[Visual Basic]

Public ReadOnly Property Index As Integer

[C#]

public int Index {get;}

[Delphi]

public property Index: Int32 read get_Index;

See Also


Band.IsFixedSize Property

Band.IsFixedSize Property

Determines whether the Band should retain its size when the control is resized.

[Visual Basic]

Public Property IsFixedSize As Boolean

[C#]

public bool IsFixedSize {get;set;}

[Delphi]

public property IsFixedSize: Boolean read get_IsFixedSize write set_IsFixedSize;

Remarks

When the control is resized, it updates the layout grid so it always fills the control's client area. Normally, this is done by scaling every band and keeping their proportion constant.

In some cases, however, you may want to keep the size of a band constant, and let the other bands shrink or expand to accommodate the new control dimensions. For example, you may have a row that contains constant-size headings, and should not be resized with the control. In these cases, set the IsFixedSize property to true and the band will not be resized when the control dimensions change.

The IsFixedSize property prevents the control from resizing the band when the control is resized. It does not prevent the user from resizing the band with the mouse if the IsSplitter property is set to true.

See Also


Band.IsSplitter Property

Band.IsSplitter Property

Determines whether the band acts like a splitter (can be resized with the mouse at run time).

[Visual Basic]

Public Property IsSplitter As Boolean

[C#]

public bool IsSplitter {get;set;}

[Delphi]

public property IsSplitter: Boolean read get_IsSplitter write set_IsSplitter;

Remarks

The IsSplitter property controls the splitter bar below each row and to the right of each column.

IsSplitter has no effect on the last band in a collection, because the last band always ends at the edge of the control and thus cannot be resized with the mouse.

See Also


Band.Size Property

Band.Size Property

Gets or sets the size of this Band object.

[Visual Basic]

Overridable MustInherit Public Property Size As Integer

[C#]

virtual abstract public int Size {get;set;}

[Delphi]

public property Size: Int32 read get_Size write set_Size;

Remarks

If the Band is a Row object, the size represents the row height in pixels.

If the Band is a Column object, the size represents the column width in pixels.

See Also


BandCollection Class

BandCollection Class

Abstract class that serves as a base for the RowCollection and ColumnCollection classes.

For a list of all members of this type, see BandCollection Members.

System.Object

C1.Win.C1Sizer.BandCollection

C1.Win.C1Sizer.ColumnCollection

C1.Win.C1Sizer.RowCollection

[Visual Basic]

MustInherit Public Class BandCollection

Implements IEnumerable

[C#]

public abstract class BandCollection : IEnumerable

[Delphi]

type BandCollection = class abstract (TObject, IEnumerable);

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


BandCollection Members

BandCollection Members

BandCollection overview

Public Properties

Count

Gets or sets the number of bands in the collection.

Public Methods

Insert | Inserts a new Band at a specified position in the collection.
Remove | Removes a Band from the collection.
SetSizes | Sets the size of multiple bands in the collection.

See Also


BandCollection Properties

BandCollection Properties

The properties of the BandCollection class are listed here. For a complete list of BandCollection class members, see the BandCollection Members topic.

Public Properties

Count

Gets or sets the number of bands in the collection.

See Also


BandCollection.Count Property

BandCollection.Count Property

Gets or sets the number of bands in the collection.

[Visual Basic]

Public Property Count As Integer

[C#]

public int Count {get;set;}

[Delphi]

public property Count: Int32 read get_Count write set_Count;

See Also


BandCollection Methods

BandCollection Methods

The methods of the BandCollection class are listed here. For a complete list of BandCollection class members, see the BandCollection Members topic.

Public Methods

Insert | Inserts a new Band at a specified position in the collection.
Remove | Removes a Band from the collection.
SetSizes | Sets the size of multiple bands in the collection.

See Also


BandCollection.Insert Method

BandCollection.Insert Method

Inserts a new Band at a specified position in the collection.

[Visual Basic]

Public Sub Insert( _

ByVal index As Integer _

)

[C#]

public void Insert(

int index

);

[Delphi]

public procedure Insert(

index: Int32

);

Parameters

index

Position where the new band will be inserted.

See Also


BandCollection.Remove Method

BandCollection.Remove Method

Removes a Band from the collection.

[Visual Basic]

Public Sub Remove( _

ByVal index As Integer _

)

[C#]

public void Remove(

int index

);

[Delphi]

public procedure Remove(

index: Int32

);

Parameters

index

Index of the band that will be removed from the collection.

See Also


BandCollection.SetSizes Method

BandCollection.SetSizes Method

Sets the size of multiple bands in the collection.

[Visual Basic]

Public Sub SetSizes( _

ByVal sizes As Integer() _

)

[C#]

public void SetSizes(

int[] sizes

);

[Delphi]

public procedure SetSizes(

sizes: Int32()

);

Parameters

sizes

A vector containing the new sizes for each band in the collection.

Remarks

You can set the size of a Band object by setting its Size property. However, this will cause other bands to resize immediately, so the collection always fills the client area of the C1Sizer control.

This method allows you to set the size of multiple bands simultaneously, with a single call.

Any negative dimensions in the sizes array will be ignored, and the corresponding bands will retain their current dimension.

· Visual Basic

· C#

· Delphi

See Also


C1Sizer Class

C1Sizer Class

A container control with a powerful grid layout manager that extends the basic layout capabilities provided by the .NET framework (Dock and Anchor properties).

For a list of all members of this type, see C1Sizer Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

System.Windows.Forms.Control

System.Windows.Forms.PictureBox

C1.Win.C1Sizer.C1Sizer

[Visual Basic]

Public Class C1Sizer

Inherits PictureBox

Implements hf, ISupportInitialize

[C#]

public class C1Sizer : PictureBox , hf, ISupportInitialize

[Delphi]

type C1Sizer = class (PictureBox, hf, ISupportInitialize);

Remarks

The C1Sizer control allows you to define a grid made up of bands, then add controls that snap to these bands. When the C1Sizer control is resized, the bands are automatically recalculated, and contained controls move automatically to their new positions.

You can set up bands at design time and configure them to act as splitters or to keep their size constant when the control is resized.

You will rarely have to write any code in order to use the C1Sizer component. In most applications, you will follow these steps:

1) Add one or more C1Sizer controls to the form, and set their Dock property to fill the form,

2) Use the Grid Editor to set up a grid layout at design time, and add controls which will snap to the grid.

You can use the Grid Editor to set the number and dimension of the grid's bands (rows and columns), and also to specify which bands should act as splitters, and which should have fixed dimensions.

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


C1Sizer Members

C1Sizer Members

C1Sizer overview

Public Constructors

C1Sizer Constructor

Initializes a new instance of the C1Sizer control.

Public Properties

AccessibilityObject (inherited from Control) | The accessibility object for this control.
AccessibleDefaultActionDescription (inherited from Control) | The default action description of the control.
AccessibleDescription (inherited from Control) | The description that will be reported to accessibility clients.
AccessibleName (inherited from Control) | The name that will be reported to accessibility clients.
AccessibleRole (inherited from Control) | The role that will be reported to accessibility clients.
Anchor (inherited from Control) | Defines the edges of the container to which a certain control is bound. When a control is anchored to an edge, the distance between the control's closest edge and the specified edge will remain constant.
AutoSizeMode | Gets or sets the mode to layout child controls.
BackColor (inherited from Control) | The background color of the component.
BackgroundImage (inherited from Control) | The background image used for the control.
BackgroundImageLayout (inherited from Control) | The background image layout used for the component.
BindingContext (inherited from Control) | The binding context for the control.
BorderStyle (inherited from PictureBox) | Controls what type of border the PictureBox should have.
BorderWidth | Gets or sets the width of the area around the layout grid, in pixels.
Bottom (inherited from Control) | The bottom of the control, in container coordinates.
Bounds (inherited from Control) | The bounds of the control, in container coordinates.
CanFocus (inherited from Control) | Checks if this control can receive the focus.
CanSelect (inherited from Control) | Checks if this control can be selected.
Capture (inherited from Control) | Determines if this control is currently capturing all mouse input.
ClientRectangle (inherited from Control) | Retrieves the rectangle of the inner area of this control.
ClientSize (inherited from Control) | Determines the size of the inner area of this control.
CompanyName (inherited from Control) | ControlCompanyNameDescr
ContainsFocus (inherited from Control) | Determines if this control or one if its children currently has the focus.
ContextMenu (inherited from Control) | The shortcut menu to display when the user right-clicks the control.
ContextMenuStrip (inherited from Control) | The shortcut menu to display when the user right-clicks the control.
Controls (inherited from Control) | The collection of child controls within this control.
Created (inherited from Control) | Determines if the control has been fully created.
DataBindings (inherited from Control) | The data bindings for the control.
DisplayRectangle (inherited from Control) | Retrieves the display rectangle of this control.
Disposing (inherited from Control) | Determines whether this control is in the process of being disposed.
Dock (inherited from Control) | Defines which borders of the control are bound to the container.
Enabled (inherited from Control) | Indicates whether the control is enabled.
ErrorImage (inherited from PictureBox) | Image to display when the load of another image fails.
Focused (inherited from Control) | Determines if this control has focus.
Grid | Returns a reference to a Grid object that contains the layout information for the C1Sizer control.
Handle (inherited from Control) | The native handle for this control.
HasChildren (inherited from Control) | Indicates whether the control contains one or more child controls.
Height (inherited from Control) | The height of the user interface element, in pixels.
Image (inherited from PictureBox) | The image displayed in the PictureBox.
ImageLocation (inherited from PictureBox) | Disk or Web location to load image from.
InitialImage (inherited from PictureBox) | Image to display while another image is loading.
InvokeRequired (inherited from Control) | Determines if Invoke or BeginInvoke should be used to access this control cross-thread.
IsAccessible (inherited from Control) | Indicates whether the control is visible to accessibility applications.
IsDisposed (inherited from Control) | Determines if this control has been disposed.
IsHandleCreated (inherited from Control) | Indicates whether the control has a handle associated with it.
IsMirrored (inherited from Control) | Indicates whether the control is mirrored.
Left (inherited from Control) | The upper left of the control, in container coordinates.
Location (inherited from Control) | The coordinates of the upper-left corner of the control relative to the upper-left corner of its container.
Margin (inherited from Control) | Specifies space between this control and another control's margin.
MaximumSize (inherited from Control) | Specifies the maximum size of the control.
MinimumSize (inherited from Control) | Specifies the minimum size of the control.
Padding (inherited from Control) | Specifies the interior spacing of a control.
Parent (inherited from Control) | The parent of this control.
ProductName (inherited from Control) | Retrieves the name of the product associated with this component.
ProductVersion (inherited from Control) | Retrieves the version of the product associated with this component.
RecreatingHandle (inherited from Control) | Determines if this control is in the process of recreating its handle.
Region (inherited from Control) | The region, or shape, of this control.
Right (inherited from Control) | The distance, in pixels, between the right edge of the control and the left edge of its container's client area.
Size (inherited from Control) | The size of the control in pixels.
SplitterWidth | Gets or sets the width of the area between grid bands, in pixels.
Tag (inherited from Control) | User-defined data associated with the object.
Top (inherited from Control) | The top of the control, in container coordinates.
TopLevelControl (inherited from Control) | Retrieves the top-level control that contains this control.
UseWaitCursor (inherited from Control) | When this property is true, the Cursor property of the control and its child controls is set to WaitCursor.
Visible (inherited from Control) | Determines whether the control is visible or hidden.
WaitOnLoad (inherited from PictureBox) | Controls whether processing will stop until the image is loaded.
Width (inherited from Control) | The width of the control, in container coordinates.

Public Methods

CancelAsync (inherited from PictureBox) | Attempts to cancel any current image-loading operation.
Load (inherited from PictureBox) | Overloaded. Loads the image from the location specified in ImageLocation.
LoadAsync (inherited from PictureBox) | Overloaded. Initiates asynchronous loading of the image from the location specified in ImageLocation.

Public Events

BackColorChanged (inherited from Control) | Event raised when the value of the BackColor property is changed on Control.
BackgroundImageChanged (inherited from Control) | Event raised when the value of the BackgroundImage property is changed on Control.
BackgroundImageLayoutChanged (inherited from Control) | Event raised when the value of the BackgroundImageLayout property is changed on Control.
BindingContextChanged (inherited from Control) | Event raised when the value of the BindingContext property is changed on Control.
ChangeUICues (inherited from Control) | Occurs when focus rectangles and keyboard cue underlines are being shown or hidden.
Click (inherited from Control) | Occurs when the component is clicked.
ClientSizeChanged (inherited from Control) | Event raised when the value of the ClientSize property is changed on Control.
ContextMenuChanged (inherited from Control) | Occurs when the value of the ContextMenu property changes.
ContextMenuStripChanged (inherited from Control) | Occurs when the value of the ContextMenuStrip property changes.
ControlAdded (inherited from Control) | Occurs when a control is added to this control.
ControlRemoved (inherited from Control) | Occurs when a control is removed from this control.
CursorChanged (inherited from Control) | Event raised when the value of the Cursor property is changed on Control.
DockChanged (inherited from Control) | Event raised when the value of the Dock property is changed on Control.
DoubleClick (inherited from Control) | Occurs when the component is double-clicked.
DragDrop (inherited from Control) | Occurs when a drag-and-drop operation is completed.
DragEnter (inherited from Control) | Occurs when the mouse drags an item into the client area for this Control.
DragLeave (inherited from Control) | Occurs when an object is dragged out of the control's bounds.
DragOver (inherited from Control) | Occurs when an object is dragged over the control's bounds.
EnabledChanged (inherited from Control) | Occurs when the control's enabled state changes.
GiveFeedback (inherited from Control) | Occurs when the mouse drags an item. The system requests that the Control provide feedback to that effect.
GotFocus (inherited from Control) | Occurs when the control gets focus.
HandleCreated (inherited from Control) | Occurs when the control's native handle is created.
HandleDestroyed (inherited from Control) | Occurs when the control's native handle is destroyed.
HelpRequested (inherited from Control) | Occurs when the user invokes Help for the control.
Invalidated (inherited from Control) | Occurs when a control's display requires redrawing.
Layout (inherited from Control) | Occurs when the control is about to lay out its contents.
LoadCompleted (inherited from PictureBox) | Event raised when loading into a PictureBox finishes.
LoadProgressChanged (inherited from PictureBox) | Event raised when progress is reported during loading into a PictureBox.
LocationChanged (inherited from Control) | Event raised when the value of the Location property is changed on Control.
LostFocus (inherited from Control) | Occurs when the control loses focus.
MarginChanged (inherited from Control) | Occurs when the Margin property has changed.
MouseCaptureChanged (inherited from Control) | Occurs after the mouse capture is changed.
MouseClick (inherited from Control) | Occurs when the control is clicked by the mouse.
MouseDoubleClick (inherited from Control) | Occurs when the control is double clicked by the mouse.
MouseDown (inherited from Control) | Occurs when the mouse pointer is over the component and a mouse button is pressed.
MouseEnter (inherited from Control) | Occurs when the mouse enters the visible part of the control.
MouseHover (inherited from Control) | Occurs when the mouse remains stationary inside of the control for an amount of time.
MouseLeave (inherited from Control) | Occurs when the mouse leaves the visible part of the control.
MouseMove (inherited from Control) | Occurs when the mouse pointer is moved over the component.
MouseUp (inherited from Control) | Occurs when the mouse pointer is over the component and a mouse button is released.
MouseWheel (inherited from Control) | Occurs when the mouse wheel moves while the control has focus.
Move (inherited from Control) | Occurs when a control is moved.
PaddingChanged (inherited from Control) | Occurs when the Padding property has changed.
Paint (inherited from Control) | Occurs when a control needs repainting.
ParentChanged (inherited from Control) | Event raised when the value of the Parent property is changed on Control.
PreviewKeyDown (inherited from Control) | Occurs before the KeyDown event when a key is pressed while focus is on this control.
QueryAccessibilityHelp (inherited from Control) | Occurs when an Accessibility client invokes Help for the control.
QueryContinueDrag (inherited from Control) | Occurs when the mouse drags an item. The system requests whether the drag-and-drop operation should be allowed to continue.
RegionChanged (inherited from Control) | Event raised when the value of Region property is changed on Control.
Resize (inherited from Control) | Occurs when a control is resized.
SizeChanged (inherited from Control) | Event raised when the value of the Size property is changed on Control.
SizeModeChanged (inherited from PictureBox) | Event raised when the value of the SizeMode property is changed on the PictureBox.
SplitterMoved | Fired when the user finishes resizing a band (row or column) by dragging a splitter bar.
SplitterMoving | Fired when the user clicks a splitter and starts resizing a band (row or column) on the layout grid.
StyleChanged (inherited from Control) | Event raised when the window style of a Control is changed.
SystemColorsChanged (inherited from Control) | Event raised when the system colors change.
Validated (inherited from Control) | Occurs after a control has been successfully validated.
Validating (inherited from Control) | Occurs when the control is validating.
VisibleChanged (inherited from Control) | Occurs when the control's visibility changes.

Protected Properties

DoubleBuffered (inherited from Control) | Indicates whether the control will be double buffered.
ResizeRedraw (inherited from Control) | Indicates whether the control should redraw itself when resized.

Protected Methods

OnControlAdded | Overriden. Raises the System.Windows.Forms.Control.ControlAdded event.
OnControlRemoved | Overriden. Raises the System.Windows.Forms.Control.ControlRemoved event.
OnMouseDown | Overriden. Raises the System.Windows.Forms.Control.MouseDown event.
OnMouseLeave | Overriden. Raises the System.Windows.Forms.Control.MouseLeave event.
OnMouseMove | Overriden. Raises the System.Windows.Forms.Control.MouseMove event.
OnMouseUp | Overriden. Raises the System.Windows.Forms.Control.MouseUp event.
OnPaint | Overriden. Raises the System.Windows.Forms.Control.Paint event.
OnSizeChanged | Overriden. Raises the System.Windows.Forms.Control.SizeChanged event.
OnSplitterMoved | Raises the OnSplitterMoved event.
OnSplitterMoving | Raises the OnSplitterMoving event.

See Also


C1Sizer Constructor

C1Sizer Constructor

Initializes a new instance of the C1Sizer control.

[Visual Basic]

Public Function New()

[C#]

public C1Sizer()

[Delphi]

public constructor Create();

See Also


C1Sizer Properties

C1Sizer Properties

The properties of the C1Sizer class are listed here. For a complete list of C1Sizer class members, see the C1Sizer Members topic.

Public Properties

AccessibilityObject (inherited from Control) | The accessibility object for this control.
AccessibleDefaultActionDescription (inherited from Control) | The default action description of the control.
AccessibleDescription (inherited from Control) | The description that will be reported to accessibility clients.
AccessibleName (inherited from Control) | The name that will be reported to accessibility clients.
AccessibleRole (inherited from Control) | The role that will be reported to accessibility clients.
Anchor (inherited from Control) | Defines the edges of the container to which a certain control is bound. When a control is anchored to an edge, the distance between the control's closest edge and the specified edge will remain constant.
AutoSizeMode | Gets or sets the mode to layout child controls.
BackColor (inherited from Control) | The background color of the component.
BackgroundImage (inherited from Control) | The background image used for the control.
BackgroundImageLayout (inherited from Control) | The background image layout used for the component.
BindingContext (inherited from Control) | The binding context for the control.
BorderStyle (inherited from PictureBox) | Controls what type of border the PictureBox should have.
BorderWidth | Gets or sets the width of the area around the layout grid, in pixels.
Bottom (inherited from Control) | The bottom of the control, in container coordinates.
Bounds (inherited from Control) | The bounds of the control, in container coordinates.
CanFocus (inherited from Control) | Checks if this control can receive the focus.
CanSelect (inherited from Control) | Checks if this control can be selected.
Capture (inherited from Control) | Determines if this control is currently capturing all mouse input.
ClientRectangle (inherited from Control) | Retrieves the rectangle of the inner area of this control.
ClientSize (inherited from Control) | Determines the size of the inner area of this control.
CompanyName (inherited from Control) | ControlCompanyNameDescr
ContainsFocus (inherited from Control) | Determines if this control or one if its children currently has the focus.
ContextMenu (inherited from Control) | The shortcut menu to display when the user right-clicks the control.
ContextMenuStrip (inherited from Control) | The shortcut menu to display when the user right-clicks the control.
Controls (inherited from Control) | The collection of child controls within this control.
Created (inherited from Control) | Determines if the control has been fully created.
DataBindings (inherited from Control) | The data bindings for the control.
DisplayRectangle (inherited from Control) | Retrieves the display rectangle of this control.
Disposing (inherited from Control) | Determines whether this control is in the process of being disposed.
Dock (inherited from Control) | Defines which borders of the control are bound to the container.
Enabled (inherited from Control) | Indicates whether the control is enabled.
ErrorImage (inherited from PictureBox) | Image to display when the load of another image fails.
Focused (inherited from Control) | Determines if this control has focus.
Grid | Returns a reference to a Grid object that contains the layout information for the C1Sizer control.
Handle (inherited from Control) | The native handle for this control.
HasChildren (inherited from Control) | Indicates whether the control contains one or more child controls.
Height (inherited from Control) | The height of the user interface element, in pixels.
Image (inherited from PictureBox) | The image displayed in the PictureBox.
ImageLocation (inherited from PictureBox) | Disk or Web location to load image from.
InitialImage (inherited from PictureBox) | Image to display while another image is loading.
InvokeRequired (inherited from Control) | Determines if Invoke or BeginInvoke should be used to access this control cross-thread.
IsAccessible (inherited from Control) | Indicates whether the control is visible to accessibility applications.
IsDisposed (inherited from Control) | Determines if this control has been disposed.
IsHandleCreated (inherited from Control) | Indicates whether the control has a handle associated with it.
IsMirrored (inherited from Control) | Indicates whether the control is mirrored.
Left (inherited from Control) | The upper left of the control, in container coordinates.
Location (inherited from Control) | The coordinates of the upper-left corner of the control relative to the upper-left corner of its container.
Margin (inherited from Control) | Specifies space between this control and another control's margin.
MaximumSize (inherited from Control) | Specifies the maximum size of the control.
MinimumSize (inherited from Control) | Specifies the minimum size of the control.
Padding (inherited from Control) | Specifies the interior spacing of a control.
Parent (inherited from Control) | The parent of this control.
ProductName (inherited from Control) | Retrieves the name of the product associated with this component.
ProductVersion (inherited from Control) | Retrieves the version of the product associated with this component.
RecreatingHandle (inherited from Control) | Determines if this control is in the process of recreating its handle.
Region (inherited from Control) | The region, or shape, of this control.
Right (inherited from Control) | The distance, in pixels, between the right edge of the control and the left edge of its container's client area.
Size (inherited from Control) | The size of the control in pixels.
SplitterWidth | Gets or sets the width of the area between grid bands, in pixels.
Tag (inherited from Control) | User-defined data associated with the object.
Top (inherited from Control) | The top of the control, in container coordinates.
TopLevelControl (inherited from Control) | Retrieves the top-level control that contains this control.
UseWaitCursor (inherited from Control) | When this property is true, the Cursor property of the control and its child controls is set to WaitCursor.
Visible (inherited from Control) | Determines whether the control is visible or hidden.
WaitOnLoad (inherited from PictureBox) | Controls whether processing will stop until the image is loaded.
Width (inherited from Control) | The width of the control, in container coordinates.

Protected Properties

DoubleBuffered (inherited from Control) | Indicates whether the control will be double buffered.
ResizeRedraw (inherited from Control) | Indicates whether the control should redraw itself when resized.

See Also


C1Sizer.AutoSizeMode Property

C1Sizer.AutoSizeMode Property

Gets or sets the mode to layout child controls.

[Visual Basic]

Public Property AutoSizeMode As AutoSizeEnum

[C#]

public AutoSizeEnum AutoSizeMode {get;set;}

[Delphi]

public property AutoSizeMode: AutoSizeEnum read get_AutoSizeMode write set_AutoSizeMode;

See Also


C1Sizer.BorderWidth Property

C1Sizer.BorderWidth Property

Gets or sets the width of the area around the layout grid, in pixels.

[Visual Basic]

Public Property BorderWidth As Integer

[C#]

public int BorderWidth {get;set;}

[Delphi]

public property BorderWidth: Int32 read get_BorderWidth write set_BorderWidth;

Remarks

The border delimits the area between the edges of the C1Sizer control and all controls contained in it.

See Also


C1Sizer.Grid Property

C1Sizer.Grid Property

Returns a reference to a Grid object that contains the layout information for the C1Sizer control.

[Visual Basic]

Public ReadOnly Property Grid As Grid

[C#]

public Grid Grid {get;}

[Delphi]

public property Grid: Grid read get_Grid;

Remarks

The Grid object contains collections of bands (Row and Column objects) that determine how the control adjusts its internal layout when it is resized.

All controls contained in a C1Sizer control are attached to specific bands in the Grid object.

See Also


C1Sizer.SplitterWidth Property

C1Sizer.SplitterWidth Property

Gets or sets the width of the area between grid bands, in pixels.

[Visual Basic]

Public Property SplitterWidth As Integer

[C#]

public int SplitterWidth {get;set;}

[Delphi]

public property SplitterWidth: Int32 read get_SplitterWidth write set_SplitterWidth;

Remarks

The splitter width determines the area between adjacent controls contained in the C1Sizer control.

See Also


C1Sizer Methods

C1Sizer Methods

The methods of the C1Sizer class are listed here. For a complete list of C1Sizer class members, see the C1Sizer Members topic.

Public Methods

CancelAsync (inherited from PictureBox) | Attempts to cancel any current image-loading operation.
Load (inherited from PictureBox) | Overloaded. Loads the image from the location specified in ImageLocation.
LoadAsync (inherited from PictureBox) | Overloaded. Initiates asynchronous loading of the image from the location specified in ImageLocation.

Protected Methods

OnControlAdded | Overriden. Raises the System.Windows.Forms.Control.ControlAdded event.
OnControlRemoved | Overriden. Raises the System.Windows.Forms.Control.ControlRemoved event.
OnMouseDown | Overriden. Raises the System.Windows.Forms.Control.MouseDown event.
OnMouseLeave | Overriden. Raises the System.Windows.Forms.Control.MouseLeave event.
OnMouseMove | Overriden. Raises the System.Windows.Forms.Control.MouseMove event.
OnMouseUp | Overriden. Raises the System.Windows.Forms.Control.MouseUp event.
OnPaint | Overriden. Raises the System.Windows.Forms.Control.Paint event.
OnSizeChanged | Overriden. Raises the System.Windows.Forms.Control.SizeChanged event.
OnSplitterMoved | Raises the OnSplitterMoved event.
OnSplitterMoving | Raises the OnSplitterMoving event.

See Also


C1Sizer.OnControlAdded Method

C1Sizer.OnControlAdded Method

Raises the System.Windows.Forms.Control.ControlAdded event.

[Visual Basic]

Overrides Protected Sub OnControlAdded( _

ByVal e As ControlEventArgs _

)

[C#]

override protected void OnControlAdded(

ControlEventArgs e

);

[Delphi]

strict protected procedure OnControlAdded(

e: ControlEventArgs

); override;

Parameters

e

A System.Windows.Forms.ControlEventArgs that contains the event data.

See Also


C1Sizer.OnControlRemoved Method

C1Sizer.OnControlRemoved Method

Raises the System.Windows.Forms.Control.ControlRemoved event.

[Visual Basic]

Overrides Protected Sub OnControlRemoved( _

ByVal e As ControlEventArgs _

)

[C#]

override protected void OnControlRemoved(

ControlEventArgs e

);

[Delphi]

strict protected procedure OnControlRemoved(

e: ControlEventArgs

); override;

Parameters

e

A System.Windows.Forms.ControlEventArgs that contains the event data.

See Also


C1Sizer.OnMouseDown Method

C1Sizer.OnMouseDown Method

Raises the System.Windows.Forms.Control.MouseDown event.

[Visual Basic]

Overrides Protected Sub OnMouseDown( _

ByVal e As MouseEventArgs _

)

[C#]

override protected void OnMouseDown(

MouseEventArgs e

);

[Delphi]

strict protected procedure OnMouseDown(

e: MouseEventArgs

); override;

Parameters

e

A System.Windows.Forms.MouseEventArgs that contains the event data.

See Also


C1Sizer.OnMouseLeave Method

C1Sizer.OnMouseLeave Method

Raises the System.Windows.Forms.Control.MouseLeave event.

[Visual Basic]

Overrides Protected Sub OnMouseLeave( _

ByVal e As EventArgs _

)

[C#]

override protected void OnMouseLeave(

EventArgs e

);

[Delphi]

strict protected procedure OnMouseLeave(

e: EventArgs

); override;

Parameters

e

An System.EventArgs that contains the event data.

See Also


C1Sizer.OnMouseMove Method

C1Sizer.OnMouseMove Method

Raises the System.Windows.Forms.Control.MouseMove event.

[Visual Basic]

Overrides Protected Sub OnMouseMove( _

ByVal e As MouseEventArgs _

)

[C#]

override protected void OnMouseMove(

MouseEventArgs e

);

[Delphi]

strict protected procedure OnMouseMove(

e: MouseEventArgs

); override;

Parameters

e

A System.Windows.Forms.MouseEventArgs that contains the event data.

See Also


C1Sizer.OnMouseUp Method

C1Sizer.OnMouseUp Method

Raises the System.Windows.Forms.Control.MouseUp event.

[Visual Basic]

Overrides Protected Sub OnMouseUp( _

ByVal e As MouseEventArgs _

)

[C#]

override protected void OnMouseUp(

MouseEventArgs e

);

[Delphi]

strict protected procedure OnMouseUp(

e: MouseEventArgs

); override;

Parameters

e

A System.Windows.Forms.MouseEventArgs that contains the event data.

See Also


C1Sizer.OnPaint Method

C1Sizer.OnPaint Method

Raises the System.Windows.Forms.Control.Paint event.

[Visual Basic]

Overrides Protected Sub OnPaint( _

ByVal e As PaintEventArgs _

)

[C#]

override protected void OnPaint(

PaintEventArgs e

);

[Delphi]

strict protected procedure OnPaint(

e: PaintEventArgs

); override;

Parameters

e

A System.Windows.Forms.PaintEventArgs that contains the event data.

See Also


C1Sizer.OnSizeChanged Method

C1Sizer.OnSizeChanged Method

Raises the System.Windows.Forms.Control.SizeChanged event.

[Visual Basic]

Overrides Protected Sub OnSizeChanged( _

ByVal e As EventArgs _

)

[C#]

override protected void OnSizeChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnSizeChanged(

e: EventArgs

); override;

Parameters

e

An System.EventArgs that contains the event data.

See Also


C1Sizer.OnSplitterMoved Method

C1Sizer.OnSplitterMoved Method

Raises the OnSplitterMoved event.

[Visual Basic]

Overridable Protected Sub OnSplitterMoved( _

ByVal e As C1SizerEventArgs _

)

[C#]

virtual protected void OnSplitterMoved(

C1SizerEventArgs e

);

[Delphi]

strict protected procedure OnSplitterMoved(

e: C1SizerEventArgs

); virtual;

Parameters

e

A C1SizerEventArgs that contains the event data.

See Also


C1Sizer.OnSplitterMoving Method

C1Sizer.OnSplitterMoving Method

Raises the OnSplitterMoving event.

[Visual Basic]

Overridable Protected Sub OnSplitterMoving( _

ByVal e As C1SizerEventArgs _

)

[C#]

virtual protected void OnSplitterMoving(

C1SizerEventArgs e

);

[Delphi]

strict protected procedure OnSplitterMoving(

e: C1SizerEventArgs

); virtual;

Parameters

e

A C1SizerEventArgs that contains the event data.

See Also


C1Sizer Events

C1Sizer Events

The events of the C1Sizer class are listed here. For a complete list of C1Sizer class members, see the C1Sizer Members topic.

Public Events

BackColorChanged (inherited from Control) | Event raised when the value of the BackColor property is changed on Control.
BackgroundImageChanged (inherited from Control) | Event raised when the value of the BackgroundImage property is changed on Control.
BackgroundImageLayoutChanged (inherited from Control) | Event raised when the value of the BackgroundImageLayout property is changed on Control.
BindingContextChanged (inherited from Control) | Event raised when the value of the BindingContext property is changed on Control.
ChangeUICues (inherited from Control) | Occurs when focus rectangles and keyboard cue underlines are being shown or hidden.
Click (inherited from Control) | Occurs when the component is clicked.
ClientSizeChanged (inherited from Control) | Event raised when the value of the ClientSize property is changed on Control.
ContextMenuChanged (inherited from Control) | Occurs when the value of the ContextMenu property changes.
ContextMenuStripChanged (inherited from Control) | Occurs when the value of the ContextMenuStrip property changes.
ControlAdded (inherited from Control) | Occurs when a control is added to this control.
ControlRemoved (inherited from Control) | Occurs when a control is removed from this control.
CursorChanged (inherited from Control) | Event raised when the value of the Cursor property is changed on Control.
DockChanged (inherited from Control) | Event raised when the value of the Dock property is changed on Control.
DoubleClick (inherited from Control) | Occurs when the component is double-clicked.
DragDrop (inherited from Control) | Occurs when a drag-and-drop operation is completed.
DragEnter (inherited from Control) | Occurs when the mouse drags an item into the client area for this Control.
DragLeave (inherited from Control) | Occurs when an object is dragged out of the control's bounds.
DragOver (inherited from Control) | Occurs when an object is dragged over the control's bounds.
EnabledChanged (inherited from Control) | Occurs when the control's enabled state changes.
GiveFeedback (inherited from Control) | Occurs when the mouse drags an item. The system requests that the Control provide feedback to that effect.
GotFocus (inherited from Control) | Occurs when the control gets focus.
HandleCreated (inherited from Control) | Occurs when the control's native handle is created.
HandleDestroyed (inherited from Control) | Occurs when the control's native handle is destroyed.
HelpRequested (inherited from Control) | Occurs when the user invokes Help for the control.
Invalidated (inherited from Control) | Occurs when a control's display requires redrawing.
Layout (inherited from Control) | Occurs when the control is about to lay out its contents.
LoadCompleted (inherited from PictureBox) | Event raised when loading into a PictureBox finishes.
LoadProgressChanged (inherited from PictureBox) | Event raised when progress is reported during loading into a PictureBox.
LocationChanged (inherited from Control) | Event raised when the value of the Location property is changed on Control.
LostFocus (inherited from Control) | Occurs when the control loses focus.
MarginChanged (inherited from Control) | Occurs when the Margin property has changed.
MouseCaptureChanged (inherited from Control) | Occurs after the mouse capture is changed.
MouseClick (inherited from Control) | Occurs when the control is clicked by the mouse.
MouseDoubleClick (inherited from Control) | Occurs when the control is double clicked by the mouse.
MouseDown (inherited from Control) | Occurs when the mouse pointer is over the component and a mouse button is pressed.
MouseEnter (inherited from Control) | Occurs when the mouse enters the visible part of the control.
MouseHover (inherited from Control) | Occurs when the mouse remains stationary inside of the control for an amount of time.
MouseLeave (inherited from Control) | Occurs when the mouse leaves the visible part of the control.
MouseMove (inherited from Control) | Occurs when the mouse pointer is moved over the component.
MouseUp (inherited from Control) | Occurs when the mouse pointer is over the component and a mouse button is released.
MouseWheel (inherited from Control) | Occurs when the mouse wheel moves while the control has focus.
Move (inherited from Control) | Occurs when a control is moved.
PaddingChanged (inherited from Control) | Occurs when the Padding property has changed.
Paint (inherited from Control) | Occurs when a control needs repainting.
ParentChanged (inherited from Control) | Event raised when the value of the Parent property is changed on Control.
PreviewKeyDown (inherited from Control) | Occurs before the KeyDown event when a key is pressed while focus is on this control.
QueryAccessibilityHelp (inherited from Control) | Occurs when an Accessibility client invokes Help for the control.
QueryContinueDrag (inherited from Control) | Occurs when the mouse drags an item. The system requests whether the drag-and-drop operation should be allowed to continue.
RegionChanged (inherited from Control) | Event raised when the value of Region property is changed on Control.
Resize (inherited from Control) | Occurs when a control is resized.
SizeChanged (inherited from Control) | Event raised when the value of the Size property is changed on Control.
SizeModeChanged (inherited from PictureBox) | Event raised when the value of the SizeMode property is changed on the PictureBox.
SplitterMoved | Fired when the user finishes resizing a band (row or column) by dragging a splitter bar.
SplitterMoving | Fired when the user clicks a splitter and starts resizing a band (row or column) on the layout grid.
StyleChanged (inherited from Control) | Event raised when the window style of a Control is changed.
SystemColorsChanged (inherited from Control) | Event raised when the system colors change.
Validated (inherited from Control) | Occurs after a control has been successfully validated.
Validating (inherited from Control) | Occurs when the control is validating.
VisibleChanged (inherited from Control) | Occurs when the control's visibility changes.

See Also


C1Sizer.SplitterMoved Event

C1Sizer.SplitterMoved Event

Fired when the user finishes resizing a band (row or column) by dragging a splitter bar.

[Visual Basic]

Public Event SplitterMoved As C1SizerEventHandler

[C#]

public event C1SizerEventHandler SplitterMoved

[Delphi]

public property SplitterMoved: C1SizerEventHandler read remove_SplitterMoved write add_SplitterMoved;

See Also


C1Sizer.SplitterMoving Event

C1Sizer.SplitterMoving Event

Fired when the user clicks a splitter and starts resizing a band (row or column) on the layout grid.

[Visual Basic]

Public Event SplitterMoving As C1SizerEventHandler

[C#]

public event C1SizerEventHandler SplitterMoving

[Delphi]

public property SplitterMoving: C1SizerEventHandler read remove_SplitterMoving write add_SplitterMoving;

See Also


C1SizerEventArgs Class

C1SizerEventArgs Class

Provides data for the SplitterMoving and SplitterMoved events of a C1Sizer control.

For a list of all members of this type, see C1SizerEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1Sizer.C1SizerEventArgs

[Visual Basic]

Public Class C1SizerEventArgs

Inherits EventArgs

[C#]

public class C1SizerEventArgs : EventArgs

[Delphi]

type C1SizerEventArgs = class (EventArgs);

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


C1SizerEventArgs Members

C1SizerEventArgs Members

C1SizerEventArgs overview

Public Properties

Band | Gets a reference to the band (row or column) that caused the event.
X | Gets the X coordinate of the mouse when the event is fired.
Y | Gets the X coordinate of the mouse when the event is fired.

See Also


C1SizerEventArgs Properties

C1SizerEventArgs Properties

The properties of the C1SizerEventArgs class are listed here. For a complete list of C1SizerEventArgs class members, see the C1SizerEventArgs Members topic.

Public Properties

Band | Gets a reference to the band (row or column) that caused the event.
X | Gets the X coordinate of the mouse when the event is fired.
Y | Gets the X coordinate of the mouse when the event is fired.

See Also


C1SizerEventArgs.Band Property

C1SizerEventArgs.Band Property

Gets a reference to the band (row or column) that caused the event.

[Visual Basic]

Public ReadOnly Property Band As Band

[C#]

public Band Band {get;}

[Delphi]

public property Band: Band read get_Band;

See Also


C1SizerEventArgs.X Property

C1SizerEventArgs.X Property

Gets the X coordinate of the mouse when the event is fired.

[Visual Basic]

Public ReadOnly Property X As Integer

[C#]

public int X {get;}

[Delphi]

public property X: Int32 read get_X;

See Also


C1SizerEventArgs.Y Property

C1SizerEventArgs.Y Property

Gets the X coordinate of the mouse when the event is fired.

[Visual Basic]

Public ReadOnly Property Y As Integer

[C#]

public int Y {get;}

[Delphi]

public property Y: Int32 read get_Y;

See Also


C1SizerEventHandler Delegate

C1SizerEventHandler Delegate

Represents the methods that will handle the SplitterMoving and SplitterMoved events of a C1Sizer control.

[Visual Basic]

Public Delegate Sub C1SizerEventHandler( _

ByVal sender As Object, _

ByVal e As C1SizerEventArgs _

)

[C#]

public delegate void C1SizerEventHandler(

object sender,

C1SizerEventArgs e

);

[Delphi]

type C1SizerEventHandler = procedure (

sender: Object;

e: C1SizerEventArgs

) of object;

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also

C1.Win.C1Sizer Namespace


C1SizerLight Class

C1SizerLight Class

Component that resizes all controls on a form when the form is resized.

For a list of all members of this type, see C1SizerLight Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

C1.Win.C1Sizer.C1SizerLight

[Visual Basic]

Public Class C1SizerLight

Inherits Component

Implements hf, IExtenderProvider, ISupportInitialize

[C#]

public class C1SizerLight : Component , hf, IExtenderProvider, ISupportInitialize

[Delphi]

type C1SizerLight = class (Component, hf, IExtenderProvider, ISupportInitialize);

Remarks

When you add a C1SizerLight component to a form, it keeps track of the forms' size and position. When the form is resized, C1SizerLight resizes all contained controls proportionally, so the form retains its appearance at any resolution.

C1SizerLight can also resize the fonts on all or some of the contained controls.

You will rarely have to write any code in order to use the C1SizerLight component. In most applications, you will simply design forms as usual, then add a C1SizerLight component to the form and let it resize all controls on the form automatically, when the for is resized.

In some cases, you may want to control how fonts are resized when the form dimensions change. You can prevent all font resizing by setting the ResizeFonts property to false. Or you can keep the font size constant for certain controls by handling the ResizingFont event.

Note that the C1SizerLight component does not work at design time. This allows you to resize your form without affecting the layout of the controls on the form.

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


C1SizerLight Members

C1SizerLight Members

C1SizerLight overview

Public Constructors

C1SizerLight Constructor

Initializes a new instance of a C1SizerLight.

Public Properties

Enabled | Determines whether the C1SizerLight should resize the controls on the form when the form is resized.
ResizeFonts | Determines whether the C1SizerLight should resize control fonts in addition to the controls themselves.

Public Methods

GetAutoResize | For internal use.
SetAutoResize | For internal use.

Public Events

ResizingControl | Fires before the C1SizerLight resizes a control in response to the form being resized.
ResizingFont | Fires before the C1SizerLight resizes the font in a control in response to the form being resized.

Protected Methods

Dispose | Overloaded. Overriden. Releases the resources used by the C1SizerLight.
OnResizingFont | Raises the ResizingFont event.

See Also


C1SizerLight Constructor

C1SizerLight Constructor

Overload List

Initializes a new instance of a C1SizerLight.

[Visual Basic] Public Function New()

[C#] public C1SizerLight();

[Delphi] public constructor Create(); overload;

Initializes a new instance of a C1SizerLight component in a given System.ComponentModel.IContainer.

[Visual Basic] Public Function New(IContainer)

[C#] public C1SizerLight(IContainer);

[Delphi] public constructor Create(IContainer); overload;

See Also


C1SizerLight Constructor ()

C1SizerLight Constructor ()

Previous Next

Initializes a new instance of a C1SizerLight.

[Visual Basic]

Public Function New()

[C#]

public C1SizerLight()

[Delphi]

public constructor Create(); overload;

See Also


C1SizerLight Constructor (IContainer)

C1SizerLight Constructor (IContainer)

Previous Next

Initializes a new instance of a C1SizerLight component in a given System.ComponentModel.IContainer.

[Visual Basic]

Public Function New( _

ByVal container As IContainer _

)

[C#]

public C1SizerLight(

IContainer container

);

[Delphi]

public constructor Create(

container: IContainer

); overload;

Parameters

container

The IContainer that contains the component.

See Also


C1SizerLight Properties

C1SizerLight Properties

The properties of the C1SizerLight class are listed here. For a complete list of C1SizerLight class members, see the C1SizerLight Members topic.

Public Properties

Enabled | Determines whether the C1SizerLight should resize the controls on the form when the form is resized.
ResizeFonts | Determines whether the C1SizerLight should resize control fonts in addition to the controls themselves.

See Also


C1SizerLight.Enabled Property

C1SizerLight.Enabled Property

Determines whether the C1SizerLight should resize the controls on the form when the form is resized.

[Visual Basic]

Public Property Enabled As Boolean

[C#]

public bool Enabled {get;set;}

[Delphi]

public property Enabled: Boolean read get_Enabled write set_Enabled;

Remarks

This property has no effect at design time. Child controls are automatically resized at run time only.

If you need to create controls at run time, you should set the Enabled property to false, create the controls, then set it back to true. This will allow C1SizerLight to update its internal layout information.

See Also


C1SizerLight.ResizeFonts Property

C1SizerLight.ResizeFonts Property

Determines whether the C1SizerLight should resize control fonts in addition to the controls themselves.

[Visual Basic]

Public Property ResizeFonts As Boolean

[C#]

public bool ResizeFonts {get;set;}

[Delphi]

public property ResizeFonts: Boolean read get_ResizeFonts write set_ResizeFonts;

See Also


C1SizerLight Methods

C1SizerLight Methods

The methods of the C1SizerLight class are listed here. For a complete list of C1SizerLight class members, see the C1SizerLight Members topic.

Public Methods

GetAutoResize | For internal use.
SetAutoResize | For internal use.

Protected Methods

Dispose | Overloaded. Overriden. Releases the resources used by the C1SizerLight.
OnResizingFont | Raises the ResizingFont event.

See Also


C1SizerLight.Dispose Method

C1SizerLight.Dispose Method

Releases the resources used by the C1SizerLight.

[Visual Basic]

Overrides Protected Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

override protected void Dispose(

bool disposing

);

[Delphi]

strict protected procedure Dispose(

disposing: Boolean

); overload; override;

Parameters

disposing

True to release both managed and unmanaged resources; False to release only unmanaged resources.

See Also


C1SizerLight.GetAutoResize Method

C1SizerLight.GetAutoResize Method

For internal use.

[Visual Basic]

Public Function GetAutoResize( _

ByVal frm As Form _

) As Boolean

[C#]

public bool GetAutoResize(

Form frm

);

[Delphi]

public function GetAutoResize(

frm: Form

): Boolean;

See Also


C1SizerLight.OnResizingFont Method

C1SizerLight.OnResizingFont Method

Raises the ResizingFont event.

[Visual Basic]

Protected Sub OnResizingFont( _

ByVal e As C1SizerLightEventArgs _

)

[C#]

protected void OnResizingFont(

C1SizerLightEventArgs e

);

[Delphi]

strict protected procedure OnResizingFont(

e: C1SizerLightEventArgs

);

Parameters

e

A C1SizerLightEventArgs that contains the event data.

See Also


C1SizerLight.SetAutoResize Method

C1SizerLight.SetAutoResize Method

For internal use.

[Visual Basic]

Public Sub SetAutoResize( _

ByVal frm As Form, _

ByVal value As Boolean _

)

[C#]

public void SetAutoResize(

Form frm,

bool value

);

[Delphi]

public procedure SetAutoResize(

frm: Form;

value: Boolean

);

See Also


C1SizerLight Events

C1SizerLight Events

The events of the C1SizerLight class are listed here. For a complete list of C1SizerLight class members, see the C1SizerLight Members topic.

Public Events

ResizingControl | Fires before the C1SizerLight resizes a control in response to the form being resized.
ResizingFont | Fires before the C1SizerLight resizes the font in a control in response to the form being resized.

See Also


C1SizerLight.ResizingControl Event

C1SizerLight.ResizingControl Event

Fires before the C1SizerLight resizes a control in response to the form being resized.

[Visual Basic]

Public Event ResizingControl As C1SizerLightEventHandler

[C#]

public event C1SizerLightEventHandler ResizingControl

[Delphi]

public property ResizingControl: C1SizerLightEventHandler read remove_ResizingControl write add_ResizingControl;

See Also


C1SizerLight.ResizingFont Event

C1SizerLight.ResizingFont Event

Fires before the C1SizerLight resizes the font in a control in response to the form being resized.

[Visual Basic]

Public Event ResizingFont As C1SizerLightEventHandler

[C#]

public event C1SizerLightEventHandler ResizingFont

[Delphi]

public property ResizingFont: C1SizerLightEventHandler read remove_ResizingFont write add_ResizingFont;

Remarks

By default, C1SizerLight will resize all child controls on a form and will also update their fonts when the form is resized.

In some cases, you may want to prevent the C1SizerLight from resizing the font for certain controls on the form. For example, scrollable controls often don't need font resizing. When their dimensions change, the user can still scroll to view their contents.

Example

For example, the code below prevents the C1SizerLight from resizing the font on any controls that are not Buttons:

· Visual Basic

· C#

· Delphi

See Also


C1SizerLightEventArgs Class

C1SizerLightEventArgs Class

Provides data for the ResizingFont event of a C1SizerLight component.

For a list of all members of this type, see C1SizerLightEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1Sizer.C1SizerLightEventArgs

[Visual Basic]

Public Class C1SizerLightEventArgs

Inherits EventArgs

[C#]

public class C1SizerLightEventArgs : EventArgs

[Delphi]

type C1SizerLightEventArgs = class (EventArgs);

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


C1SizerLightEventArgs Members

C1SizerLightEventArgs Members

C1SizerLightEventArgs overview

Public Properties

Cancel | Determines whether the font for this control should be resized.
Control | Gets a reference to the control whose font is about to be resized by the C1SizerLight component.

See Also


C1SizerLightEventArgs Properties

C1SizerLightEventArgs Properties

The properties of the C1SizerLightEventArgs class are listed here. For a complete list of C1SizerLightEventArgs class members, see the C1SizerLightEventArgs Members topic.

Public Properties

Cancel | Determines whether the font for this control should be resized.
Control | Gets a reference to the control whose font is about to be resized by the C1SizerLight component.

See Also


C1SizerLightEventArgs.Cancel Property

C1SizerLightEventArgs.Cancel Property

Determines whether the font for this control should be resized.

[Visual Basic]

Public Property Cancel As Boolean

[C#]

public bool Cancel {get;set;}

[Delphi]

public property Cancel: Boolean read get_Cancel write set_Cancel;

See Also


C1SizerLightEventArgs.Control Property

C1SizerLightEventArgs.Control Property

Gets a reference to the control whose font is about to be resized by the C1SizerLight component.

[Visual Basic]

Public ReadOnly Property Control As Control

[C#]

public Control Control {get;}

[Delphi]

public property Control: Control read get_Control;

See Also


C1SizerLightEventHandler Delegate

C1SizerLightEventHandler Delegate

Represents the method that will handle the ResizingFont event of a C1SizerLight component.

[Visual Basic]

Public Delegate Sub C1SizerLightEventHandler( _

ByVal sender As Object, _

ByVal e As C1SizerLightEventArgs _

)

[C#]

public delegate void C1SizerLightEventHandler(

object sender,

C1SizerLightEventArgs e

);

[Delphi]

type C1SizerLightEventHandler = procedure (

sender: Object;

e: C1SizerLightEventArgs

) of object;

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also

C1.Win.C1Sizer Namespace


Column Class

Column Class

Summary description for Column.

For a list of all members of this type, see Column Members.

System.Object

C1.Win.C1Sizer.Band

C1.Win.C1Sizer.Column

[Visual Basic]

Public Class Column

Inherits Band

[C#]

public class Column : Band

[Delphi]

type Column = class (Band);

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


Column Members

Column Members

Column overview

Public Properties

Bounds (inherited from Band) | Gets a System.Drawing.Rectangle that represents the size and location of the band within the parent C1Sizer control.
Index (inherited from Band) | Gets the index of the Band in the owner collection.
IsFixedSize (inherited from Band) | Determines whether the Band should retain its size when the control is resized.
IsSplitter (inherited from Band) | Determines whether the band acts like a splitter (can be resized with the mouse at run time).
Size | Overriden. Gets or sets the width of the Column in pixels.

Public Methods

ToString

Overriden. Returns a string representation of the Column object.

See Also


Column Properties

Column Properties

The properties of the Column class are listed here. For a complete list of Column class members, see the Column Members topic.

Public Properties

Bounds (inherited from Band) | Gets a System.Drawing.Rectangle that represents the size and location of the band within the parent C1Sizer control.
Index (inherited from Band) | Gets the index of the Band in the owner collection.
IsFixedSize (inherited from Band) | Determines whether the Band should retain its size when the control is resized.
IsSplitter (inherited from Band) | Determines whether the band acts like a splitter (can be resized with the mouse at run time).
Size | Overriden. Gets or sets the width of the Column in pixels.

See Also


Column.Size Property

Column.Size Property

Gets or sets the width of the Column in pixels.

[Visual Basic]

Overrides Public Property Size As Integer

[C#]

override public int Size {get;set;}

[Delphi]

public property Size: Int32 read get_Size write set_Size;

Remarks

The Size property is updated whenever the control is resized, so that the columns take up the entire width of the control.

You can prevent specific columns from being resized with the form by setting their IsFixedSize property. You can also set the size of multiple columns with a single call using the SetSizes method in the ColumnCollection class.

See Also


Column Methods

Column Methods

The methods of the Column class are listed here. For a complete list of Column class members, see the Column Members topic.

Public Methods

ToString

Overriden. Returns a string representation of the Column object.

See Also


Column.ToString Method

Column.ToString Method

Returns a string representation of the Column object.

[Visual Basic]

Overrides Public Function ToString() As String

[C#]

override public string ToString()

[Delphi]

public function ToString(): String; override;

Return Value

A string representation of the Column object

See Also


ColumnCollection Class

ColumnCollection Class

Collection of Column objects.

For a list of all members of this type, see ColumnCollection Members.

System.Object

C1.Win.C1Sizer.BandCollection

C1.Win.C1Sizer.ColumnCollection

[Visual Basic]

Public Class ColumnCollection

Inherits BandCollection

[C#]

public class ColumnCollection : BandCollection

[Delphi]

type ColumnCollection = class (BandCollection);

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


ColumnCollection Members

ColumnCollection Members

ColumnCollection overview

Public Properties

Count (inherited from BandCollection) | Gets or sets the number of bands in the collection.
Item | Gets the Column object at a given index in the collection.

See Also


ColumnCollection Properties

ColumnCollection Properties

The properties of the ColumnCollection class are listed here. For a complete list of ColumnCollection class members, see the ColumnCollection Members topic.

Public Properties

Count (inherited from BandCollection) | Gets or sets the number of bands in the collection.
Item | Gets the Column object at a given index in the collection.

See Also


ColumnCollection.Item Property

ColumnCollection.Item Property

Gets the Column object at a given index in the collection.

[Visual Basic]

Public Default ReadOnly Property Item( _

ByVal index As Integer _

) As Column

[C#]

public Column this[

int index

] {get;}

[Delphi]

public property Item[

index: Int32

]: Column read get_Item;

See Also


Grid Class

Grid Class

Summary description for Grid.

For a list of all members of this type, see Grid Members.

System.Object

C1.Win.C1Sizer.Grid

[Visual Basic]

Public Class Grid

[C#]

public class Grid

[Delphi]

type Grid = class;

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


Grid Members

Grid Members

Grid overview

Public Properties

Columns | Gets a reference to the ColumnCollection that contains the columns in the layout grid.
Rows | Gets a reference to the RowCollection that contains the rows in the layout grid.

Public Methods

AutoGenerate | Resets the Grid object and creates new rows and columns based on the child controls within the C1Sizer.
Clear | Resets the Grid object so it contains one row and one column.

See Also


Grid Properties

Grid Properties

The properties of the Grid class are listed here. For a complete list of Grid class members, see the Grid Members topic.

Public Properties

Columns | Gets a reference to the ColumnCollection that contains the columns in the layout grid.
Rows | Gets a reference to the RowCollection that contains the rows in the layout grid.

See Also


Grid.Columns Property

Grid.Columns Property

Gets a reference to the ColumnCollection that contains the columns in the layout grid.

[Visual Basic]

Public ReadOnly Property Columns As ColumnCollection

[C#]

public ColumnCollection Columns {get;}

[Delphi]

public property Columns: ColumnCollection read get_Columns;

See Also


Grid.Rows Property

Grid.Rows Property

Gets a reference to the RowCollection that contains the rows in the layout grid.

[Visual Basic]

Public ReadOnly Property Rows As RowCollection

[C#]

public RowCollection Rows {get;}

[Delphi]

public property Rows: RowCollection read get_Rows;

See Also


Grid Methods

Grid Methods

The methods of the Grid class are listed here. For a complete list of Grid class members, see the Grid Members topic.

Public Methods

AutoGenerate | Resets the Grid object and creates new rows and columns based on the child controls within the C1Sizer.
Clear | Resets the Grid object so it contains one row and one column.

See Also


Grid.AutoGenerate Method

Grid.AutoGenerate Method

Resets the Grid object and creates new rows and columns based on the child controls within the C1Sizer.

[Visual Basic]

Public Sub AutoGenerate()

[C#]

public void AutoGenerate()

[Delphi]

public procedure AutoGenerate();

Remarks

You will rarely have to call this method from your code. It is more commonly used internally (at design time) by the grid designer.

See Also


Grid.Clear Method

Grid.Clear Method

Resets the Grid object so it contains one row and one column.

[Visual Basic]

Public Sub Clear()

[C#]

public void Clear()

[Delphi]

public procedure Clear();

See Also


Row Class

Row Class

Summary description for Row.

For a list of all members of this type, see Row Members.

System.Object

C1.Win.C1Sizer.Band

C1.Win.C1Sizer.Row

[Visual Basic]

Public Class Row

Inherits Band

[C#]

public class Row : Band

[Delphi]

type Row = class (Band);

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


Row Members

Row Members

Row overview

Public Properties

Bounds (inherited from Band) | Gets a System.Drawing.Rectangle that represents the size and location of the band within the parent C1Sizer control.
Index (inherited from Band) | Gets the index of the Band in the owner collection.
IsFixedSize (inherited from Band) | Determines whether the Band should retain its size when the control is resized.
IsSplitter (inherited from Band) | Determines whether the band acts like a splitter (can be resized with the mouse at run time).
Size | Overriden. Gets or sets the height of the Row in pixels.

Public Methods

ToString

Overriden. Returns a string representation of the Row object.

See Also


Row Properties

Row Properties

The properties of the Row class are listed here. For a complete list of Row class members, see the Row Members topic.

Public Properties

Bounds (inherited from Band) | Gets a System.Drawing.Rectangle that represents the size and location of the band within the parent C1Sizer control.
Index (inherited from Band) | Gets the index of the Band in the owner collection.
IsFixedSize (inherited from Band) | Determines whether the Band should retain its size when the control is resized.
IsSplitter (inherited from Band) | Determines whether the band acts like a splitter (can be resized with the mouse at run time).
Size | Overriden. Gets or sets the height of the Row in pixels.

See Also


Row.Size Property

Row.Size Property

Gets or sets the height of the Row in pixels.

[Visual Basic]

Overrides Public Property Size As Integer

[C#]

override public int Size {get;set;}

[Delphi]

public property Size: Int32 read get_Size write set_Size;

Remarks

The Size property is updated whenever the control is resized, so that the rows take up the entire height of the control.

You can prevent specific rows from being resized with the form by setting their IsFixedSize property. You can also set the size of multiple rows with a single call using the SetSizes method in the RowCollection class.

See Also


Row Methods

Row Methods

The methods of the Row class are listed here. For a complete list of Row class members, see the Row Members topic.

Public Methods

ToString

Overriden. Returns a string representation of the Row object.

See Also


Row.ToString Method

Row.ToString Method

Returns a string representation of the Row object.

[Visual Basic]

Overrides Public Function ToString() As String

[C#]

override public string ToString()

[Delphi]

public function ToString(): String; override;

Return Value

A string representation of the Row object

See Also


RowCollection Class

RowCollection Class

Collection of Row objects.

For a list of all members of this type, see RowCollection Members.

System.Object

C1.Win.C1Sizer.BandCollection

C1.Win.C1Sizer.RowCollection

[Visual Basic]

Public Class RowCollection

Inherits BandCollection

[C#]

public class RowCollection : BandCollection

[Delphi]

type RowCollection = class (BandCollection);

Namespace: C1.Win.C1Sizer

Assembly: C1.Win.C1Sizer.2 (in C1.Win.C1Sizer.2.dll)

See Also


RowCollection Members

RowCollection Members

RowCollection overview

Public Properties

Count (inherited from BandCollection) | Gets or sets the number of bands in the collection.
Item | Gets the Row object at a given index in the collection.

See Also


RowCollection Properties

RowCollection Properties

The properties of the RowCollection class are listed here. For a complete list of RowCollection class members, see the RowCollection Members topic.

Public Properties

Count (inherited from BandCollection) | Gets or sets the number of bands in the collection.
Item | Gets the Row object at a given index in the collection.

See Also


RowCollection.Item Property

RowCollection.Item Property

Gets the Row object at a given index in the collection.

[Visual Basic]

Public Default ReadOnly Property Item( _

ByVal index As Integer _

) As Row

[C#]

public Row this[

int index

] {get;}

[Delphi]

public property Item[

index: Int32

]: Row read get_Item;

See Also


Add SizerLight at Runtime - C#

C#

if (this.components == null)

this.components = new System.ComponentModel.Container();

C1SizerLight szl = new C1SizerLight(components);

szl.SetAutoResize(this, true);


Add SizerLight at Runtime - Delphi

Delphi

var

szl: C1SizerLight;

begin

if (Self.components = nil) then

Self.components := System.ComponentModel.Container.Create;

szl := C1SizerLight.Create(components);

szl.SetAutoResize(Self, True);

end;


Add SizerLight at Runtime - Visual Basic

Visual Basic

If Me.components Is Nothing Then

Me.components = New System.ComponentModel.Container

End If

Dim szl As C1SizerLight = New C1SizerLight(components)

szl.SetAutoResize(Me, True)


Bounds Property - C#

C#

Rectangle bounds = Rectangle.Intersect(g.Rows[1].Bounds, g.Columns[1].Bounds);

button1.Bounds = bounds;


Bounds Property - Delphi

Delphi

var bounds: Rectangle;

begin

bounds := Rectangle.Intersect(g.Rows[1].Bounds, g.Columns[1].Bounds);

button1.Bounds := bounds;


Bounds Property - Visual Basic

Visual Basic

Dim bounds As Rectangle = Rectangle.Intersect(g.Rows(1).Bounds, g.Columns(1).Bounds)

button1.Bounds = bounds


C1SizerBand - C#

C#

// create a layout with four rows:

C1Sizer1.Rows.Count = 4;

// set the dimension of rows 0 and 2 to 30 pixels (leave other rows unchanged)

C1Sizer1.Grid.Rows.SetSizes(new int[] { 30, -1, 30, -1 });


C1SizerBand - Delphi

Delphi

var

size: array of integer;

begin

// create a layout with four rows:

C1Sizer1.Rows.Count := 4;

// set the dimension of rows 0 and 2 to 30 pixels (leave other rows unchanged);

SetLength(size,4);

size[0] := 30;

size[0] := -1;

size[0] := 30;

size[0] := -1;

C1Sizer1.Rows.SetSizes(sizes);

end;

C1Sizer1.Rows.SetSizes(New Integer() {30, - 1, 30, - 1});


C1SizerBand - Visual Basic

Visual Basic

' create a layout with four rows:

C1Sizer1.Rows.Count = 4

' set the dimension of rows 0 and 2 to 30 pixels (leave other rows unchanged)

C1Sizer1.Grid.Rows.SetSizes(New Integer() {30, -1, 30, -1})


C1Sizer Declare Objects - C#

C#

// Define a new Column object;

Column MyColumn;

// Define a new C1Sizer.Column object;

C1.Win.C1Sizer.Column NewColumn;


C1Sizer Declare Objects - Delphi

Delphi

var

NewColumn: C1.Win.C1Sizer.Column;

MyColumn: Column;


C1Sizer Declare Objects - Visual Basic

Visual Basic

' Define a new Column object

Dim MyColumn as Column

' Define a new C1Sizer.Column object

Dim NewColumn as C1.Win.C1Sizer.Column


C1Sizer Imports - C#

C#

using Column = C1.Win.C1Sizer.Column;

using MyColumn = C1.Win.C1Sizer.Column;

Column C1;

MyColumn C2;


C1Sizer Imports - Delphi

Delphi

uses C1.Win.C1Sizer.Column;

var

c1: Column;


C1Sizer Imports - Visual Basic

Visual Basic

Imports Column = C1.Win.C1Sizer.Column

Imports MyColumn = C1.Win.C1Sizer.Column

Dim C1 As Column

Dim C2 As MyColumn


C1SizerLight - C#

C#

private void c1SizerLight1_ResizingFont(object sender,

C1.Win.C1Sizer.C1SizerLightEventArgs e)

{

if (!(e.Control is Button))

e.Cancel = true;

}


C1SizerLight - Delphi

Delphi

procedure C1SizerLight1_ResizingFont(sender: System.Object; e: C1.Win.C1Sizer.C1SizerLightEventArgs);

begin

if Not (e.Control Is Button) then

e.Cancel := True;

end;


C1SizerLight - Visual Basic

Visual Basic

Private Sub C1SizerLight1_ResizingFont(ByVal sender As Object, _

ByVal e As C1.Win.C1Sizer.C1SizerLightEventArgs) Handles _

C1SizerLight1.ResizingFont

If Not (e.Control.GetType() Is GetType(Button)) Then

e.Cancel = True

End If

End Sub


C1Sizer NameSpaces2 - C#

C#

using C1.Win.C1Sizer;


C1Sizer NameSpaces2 - Delphi

Delphi

uses C1.Win.C1Sizer;


C1Sizer NameSpaces2 - Visual Basic

Visual Basic

imports C1.Win.C1Sizer


C1Sizer Namespaces - C#

C#

C1.Win.C1Sizer.Column Column;


C1Sizer Namespaces - Delphi

Delphi

Column: C1.Win.C1Sizer.Column;


C1Sizer Namespaces - Visual Basic

Visual Basic

Dim Column As C1.Win.C1Sizer.Column


C1Sizer Re-Size Fonts - C#

C#

private void c1SizerLight1_ResizingFont(object sender,

C1.Win.C1Sizer.C1SizerLightEventArgs e)

{

if (!(e.Control is Button))

e.Cancel = true;

}


C1Sizer Re-Size Fonts - Delphi

Delphi

procedure C1SizerLight1_ResizingFont(sender: System.Object;;

e: C1.Win.C1Sizer.C1SizerLightEventArgs);

begin

if Not (e.Control is Button) then

e.Cancel := True;

end;


C1Sizer Re-Size Fonts - Visual Basic

Visual Basic

Private Sub C1SizerLight1_ResizingFont(ByVal sender As Object, _

ByVal e As C1.Win.C1Sizer.C1SizerLightEventArgs) Handles _

C1SizerLight1.ResizingFont

If Not (e.Control.GetType() Is GetType(Button)) Then

e.Cancel = True

End If

End Sub


C1.Win.C1Sizer Hierarchy

C1.Win.C1Sizer Hierarchy

System.Object

C1.Win.C1Sizer.Band

C1.Win.C1Sizer.Column

C1.Win.C1Sizer.Row

C1.Win.C1Sizer.BandCollection ---- System.Collections.IEnumerable

C1.Win.C1Sizer.ColumnCollection

C1.Win.C1Sizer.RowCollection

System.MarshalByRefObject

System.ComponentModel.Component

C1.Win.C1Sizer.C1SizerLight ---- hf, System.ComponentModel.IExtenderProvider, System.ComponentModel.ISupportInitialize

System.Windows.Forms.Control

System.Windows.Forms.PictureBox

C1.Win.C1Sizer.C1Sizer ---- hf, System.ComponentModel.ISupportInitialize

System.EventArgs

C1.Win.C1Sizer.C1SizerEventArgs

C1.Win.C1Sizer.C1SizerLightEventArgs

C1.Win.C1Sizer.Grid

System.ValueType

System.[Enum]

C1.Win.C1Sizer.AutoSizeEnum

System.[Delegate]

System.MulticastDelegate

C1.Win.C1Sizer.C1SizerEventHandler

C1.Win.C1Sizer.C1SizerLightEventHandler

See Also

C1.Win.C1Sizer Namespace


Drag and Drop 1 - C#

C#

private void button1_MouseDown(object sender, MouseEventArgs e)

{

// Start dragging control on mouse down

this.c1Sizer1.DoDragDrop(sender, DragDropEffects.Move);

}


Drag and Drop 1 - Delphi

Delphi

procedure Class1.button1_MouseDown(sender: System.Object; e: MouseEventArgs);

begin

Self.c1Sizer1.DoDragDrop(sender, DragDropEffects.Move);

end;


Drag and Drop 1 - Visual Basic

Visual Basic

Private Sub button1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs)

Me.c1Sizer1.DoDragDrop(sender, DragDropEffects.Move)

End Sub


Drag and Drop 2 - C#

C#

private void c1Sizer1_DragOver(object sender, DragEventArgs e)

{

// Allow move effect if dragging control and over a cell

Control ctl = e.Data.GetData(typeof(Button)) as Control;

if (ctl != null)

{

Rectangle rc = GetCellAt(e.X, e.Y);

if (rc.Width > 0)

{

e.Effect = DragDropEffects.Move;

}

}

}

private void c1Sizer1_DragDrop(object sender, DragEventArgs e)

{

// Move control when finished dragging

Control ctl = e.Data.GetData(typeof(Button)) as Control;

if (ctl != null)

{

Rectangle rc = GetCellAt(e.X, e.Y);

if (rc.Width > 0)

{

ctl.Bounds = rc;

}

}

}


Drag and Drop 2 - Delphi

Delphi

procedure Class1.c1Sizer1_DragOver(sender: System.Object; e: DragEventArgs);

var

rc: Rectangle;

ctl: Control;

begin

if (ctl <> nil) then

begin

rc := GetCellAt(e.X, e.Y);

if (rc.Width > 0) then

e.Effect := DragDropEffects.Move;

end;

end;

procedure Class1.c1Sizer1_DragDrop(sender: System.Object; e: DragEventArgs);

var

rc: Rectangle;

ctl: Control;

begin

if (ctl <> nil) then

begin

rc := GetCellAt(e.X, e.Y);

if (rc.Width > 0) then

ctl.Bounds := rc;

end;

end;


Drag and Drop 2 - Visual Basic

Visual Basic

Private Sub c1Sizer1_DragOver(ByVal sender As Object, ByVal e As DragEventArgs)

Dim ctl As Control = CType(ConversionHelpers.AsWorkaround(e.Data.GetData(GetType(Button)), GetType(Control)), Control)

If Not (ctl Is Nothing) Then

Dim rc As Rectangle = GetCellAt(e.X, e.Y)

If rc.Width > 0 Then

e.Effect = DragDropEffects.Move

End If

End If

End Sub

Private Sub c1Sizer1_DragDrop(ByVal sender As Object, ByVal e As DragEventArgs)

Dim ctl As Control = CType(ConversionHelpers.AsWorkaround(e.Data.GetData(GetType(Button)), GetType(Control)), Control)

If Not (ctl Is Nothing) Then

Dim rc As Rectangle = GetCellAt(e.X, e.Y)

If rc.Width > 0 Then

ctl.Bounds = rc

End If

End If

End Sub


Generic Startup - C#

C#

Container c = new System.ComponentModel.Container();

foreach (Form f in myFormList)

{

C1SizerLight szl = new C1SizerLight(c);

szl.SetAutoResize(f, true);

}


Generic Startup - Delphi

Delphi

// no delphi code available


Generic Startup - Visual Basic

Visual Basic

Dim c As Container = New System.ComponentModel.Container

For Each f As Form In myFormList

Dim szl As C1SizerLight = New C1SizerLight(c)

szl.SetAutoResize(f, True)

Next


Position Controls - C#

C#

private void Form1_Load(object sender, System.EventArgs e)

{

// Create a button and position it over cell (0,0)

Button b1 = new Button();

c1Sizer1.Controls.Add(b1);

b1.Visible = true;

b1.Bounds = GetCellRectangle(0,0);

// Calculate position of range (1,1)-(2,2)

Rectangle rc = GetCellRectangle(1,1);

rc = Rectangle.Union(rc, GetCellRectangle(2,2));

// Create a button and position it over cell range (1,1)-(2,2)

Button b2 = new Button();

c1Sizer1.Controls.Add(b2);

b2.Visible = true;

b2.Bounds = rc;

}

private Rectangle GetCellRectangle(int row, int col)

{

return Rectangle.Intersect(

c1Sizer1.Grid.Rows[row].Bounds,

c1Sizer1.Grid.Columns[col].Bounds);

}


Position Controls - Delphi

Delphi

var

b2: Button;

rc: Rectangle;

b1: Button;

begin

b1 := Button.Create;

c1Sizer1.Controls.Add(b1);

b1.Visible := True;

b1.Bounds := GetCellRectangle(0, 0);

rc := GetCellRectangle(1, 1);

rc := Rectangle.Union(rc, GetCellRectangle(2, 2));

b2 := Button.Create;

c1Sizer1.Controls.Add(b2);

b2.Visible := True;

b2.Bounds := rc;

end;

function Class1.GetCellRectangle(row: Integer; col: Integer): Rectangle;

begin

Result := Rectangle.Intersect(c1Sizer1.Grid.Rows[row].Bounds, c1Sizer1.Grid.Columns[col].Bounds);

end;


Position Controls - Visual Basic

Visual Basic

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)

Dim b1 As Button = New Button

c1Sizer1.Controls.Add(b1)

b1.Visible = True

b1.Bounds = GetCellRectangle(0, 0)

Dim rc As Rectangle = GetCellRectangle(1, 1)

rc = Rectangle.Union(rc, GetCellRectangle(2, 2))

Dim b2 As Button = New Button

c1Sizer1.Controls.Add(b2)

b2.Visible = True

b2.Bounds = rc

End Sub

Private Function GetCellRectangle(ByVal row As Integer, ByVal col As Integer) As Rectangle

Return Rectangle.Intersect(c1Sizer1.Grid.Rows(row).Bounds, c1Sizer1.Grid.Columns(col).Bounds)

End Function


Print Contents - C#

C#

/// <summary>

/// Gets an image from a window.

/// </summary>

/// <param name="hwnd">

/// Handle of the window that contains the image.</param>

/// <returns>A bitmap containing an image of the window, or null

/// if the window does not support the PrintWindow API.</returns>

public static Image GetWindowImage(IntPtr hwnd)

{

// Create bitmap

RECT rc = new RECT();

GetWindowRect(hwnd, ref rc);

Bitmap bmp = new Bitmap(rc.Width, rc.Height);

// Draw window into bitmap

using (Graphics g = Graphics.FromImage(bmp))

{

// Window image

IntPtr hdc = g.GetHdc();

IntPtr retval = PrintWindow(hwnd, hdc, 0);

g.ReleaseHdc(hdc);

// Didn't get the window image

// (not all windows support WM_PRINT)

if (retval == IntPtr.Zero)

return null;

}

// Return bitmap

return bmp;

}

[DllImport("USER32.DLL")] private static extern

IntPtr PrintWindow(IntPtr hwnd, IntPtr hdc, uint flags);


Print Contents - Delphi

Delphi

type

Class1 = class

strict private

[STAThread]

class procedure Main(args: array of string);static;

public

class function GetWindowImage(hwnd: IntPtr): Image; virtual;static;

strict private

[DllImport('USER32.DLL')]

class function PrintWindow(hwnd: IntPtr; hdc: IntPtr; flags: System.UInt32): IntPtr;static;

end;

implementation

[STAThread]

class procedure Class1.Main(args: array of string);

begin

end;

class function Class1.GetWindowImage(hwnd: IntPtr): Image;

var

bmp: Bitmap;

rc: RECT;

begin

rc := RECT.Create;

GetWindowRect(hwnd, rc);

bmp := Bitmap.Create(rc.Width, rc.Height);

Result := bmp;

end;

[DllImport('USER32.DLL')]

class function Class1.PrintWindow(hwnd: IntPtr; hdc: IntPtr; flags: System.UInt32): IntPtr;

begin

end;


Print Contents - Visual Basic

Visual Basic

'<summary>

'Gets an image from a window.

'</summary>

'<param name="hwnd">

'Handle of the window that contains the image.</param>

'<returns>A bitmap containing an image of the window, or null

'if the window does not support the PrintWindow API.</returns>

Public Shared Function GetWindowImage(hwnd As IntPtr) As Image

' Create bitmap

Dim rc As New RECT()

GetWindowRect(hwnd, rc)

Dim bmp As New Bitmap(rc.Width, rc.Height)

' Draw window into bitmap

Dim g As Graphics = Graphics.FromImage(bmp)

Try

' Window image

Dim hdc As IntPtr = g.GetHdc()

Dim retval As IntPtr = PrintWindow(hwnd, hdc, 0)

g.ReleaseHdc(hdc)

' Didn't get the window image

' (not all windows support WM_PRINT)

If retval = IntPtr.Zero Then

Return Nothing

End If

Finally

g.Dispose()

End Try

' Return bitmap

Return bmp

End Function 'GetWindowImage

Private Shared<DllImport("USER32.DLL")> _

Function PrintWindow(hwnd As IntPtr, hdc As IntPtr, flags As System.UInt32) As IntPtr


Show Gridlines - C#

C#

private void c1Sizer1_Paint(object sender, PaintEventArgs e)

{

// Paint sizer grid

foreach (Band row in this.c1Sizer1.Grid.Rows)

{

Rectangle rcrow = row.Bounds;

foreach (Band col in this.c1Sizer1.Grid.Columns)

{

Rectangle rccol = col.Bounds;

Rectangle rccel = Rectangle.Intersect(rcrow, rccol);

ControlPaint.DrawBorder3D(e.Graphics, rccel,

Border3DStyle.SunkenOuter);

}

}

}


Show Gridlines - Delphi

Delphi

// no delphi code available


Show Gridlines - Visual Basic

Visual Basic

Private Sub c1Sizer1_Paint(ByVal sender As Object, ByVal e As PaintEventArgs)

For Each row As Band In Me.c1Sizer1.Grid.Rows

Dim rcrow As Rectangle = row.Bounds

For Each col As Band In Me.c1Sizer1.Grid.Columns

Dim rccol As Rectangle = col.Bounds

Dim rccel As Rectangle = Rectangle.Intersect(rcrow, rccol)

ControlPaint.DrawBorder3D(e.Graphics, rccel, Border3DStyle.SunkenOuter)

Next

Next

End Sub


Store Layout - C#

C#

string _gridDefinition;

ArrayList _ctlPositions;

private void btnSaveGrid_Click(object sender, System.EventArgs e)

{

// Save grid definition

_gridDefinition = c1Sizer1.GridDefinition;

// Save control positions

_ctlPositions = new ArrayList();

foreach (Control ctl in c1Sizer1.Controls)

{

_ctlPositions.Add(ctl.Bounds);

}

}

private void btnRestoreGrid_Click(object sender, System.EventArgs e)

{

if (_gridDefinition != null)

{

// Restore grid definition

c1Sizer1.GridDefinition = _gridDefinition;

// Restore control positions

for (int i = 0; i < c1Sizer1.Controls.Count; i++)

{

c1Sizer1.Controls[i].Bounds = (Rectangle)_ctlPositions[i];

}

}

}


Store Layout - Delphi

Delphi

type

strict private

_gridDefinition: string;

_ctlPositions: ArrayList;

strict private

procedure btnSaveGrid_Click(sender: System.Object; e: System.EventArgs);

procedure btnRestoreGrid_Click(sender: System.Object; e: System.EventArgs);

end;

implementation

procedure Class1.btnSaveGrid_Click(sender: System.Object; e: System.EventArgs);

begin

Self._gridDefinition := c1Sizer1.GridDefinition;

Self._ctlPositions := ArrayList.Create;

end;

procedure Class1.btnRestoreGrid_Click(sender: System.Object; e: System.EventArgs);

var

i: Integer;

begin

if (Self._gridDefinition <> nil) then

begin

c1Sizer1.GridDefinition := Self._gridDefinition;

i := 0;

while (i < c1Sizer1.Controls.Count) do

begin

c1Sizer1.Controls[i].Bounds := (Rectangle(Self._ctlPositions[i]));

end;

end;

end;


Store Layout - Visual Basic

Visual Basic

Private _gridDefinition As String

Private _ctlPositions As ArrayList

Private Sub btnSaveGrid_Click(ByVal sender As Object, ByVal e As System.EventArgs)

_gridDefinition = c1Sizer1.GridDefinition

_ctlPositions = New ArrayList

For Each ctl As Control In c1Sizer1.Controls

_ctlPositions.Add(ctl.Bounds)

Next

End Sub

Private Sub btnRestoreGrid_Click(ByVal sender As Object, ByVal e As System.EventArgs)

If Not (_gridDefinition Is Nothing) Then

c1Sizer1.GridDefinition = _gridDefinition

Dim i As Integer = 0

While i < c1Sizer1.Controls.Count

c1Sizer1.Controls(i).Bounds = CType(_ctlPositions(i), Rectangle)

System.Math.Min(System.Threading.Interlocked.Increment(i),i-1)

End While

End If

End Sub


Untitled Document

 ComponentOne ADO.NET for DataExtender