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

Welcome to ComponentOne List for .NET

Welcome to ComponentOne List™ for .NET, a .NET control designed to allow end users to browse, edit, add, and delete data in a tabular format. Using the latest data binding technologies built into Visual Studio.NET, including ADO.NET, List completely manages the database interface, allowing developers to concentrate on important application-specific tasks.

List was designed to be a powerful, versatile, and easy-to-use data presentation tool. Novice programmers can use List to create a fully functional database browser with only writing a few lines of code. Professional developers can use the list control's many properties and events to create sophisticated and user-friendly database front-end applications.

ComponentOne has a user-friendly distribution policy. We want every programmer to obtain a copy of List 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 List for .NET will display a ComponentOne banner every time they are loaded to remind developers to license the product.

We hope you'll like List for .NET. If you have suggestions or ideas for new features or new tools, please call us or write.

Corporate Headquarters

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

http://www.componentone.com

Product Profile

What's New in ComponentOne List for .NET

Installing List for .NET

END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

Licensing FAQs

Technical Support

Redistributable Files

Namespaces

Creating a .NET Project

Adding the List for .NET Components to the Toolbox

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Product Profile

List for .NET includes dozens of advanced data access, data presentation and user interface features that enable developers to build intuitive, professional-looking applications:

Incremental search | End-users can quickly locate list items by typing. Supports both single-character matching and an incremental search mode that concatenates typed characters to further refine the search.
Automatic field completion | Works in concert with incremental search to fill the text portion of a combo with matching field data as characters are typed.
Excel and Word-like styles | Hierarchical style objects encapsulate font, color, picture and formatting information, facilitating easy customization of list components at design time and run time.
Excel-like splits | Developers and end users can divide the list into separate vertical and horizontal panes to provide multiple views of the data. The splits can scroll independently or simultaneously.
Fixed, nonscrolling columns | Splits can also be used to create nonscrolling columns anywhere in the list (at the left or right edges, or in the middle).
In-cell objects | The list supports a variety of in-cell objects for data display, including check boxes and radio buttons.
Automatic data translation | Database values can be automatically translated into alternate text or graphics without coding. For example, numeric codes can be rendered as words or even bitmaps.
Data-sensitive display | A powerful regular expression facility can be used to apply different styles to individual cells depending upon their contents. For example, negative numbers can be shown in red, or fields containing a particular substring can be shown in bold.
Interactive visual editing | Programmers can create columns, retrieve field layouts from a bound data source, resize list components and configure all aspects of the list layout at design time---no coding is required.
Unbound columns | The list supports unbound columns while other columns are bound to a data control.
Run-time CellTips | Provides context-sensitive help for end users.
Alternating row colors | Enhances the readability of the list's display.
Excellent documentation | List includes an extensive manual and online help with plenty of tutorials and examples. 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.
Responsive technical support | Free technical support via e-mail, phone, fax, and peer-to-peer newsgroups. Product updates, sample programs and answers to frequently asked questions are also available from the ComponentOne Web site at www.componentone.com.
Free run-time distribution | No royalty fees required.
New Vertical Splits | Like Microsoft Excel, the list now has the ability to split both horizontally and vertically allowing for a list matrix as well as singular horizontal and vertical views. In addition, a user-friendly matrix dereferencing notation makes splits quite accessible even with multiple horizontal and vertical splits.
New column objects | List now has two separate column objects to help simplify the sometimes daunting object model. The C1DataColumn object contains all of the properties related to data and data processing, while the C1DisplayColumn object contains all of the properties related to the column’s display.
Style border properties | The expanded style object now includes properties that let you customize the appearance, size, color and type of cell borders.
Scroll tracking and ScrollTips | The vertical scroll bar thumb can now scroll records as it is moved. You can also use the ScrollTips feature to provide an informational pop-up during scrolling.
And much more… | Auto completion for dropdowns, tag property for column objects, right to left support and a wide variety of print enhancements.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


What's New in ComponentOne List for .NET

This documentation was last revised on June 17, 2005.

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

There have been enhancements to List for .NET that allow the user more flexibility. C1List Designer, a new design-time column editor interface, was implemented on May 9, 2005.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Feature Overview

A new feature in List for .NET is the C1List Designer, a new design-time column editor interface.

C1List Designer Column Editor

The additions were updated on May 9, 2005.

The design-time column editor now has a new look and gives you greater control over the appearance of columns with just the click of a button.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Installing List for .NET

List for .NET Setup Files

System Requirements

Installing Demonstration Versions

Uninstalling List for .NET

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


List for .NET Setup Files

The installation program will create the 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.
C1List | Contains samples and tutorials for the C1Input component.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


System Requirements

· Operating Systems:

Windows 2000

Windows 2003 Server

Windows NT 4

Windows XP, SP1, SP2

· Environments:

.NET Framework 1.0

.NET Framework1.1

C# .NET

Delphi

Visual Basic .NET

· Hard Disk Space: 15 MB

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

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Installing Demonstration Versions

If you wish to try List 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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Uninstalling List for .NET

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

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

IMPORTANT-READ CAREFULLY: This End User License Agreement (this "EULA") contains the terms and conditions regarding your use of the SOFTWARE (as defined below). This EULA contains material limitations to your rights in that regard. 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 on-line) 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.

This EULA is a legally binding agreement between you and C1. You intend to be 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 the terms and conditions contained in this EULA. If you do not agree to all of the terms and conditions contained in this EULA, you may not install or use the SOFTWARE. If, for whatever reason, installation has begun or has been completed, you should cancel installation or un-install the SOFTWARE, as the case may be. (You may click on the "exit" button or its equivalent to immediately abort installation.) If you do not agree to all of these terms and conditions, then you must 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 between or among resellers, and you must comply with your particular reseller's return policies as agreed at the point of purchase. If the place of business from which you purchased the SOFTWARE does not honor a complete refund for a period of thirty (30) days from the date of proof of purchase, then you may return the SOFTWARE directly to C1 for a period of thirty (30) days from the date of your purchase. To return the product directly to C1, you must obtain a C1 Return Authorization Number by contacting C1, and you must forward all items purchased, including the proof of purchase, directly to C1. 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"). Both of 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 more particularly connected to it over 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). "Developed Legacy Software" means those Developed Software products that are not Developed Web Server Software, including, for example, stand-alone applications and applications accessed by a file server only. "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.

The Developer Seat License 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 such computer/computers is/are used only by one single Developer at any given time and not concurrently. 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.

In all cases, 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-2002. All Rights Reserved.”); (c) 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.

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 (c1.win.c1reportdesigner.dll) file known as C1ReportDesigner Component, 2) one executable (ReportDesigner.exe) file 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.

Subject to the terms and conditions in this EULA, C1 hereby grants you the right to use the C1ReportDesigner Application Source Code. You are hereby also granted the right to modify such Source Code and to create derivative works that are based on the licensed Source Code. You may distribute the derivative works that you develop, 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 modified version, derivative work, or any portion 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. 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. Doc-to-Help and ComponentOne Natural Search. You may use Doc-To-Help to create online help, manuals or other documentation in electronic or printed format (the "Output Documents"). You may distribute and incorporate in such Output Documents those files identified in the documentation as Redistributable Files. Except for those specific Redistributable Files, you MAY NOT distribute the SOFTWARE, in any format, to others.

d. 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.

e. ComponentOne Response and SOAP Channel. ComponentOne Response is intended to be installed on a Network Server. C1 grants to you the following rights to the SOFTWARE: a) Installation: You may install one copy of the SOFTWARE on a single Network Server; b) Use: When installed and initialized, the SOFTWARE creates a database file which contains the embodiment of a solution knowledge base (the database hereinafter referred to as the "Knowledge Base").

You may use the SOFTWARE to create Knowledge Bases on one Network Server only. To create or to operate Knowledge Bases in more than one Network Server, you must purchase one additional SOFTWARE license for each additional Network Server.

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 and complete 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, possibly changes to which specific products are included in the bundle). For you to be entitled 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. The original purchaser of the SOFTWARE or of a Studio product receives a one-year subscription from the date of purchase of the SOFTWARE. After one year, the Studio subscription and/or the SOFTWARE license must be renewed to continue to be entitled to receive the SOFTWARE and/or the Studio Products revisions as the case may be.

6. Serial Number. Within the packaging of the SOFTWARE, a unique serial number (the "Serial Number") is included, which allows for the registration 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 shall constitute a breach of this EULA, the effect of which shall be the automatic termination and revocation of all the rights granted herein.

7. Evaluation Copy. If you are using an "evaluation copy" or similar version, specifically designated as such by C1 on its website or otherwise, 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) contact C1 or one of its authorized dealers to purchase a license of the SOFTWARE, which is subject to the terms and limitations contained herein; and c) any Developed Software 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 either: (a) copy the SOFTWARE solely for backup or archival purposes; or (b) install the SOFTWARE on a single computer, provided you keep the original solely for backup or archival purposes. Notwithstanding the foregoing, you may not copy the 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 transfer the SOFTWARE to another computer, provided that it is completely removed from the computer from which it was transferred. 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 dates, upgrades, this EULA and, if applicable, the Certificate of Authenticity), and that the recipient agrees to the terms and conditions of this EULA as provided herein. 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, the following:

Restricted Countries: Restricted Countries currently include, but are not necessarily limited to Cuba, Iran, Iraq, Libya, Montenegro, North Korea, Serbia, Sudan, and Syria.

Restricted End-Users: Any End-User whom you know or have reason to know will use SOFTWARE or Developed Software in the design, development, or production of missiles and missile technology, nuclear weapons and weapons technology, or chemical and biological weapons. Any national of any of the Restricted Countries, wherever located, who intends to transmit or transport the SOFTWARE or Developed Software to one of the Restricted Countries.

Restricted End-Uses: Any use of SOFTWARE and Developed Software related to the design, development, or production of missiles and missile technology, nuclear weapons and weapons technology, or chemical and biological weapons.

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. For solicitations issued before December 1, 1995, by the United States of America, its agencies and/or instrumentalities (the "Government"), other than the Department of Defense, the use, duplication or disclosure of the software and documentation provided to the Government under this EULA shall be subject to the RESTRICTED RIGHTS as set forth in subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights clause at 48 CFR ch.1 52.227-19. For solicitations issued before September 29, 1995, by the Department of Defense, the use, duplication or disclosure of the software and documentation provided under this EULA shall be subject to the RESTRICTED RIGHTS as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at 48 CFR ch.2 252.227-7013. 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. 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'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 or amendment 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 in this EULA, 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, "clicking-through" a questionnaire, 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 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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


What is Licensing?

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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


How does Licensing Work?

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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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).

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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:

1. 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

{

// ...

}

2. 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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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".

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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

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").

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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

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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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.

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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Technical Support

List 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

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ComponentOne Web site

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

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

· Answers to frequently asked questions (FAQ's) about List, 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 List.

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

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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!

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Internet e-mail

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

support.c1list.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

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Peer-to-Peer newsgroup

ComponentOne also sponsors a peer-to-peer newsgroup for List 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 List. 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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Redistributable Files

ComponentOne List 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.C1List.dll

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

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


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 List control and the C1Combo control is C1.Win.C1List. The following code fragment shows how to declare a C1List 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 Split, you can use it inside your project without qualification. However, the C1List assembly also implements a class called Split. So, if you want to use the C1List 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.

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.

As a warning, unless specified explicitly in the code, it is taken for granted that the statement has been specified. This applies only to small code samples. Tutorials and other longer samples will specify complete qualifiers.

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Creating a .NET Project

This topic demonstrates how to create a new .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, and select Windows Application from the list of Templates in the right pane.

3. 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.

4. Double-click the C1TrueDBGrid components from the Toolbox to add them to Form1. For information on adding a component to the toolbox, see Adding the List for .NET Components to the Toolbox.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Adding the List for .NET Components to the Toolbox

When you install List for .NET, the following new components will appear in the Visual Studio’s toolbox customization dialog box:

· C1List

· C1Combo

In order to use the List components, you must add them to the Visual Studio Toolbox:

Open the Visual Studio IDE (Microsoft Development Environment). Make sure the Toolbox is visible (select Toolbox in the View menu if necessary). Right-click the Toolbox to open the toolbox context menu.

If you want List components to appear on their own tab in the Toolbox, select Add Tab from the context menu and type in the tab name, for example, C1List. Select the tab where you want the List components to appear. Right-click it and select Customize Toolbox from the context menu. The Customize Toolbox dialog box will open.

In the Customize Toolbox dialog box, go to the .NET Framework Components tab. Sort the list by Namespace (click the Namespace column header) and check the check boxes for all components belonging to namespace C1.Win.C1List. Note that there may be more than one component for each namespace.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Object Model

List for .NET was developed using the latest .NET technologies. The C1List control and its programmable components are all .NET objects designed according to Microsoft specifications. If you are already familiar with the Microsoft .NET object and collection models, you will have no problem using List.

If you are new to Visual Basic, please read Working with Objects and Collections, which illustrates how to manipulate List objects in code. Although individual objects are designed to perform different tasks, the techniques used to manipulate them are the same. Once you have mastered these common programming constructs, using Visual Basic and .NET controls will be quite easy and intuitive.

Regardless of your experience level, please read the following section, as it provides a thumbnail sketch of all List objects and collections.

List Objects and Collections

C1List Object

C1Combo Object

C1DataColumnCollection Object

C1DisplayColumnCollection Object

SplitCollection Object

GridStyleCollection Object

ValueItems Object

HBar Object

VBar Object

GridLines Object

CellBorders Object

SelectedRowCollection Object

SelectedColumnCollection Object

Working with Objects and Collections

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


List Objects and Collections

List for .NET provides a rich set of properties, methods and events that enable you to develop sophisticated database applications. The organization imposed by List's object model makes it easier to work with such a large feature set.

Objects and collections that refer to visual entities, such as columns, can be customized at design time or run time. Objects and collections that refer to abstract entities, such as arrays and bookmarks, are only available in code at run time.

Two controls are available in the .NET toolbox for addition into a project:

C1List | List .NET control.
C1Combo | Combo .NET control.

The namespace for List also contains definitions for the following objects:

C1DataColumn | Represents a column of data within a list.
C1DisplayColumn | Represents a column of data relative to a split.
GridLines | Represents the gridlines which separate items in the list.
HBar | Represents the horizontal scroll bar and its properties.
Split | Represents a group of adjacent columns that scroll as a unit.
Style | Encapsulates font, color, picture, and formatting information.
ValueItems | Encapsulates both the Values collection and valueitem properties.
ValueItem | Allowable column input values, with optional translation.
VBar | Represents the vertical scroll bar and its properties.

A collection is an object used to group similar data items, such as list columns or styles. In general, a group of similar items in List is implemented as a collection. Since a collection is an object, you can manipulate it in code just as you would any other object. List exposes the following collections:

C1DataColumnCollection | Contains zero or more C1DataColumn objects in a list.
C1DisplayColumnCollection | Contains zero or more C1DisplayColumn objects in a list.
SelectedRowCollection | Contains zero or more selected row bookmarks
SelectedColumnCollection | Contains zero or more selected row bookmarks
SplitCollection | Contains one or more Split objects in a list.
GridStyleCollection | Contains built-in and user-defined Style objects for a list.
ValueItemCollection | Contains zero or more ValueItem objects for a column.

The following sections provide a brief overview of List's objects and collections.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Object

Using C1List’s C1DataColumnCollection and C1DisplayColumnCollection objects, you can create, access, and modify the column objects that define the mappings between the list's physical columns and the underlying database fields. Using its SplitCollection object, you can divide the list into multiple vertical panes to provide different views of the same data source.

See Also

Design Time Interaction

Run Time Interaction

Reference Topics

C1List Public Properties

C1List Public Methods

C1List Public Events

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Object

The C1Combo control is used as a multicolumn drop-down list box. C1Combo is independent of C1List, so it can be used alone or in conjunction with C1List. You can place a C1Combo control on a Visual Basic form at design time as you would a C1List control.

The C1Combo control also supports incremental search.

See Also

Design Time Interaction

Run Time Interaction

Reference Topics

C1Combo Public Properties

C1Combo Public Methods

C1Combo Public Events

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection Object

The C1List control and the C1Combo control both maintain a C1DataColumnCollection object to hold and manipulate C1DataColumn objects. This collection is contained under the C1List object and can be modified through .NET’s collection editor. This collection is available through the Columns property of the List. In addition, this collection can be modified through .NET’s C1List Designer.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Object

Each column within a C1List control, C1Combo control or Split object is represented by two column objects, one global and one split-specific. All of the properties related to data access and formatting are contained under the C1DataColumn object. The properties of the C1DataColumn object are global in scope, which means changing a C1DataColumn property changes that value for all columns, even across splits. You can access the DataColumn object as follows:

· Visual Basic

· C#

· Delphi

See Also

Using the C1List Designer

Reference Topics

C1DataColumn Public Properties

C1DataColumn Public Methods

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection Object

The C1List control and the C1Combo control both maintain a C1DisplayColumnCollection object to hold and manipulate C1DisplayColumn objects. This collection is contained under the SplitCollection object, and is available through the Split’s DisplayColumns property. In addition, this collection can be modified in .NET through the C1DisplayColumn Collection Editor.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn Object

Each split within the list contains at least one C1DisplayColumn object. All of the properties related to a column’s display are contained under this object. Unlike the C1DataColumn properties, the properties of the C1DisplayColumn object are split-specific. Changing a C1DisplayColumn property only changes that value for only the specified column inside the specified split. You can access the object as follows:

· Visual Basic

· C#

· Delphi

See Also

Using the C1DisplayColumn Collection Editor

Reference Topics

C1DisplayColumn Public Properties

C1DisplayColumn Public Methods

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection Object

The C1List control maintains a SplitCollection object to hold and manipulate Split objects. A list has one split by default, but may contain multiple splits. This collection is accessed using the Splits property of the C1List. In addition, this collection can be modified in .NET through the Split Collection Editor.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Object

List for .NET supports Excel-like splits that divide the list into vertical and horizontal panes to provide users with different views of the data source. Each split is represented by a Split object and contains a group of adjacent columns that scroll as a unit.

When a C1List control is created, it contains one Split object by default. Many of the properties of the Split object also apply to the C1List control as a whole, so you do not need to concern yourself with splits until you actually need to use them, such as when creating fixed, nonscrolling columns. You can access the object as follows:

· Visual Basic

· C#

· Delphi

See Also

How to Use Splits

Using the Split Collection Editor

Reference Topics

Split Public Properties

Split Public Methods

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection Object

The C1List and C1Combo controls store all built-in and user-defined Style objects in the GridStyleCollection object. You can access the members of this collection by name at run time, then apply them to a grid, column or split in order to control the appearance of the object in question. This collection is accessed using the Styles property in the List. In addition, this collection and its members can be modified in .NET through the Style Collection Editor.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Style Object

Style objects encapsulate font, color, picture and formatting information for a C1List, C1Combo, Split, or C1DataColumn object. The Style object is a very flexible and powerful tool that provides Excel- and Word-like formatting capabilities for controlling the appearance of the list's display.

When a C1List or C1Combo control is created, it contains ten built-in styles. You can modify the built-in styles or add your own styles at either design time or run time. Both controls also support several optional events that use Style objects to convey formatting information on a per-cell or per-row basis. You can access the object as follows:

· Visual Basic

· C#

· Delphi

See Also

How to Use Styles

Using the Style Collection Editor

Reference Topics

Style Public Properties

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems Object

The ValueItems object contains a collection and a couple of properties that can create alternate display values for database values in the list. It can specify an allowable input value for a given C1DataColumn object or it can also be used to translate raw data values into alternate text or graphics for display. For example, you may want to display Balance Due and Paid in Full instead of the numeric data values 0 and 1. The ValueItems object contains display properties and a collection of ValueItem objects, the ValueItemCollection. You can access this object as follows:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection Object

Each C1DataColumn object within a C1List or C1Combo control stores its set of display value/value pairs in objects called ValueItem objects. The ValueItemCollection object is a collection of these pairs. This collection can be accessed through the Values property of the ValueItems object. For instance, in order to alter the first ValueItem in the collection, the code would look like:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem Object

The ValueItem object consists of two properties: DisplayValue and Value. The Value property specifies the underlying value in the database and the DisplayValue property specifies the value you would like displayed in the list. These objects are contained in the ValueItemCollection object, and can be edited in .NET’s ValueItemCollection Editor. This editor is available in the C1DataColumnCollection editor under the ValueItems object.

See Also

Automatic Data Translation with ValueItems

Using the ValueItem Collection Editor

Reference Topics

ValueItems Public Properties

ValueItem Public Properties

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar Object

The HBar object is used to specify properties of the horizontal scrollbar. With the HScrollBar property, you can specify the height of the scroll bar, and whether it shows up automatically or not at all.

Reference Topics

HBar Public Properties

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar Object

The VBar object is used to specify properties of the vertical scrollbar. With the VScrollBar property, you can specify the width of the scroll bar, and whether it shows up automatically or not at all.

Reference Topics

VBar Public Properties

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridLines Object

The GridLines object is used to specify characteristics of the ColumnDivider and RowDivider properties. Both the color and style of the column and row lines are able to be manipulated at run-time or design-time with the GridLines object.

Reference Topics

GridLines Public Properties

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellBorders Object

The CellBorders object is used to specify the characteristics of the Borders property of a Style. This property sets the column borders for the cell. With this object, you can specify the width of each border around a cell and the color of the cell border.

Reference Topics

CellBorders Public Properties

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection Object

When the user selects and highlights one or more rows of a C1List control at run time, the bookmarks of the selected rows are stored in the SelectedRowCollection object. In code, you can use the Count property and Item method of the collection to determine which rows are selected. You can also select and deselect records programmatically using its Insert and RemoveAt methods.

See Also

Selection and Movement

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedColumnCollection Object

When the user selects and highlights one or more columns of a C1List control at run time, the C1DataColumn objects for those rows are stored in the SelectedColumnCollection object. In code, you can use the Count property and Item method of the collection to determine which rows are selected. You can also select and deselect records programmatically using its Insert and RemoveAt methods.

See Also

Selection and Movement

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Working with Objects and Collections

This section describes how to work with objects and collections in Visual Basic code, with an emphasis on efficiency. Although the concepts are illustrated with List objects and collections, you can apply the same fundamentals to all Visual Basic objects and collections.

A C1List object is created when you place a List control on a Visual Basic.NET form. C1List objects created in Visual Basic will have default names of C1List1, C1List2 and so forth. You can change the control name in the Visual Basic Properties window at design time.

Working with collections

Adding Members

Removing members

Working with the Count property

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Working with collections

A C1List object has eight separate collections which govern its diverse objects. Each of these collections has an associated property within the C1List object which returns the collection object. This prevents the need for the programmer to enter the entire collection name when using the list in code. The following table outlines these mappings:

C1DataColumnCollection
C1DisplayColumnCollection
GridStyleCollection
SelectedColumnCollection
SelectedRowCollection
SplitCollection
ValueItemCollection

Columns property
DisplayColumns property
Styles property
SelectedCols property
SelectedIndices property
Splits property
Values property

By default, the SplitCollection object contains one Split object. The GridStyleCollection object contains these default Style objects: Normal, Heading, Footing, Selected, Caption, HighlightRow, EvenRow, OddRow and RecordSelector.

You can reference an object in a collection using its zero-based index. You can read or set the Split object's properties as follows:

· Visual Basic

· C#

· Delphi

You can create a reference to an object in a collection using the collection's Item method. The following code creates a reference to a list's default Split object:

· Visual Basic

· C#

· Delphi

Note the use of the namespace qualifier in the preceding example. Using the namespace qualifier is recommended in order to resolve potential naming conflicts with other controls. For example, if you use another control in the same project that also defines an object named Split, the C1List namespace qualifier is required, as is the namespace qualifier for the other control.

Since the Item method is implicit for collections, you can omit it:

· Visual Basic

· C#

· Delphi

You can now use Split0 to read or set the Split object's properties or to execute its methods:

· Visual Basic

· C#

· Delphi

Very often, you need to read and set more than one of an object's properties. For example:

· Visual Basic

· C#

· Delphi

This code is very inefficient because of the number of times the object Me.C1List1.Splits(0,0) is accessed. It is more efficient to create a single reference to the object up front and use it repeatedly:

· Visual Basic

· C#

· Delphi

This code is much more efficient and easier to read. If your Visual Basic application accesses collection objects frequently, you can improve the performance of your code significantly by adhering to these guidelines.

Similarly, you can apply this technique to other objects and collections of List and of Visual Basic in general. Of particular importance to the list are the C1DataColumn object and C1DataColumnCollection object (also applies to C1DisplayColumn object):

· Visual Basic

· C#

· Delphi

Visual Basic also provides an efficient With...End With statement for setting multiple properties of an object without explicitly assigning it to a variable. For example, the following code sets multiple properties of the first column of a list (recall that collections are zero-based):

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Adding Members

To create and add an object to a collection, use the collection's Add method. The method takes an object as its only argument. For example, you can create more valueitems for a column by adding new ValueItem objects to the ValueItemCollection object:

· Visual Basic

· C#

· Delphi

This code adds a ValueItem object to the ValueItemCollection of C1List1. Alternatively, you can create a ValueItem object with index 1 with the Insert method:

· Visual Basic

· C#

· Delphi

The only object which is unable to add or remove members using the Add or RemoveAt methods is the Split object. To correctly add or remove Splits you must use the Insert/RemoveHorizontalSplit and Insert/RemoveVerticalSplit methods of the Split object. These methods are also available in the list’s right-click context menu at design-time

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Removing members

Regardless of how a collection implements the Add or Insert methods, the syntax for removing items is the same. To remove an existing item from a collection, use the RemoveAt method:

· Visual Basic

· C#

· Delphi

After this statement is executed, all splits with collection indexes greater than 1 will be shifted down by 1 to fill the place of the removed split.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Working with the Count property

You can determine the number of objects in a collection using the collection's Count property:

· Visual Basic

· C#

· Delphi

You can also iterate through all objects in a collection using the Count property as in the following example, which prints the Caption string of each C1DataColumn object in a list:

· Visual Basic

· C#

· Delphi

The Count property is also useful for appending and removing columns:

· Visual Basic

· C#

· Delphi

Visual Basic also provides an efficient For Each...Next statement that you can use to iterate through the objects in a collection without using the Count property:

· Visual Basic

· C#

· Delphi

In fact, using the For Each...Next statement is the preferred way to iterate through the objects in a collection.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Design Time Interaction

You can easily configure List for .NET at design time using the property list in Visual Studio. The following sections describe how to use List's design-time environment to configure the C1List control. Most of the following material also applies to the C1Combo control since it is a subset of C1List. Specific differences between the two controls are discussed at the end of this chapter.

Understanding the object model and property access

Using the Split Collection Editor

Using the C1List Designer

Using the C1DisplayColumn Collection Editor

Using the ValueItem Collection Editor

Using the Style Collection Editor

Context Menu

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Understanding the object model and property access

List for .NET supports a rich object model that reflects the organization of its visual components. Therefore, in order to customize a list's appearance and behavior, you need to know how the Visual Basic properties window and collection editors reflect the list’s object model.

A split is similar to the split window features of products such as Microsoft Excel and Word. You can use splits to present your data in multiple vertical or horizontal panes. These panes, or splits, can display data in different colors and fonts. They can scroll as a unit or individually, and they can display different sets of columns or the same set. You can also use splits to prevent one or more columns or rows from scrolling. By default, a list contains a single split comprising all of its columns. Note that most of the split properties are not present in the main properties window. For example, you cannot set the AlternatingRows property without opening up the Splits Collection Editor and modifying the Split object, because the value of this property can vary from split to split. The term split-specific is used to describe such properties, since they apply to individual splits rather than the list as a whole.

Conversely, the term global is used to describe properties that apply to the list as a whole, such as DataView and BorderStyle. Global properties are accessible through the Visual Basic Properties window, which is initially located in the lower right of the .NET IDE. The latter also shows extender properties specific to the Visual Basic environment, such as Align and Tag.

The distinction between split-specific and global properties also extends to the two column objects which represent the columns of data within the list. Both of these objects govern a column’s properties. The C1DataColumn object contains all of the column properties related to data access and formatting. The C1DisplayColumn object contains all of the column properties related to the column’s visual display. The C1DataColumn properties are global column properties. These are properties that apply to all of the columns in the list, no matter their placement among the splits. For instance, when you add or remove a column, you would add or remove the associated C1DataColumn. On the other hand the C1DisplayColumn properties are split-specific properties. Setting one of these properties in one split doesn’t mean that the properties are then set in all splits.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Accessing global list properties

Properties which apply to the entire list object are considered global properties. Once set, these properties will remain set no matter what split-specific or column properties are set. These properties can be accessed through Visual Basic’s properties window. It enables easy access to all of the list’s properties and allows you to set their values at design-time. The property window orders the properties either categorically or alphabetically. In order to allow the user access to objects and collections, the property page supports a tree view structure where objects can be expanded to show their constituent properties.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Accessing Split-Specific properties

In the Visual Basic properties window, split properties are accessed through the Splits property. By clicking the ellipsis button next to the Splits node, the Split Collection Editor will appear. This editor can be used to access all of the split-specific properties, as well as the C1DisplayColumnCollection properties for the current split. For more information, see Using the Split Collection Editor.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Accessing Column properties

In the Visual Basic properties window, global column properties, also known as C1DataColumn properties, are accessed through the C1DataColumnCollection object property. By clicking the ellipsis button next to the Columns node in the Visual Studio property list, the C1List Designer will appear. For more information, see Using the C1List Designer.

In the Visual Studio property list, each member of the SplitCollection also exposes a DisplayColumns property known as the C1DisplayColumnCollection object. These C1DisplayColumn properties are split-specific properties. By clicking the ellipsis button next to the Splits node in the property list, then clicking the ellipsis button next to the DisplayColumns node in the Split Collection Editor, the C1DisplayColumn Collection Editor will appear. For more information, see Using the C1DisplayColumn Collection Editor.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using the Split Collection Editor

The SplitCollection is a collection of Split objects which provides access to most of the list’s display properties and properties specific to a Split. Accessing these properties in code is done through the C1List object and is demonstrated by the following:

· Visual Basic

· C#

· Delphi

.NET contains useful collection editors which make the altering of a collection much easier. The SplitCollection is able to be modified at design-time through a .NET collection editor. The Split Collection Editor can be accessed by clicking the ellipsis button next to the Splits property in the Visual Basic Properties Window.

Notice that the editor doesn’t contain buttons to add and delete Splits. Even though you aren’t able to use the collection editor to create and delete splits, you still are able to accomplish this at design-time. By right-clicking on the list, you will bring up the list’s context menu. Included in the menu are four commands: InsertHorizontalSplit, RemoveHorizontalSplit, InsertVerticalSplit, and RemoveVerticalSplit. By selecting one of these four options, you can quite simply add and remove splits in the list in design mode.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Properties

The following SplitCollection object properties are available in the Split Collection Editor through the Visual Basic properties window:

Misc

AllowColMove | Specifies if the user has the ability to move columns in the list.
AllowColSelect | Specifies if the user has the ability to select columns in the list.
AllowFocus | Specifies whether the user has the ability to set focus to the column.
AllowHorizontalSizing | Specifies if a user is allowed to resize horizontal splits.
AllowRowSizing | Specifies if a user is allowed to resize the rows in the list.
AllowVerticalSizing | Specifies if a user is allowed to resize vertical splits.
AlternatingRowStyle | Determines if a list or split displays odd-numbered rows in one style and even-numbered rows in another.
Caption | Returns or sets the caption to the list.
CaptionHeight | Sets the height of the list’s caption area.
ColumnCaptionHeight | Sets the height of the column captions.
ColumnFooterHeight | Sets the height of the footer captions.
DisplayColumns | Returns a collection of C1DisplayColumn objects.
ExtendRightColumn | Sets whether the last column will extend to fill the dead area of the list.
FetchRowStyles | Specifies whether the FetchRowStyle event will be fired.

Name

SplitSize | Returns or sets the size of a split.
SplitSizeMode | Determines how the SplitSize property is used to determine the actual size of a split.
SpringMode | Specifies whether the columns will resize when the list is resized.

Scrolling

HorizontalScrollGroup | Synchronizes horizontal scrolling between splits.
HScrollBar | Returns the HBar object that controls the appearance of the horizontal scrollbar.
VerticalScrollGroup | Synchronizes vertical scrolling between splits.
VScrollBar | Sets or returns the VBar object that controls the appearance of the vertical scrollbar.

Styles

CaptionStyle | Sets or returns the Style object that controls the appearance of the caption area.
EvenRowStyle | Sets or returns the Style object that controls the appearance of an even-numbered row.
FooterStyle | Returns the Style object that controls the appearance of column footers.
HeadingStyle | Returns the HeadingStyle Style object.
HighLightRowStyle | Returns the HighlightRowStyle Style object.
InactiveStyle | Returns the InactiveStyle Style object.
OddRowStyle | Returns the OddRowStyle Style object.
SelectedStyle | Returns the SelectedStyle Style object.
Style | Returns or sets the Style object.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using the C1List Designer

The C1DataColumnCollection object is a collection of the column properties which relate to data, data accessing or data formatting. These properties are contained under the list’s Columns property. Accessing these properties in code is done through the Columns property under the C1List object, and is demonstrated by the following:

· Visual Basic

· C#

· Delphi

Given the List’s object model, many of these properties would be tough to find and set efficiently. Luckily, .NET contains collection editors which help in categorizing and setting the C1List’s collection properties. .NET’s collection editor for the C1DataColumnCollection object enables the user to efficiently add, remove and alter C1DataColumn properties. The C1List Designer can be accessed by clicking the ellipsis button next to the Columns property in the Visual Basic Properties Window.

The editor has two panes. The left pane contains the current columns in the list and their associated DataField under the Members heading. By clicking on the Add or Remove buttons the columns in the left pane can be created or deleted accordingly. The right pane contains the data-related properties for the specific column highlighted in the left pane.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Properties

The following C1DataColumnCollection object properties are available in the C1List Designer in the Visual Basic properties window:

Caption | Returns or sets the caption to the list.
DataMember | Sets or returns the name of the field in the database table to which a list column is bound.
DataWidth | Holds the database width, in bytes, for a list column.
DefaultValue | Sets or returns the default value of an unbound list column in a bound list.
FooterText | Sets or returns the text displayed in the column's footer area.
NumberFormat | Sets or returns a value indicating the format string for a list column.
ValueItems | Returns a ValueItems object for a column.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using the C1DisplayColumn Collection Editor

The C1DisplayColumnCollection is a collection of the column properties which relate to display, color, font, etc. These properties are contained under the Columns identifier under the SplitCollection. These properties are also split-specific, as each C1DisplayColumn property can have a different value in different splits. Accessing these properties in code is done through this SplitCollection and is demonstrated by the following:

· Visual Basic

· C#

· Delphi

Given the List’s object model with its split-specific column properties and diverse collections, many of its properties might be tough to find and set efficiently. Luckily, .NET contains collection editors which help in categorizing and setting the C1List’s collection properties. The Split Collection Editor can be accessed by clicking the ellipsis button next to the Splits property of the list in the Visual Basic property pages. In the C1DisplayColumn Collection Editor, click the ellipsis button next to the DisplayColumns property to bring up the editor.

The editor has two panes. The left pane contains the current columns in the list under the Members heading. Notice that the editor doesn’t contain buttons to add and delete columns. Even though you aren’t able to use the collection editor to create and delete columns, you still are able to accomplish this at design-time. The right pane contains the display-related properties for the specific column highlighted in the left pane.

Notice that there aren’t any add or remove buttons in the C1List Designer. Due to the fact that there can be multiple DisplayColumns for each split in the list, the addition or deletion of columns must occur in the C1List Designer. This ensures that a column is added to all splits, or removed from all splits.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn properties

The following C1DisplayColumnCollection object properties are available in the C1DisplayColumn Collection Editor in the Visual Basic properties window:

AllowFocus | Specifies whether the user has the ability to set focus to the column.
AllowSizing | Specifies whether the user has the ability to size a column.
ButtonFooter | Specifies whether the column footer is also a button.
ButtonHeader | Specifies whether the column header is also a button.
ColumnDivider | Determines the style of the border drawn between Columns rows.
FetchStyle | Specifies whether the FetchCellStyle event will be fired.
FooterDivider | Specifies whether the right edge of the column's footer is drawn with a vertical dividing line.
FooterStyle | Returns the Style object that controls the appearance of column footers.
HeaderDivider | Specifies whether the right edge of the column's header is drawn with a vertical dividing line.
HeadingStyle | Returns the HeadingStyle Style object.
Height | Height of Columns.
MinWidth | Sets or returns the minimum width that a column can be sized to when the list is resized.
OwnerDraw | Specifies whether the OwnerDraw event will be fired.
Style | Returns or sets the Style object for the column.
Visible | Determines if the current cell is visible within the displayed area of the list.
Width | Sets or returns the width of a column.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using the ValueItem Collection Editor

The ValueItemCollection is a collection of values and display values which allows for translated data within a column. This collection object can be accessed through the C1DataColumn.ValueItems.Values property. Accessing these properties in code is done through this collection, and is demonstrated by the following:

· Visual Basic

· C#

· Delphi

In order to make these properties more easily modifiable, there is a ValueItem Collection Editor which enables the user to add ValueItems, remove ValueItems, and alter their Value and DisplayValue properties. This editor is accessible through the Visual Basic properties window. Click the ellipsis button next to the Columns property in the VB properties window to bring up the C1ListDesigner. Expand the ValueItems node to expose the ValueItems collection items. Click the ellipsis button next to the Values property to bring up the ValueItem Collection Editor.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using the Style Collection Editor

The Style collection is a collection of Microsoft Word-like styles which can associate certain sections for the list with a style. The Styles collection is located under the C1List object, and contains individual Style objects as its members. Accessing the individual Style objects and their properties in code is done through this collection, and is demonstrated by the following:

· Visual Basic

· C#

· Delphi

In order to make these properties more easily modifiable, the Style Collection Editor enables the user to add styles and modify the properties of existing styles. The Style Collection Editor is available in the Visual Basic Properties Window. Clicking the ellipsis button next to the Styles node in the VB Properties window will bring up the editor.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Context Menu

Right-click anywhere on the list to display the C1List context menu, which is a context menu that Visual Basic provides for all .NET controls. Although the C1List’s context menu has a few extra features.

The context menu commands operate as follows.

About ComponentOne C1List....

This command displays the list’s About box. This is helpful if you need to know the build number of the list.

Retrieve Fields/Clear Fields

These commands initiate the methods RetrieveFields and ClearFields of the list. RetrieveFields goes back to the data source and retrieves all of the formatting information and base data for the column. ClearFields clears out any existing column formatting.

Insert/Remove Horizontal Split

These commands insert or remove a horizontal split from the list. This is the only way to alter the state of the list’s splits at design-time.

Insert/Remove Vertical Split

These commands insert or remove a vertical split from the list. This is the only way to alter the state of the list’s splits at design-time.

Cut, Copy, Paste, Delete

These commands are identical to those on the Visual Basic Edit menu. Cut (Ctrl+X) moves the list from the Visual Basic form to the Clipboard. Copy (Ctrl+C) moves a copy of the list to the Clipboard while leaving the list on the form intact. Paste (Ctrl+V) copies the list from the Clipboard to the form. Delete (the Del key) removes the list but does not move it to the Clipboard. You can undo the Delete command by selecting Undo (Ctrl+Z) from the Visual Basic Edit menu.

Bring To Front, Send To Back

These commands control the z-order of the list relative to the other objects on the Visual Basic form. Bring To Front (Ctrl+J) places the list in front of other objects; Send To Back (Ctrl+K) places it behind other objects.

View Code

This command displays the list's code window, which enables you to view and edit the list's event handling code.

Align to List

This command automatically aligns the outer edges of the list control to the design-time list lines on the form.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Run Time Interaction

This chapter describes how users of your application interact with List for .NET at run time. You can give your users the ability to perform any or all of the following:

· Navigate within the list using the mouse or keyboard.

· Select rows or columns.

· Configure the list's layout.

In the following sections, the properties and events associated with a particular user action are noted where applicable.

Navigation and Scrolling

Searching and Field Completion

Selection and Movement

Sizing and Splitting

Additional User Interaction Features

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Navigation and Scrolling

The following sections describe the list's default navigation and scrolling behavior. You always have complete control over the behavior of the Tab and arrow keys as well as the position of the current cell when a row or split boundary is reached.

Mouse Navigation

Row Tracking

Clicking the Rightmost Column

Keyboard Navigation

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Mouse Navigation

When the user clicks a row, that row becomes current, and the RowChange event is fired.

The user can also use the mouse to manipulate the list's scroll bars, bringing cells that lie outside the list's display area into view. The vertical scroll bar governs rows; the horizontal scroll bar governs columns. The HScrollBar property controls whether the horizontal scroll bars are displayed, while the VScrollBar property controls the vertical scroll bar.

Scrolling always occurs in discrete cell units; the user cannot scroll on a per-pixel basis in either direction.

Note that the scroll bars do not change the current cell. Therefore, the current cell may not always be visible.

To respond to vertical scrolling operations in code, use the TopIndexChange event. To respond to horizontal scrolling operations in code, use the LeftColChange event.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Row Tracking

If the RowTracking property is set to True, rows are automatically highlighted as the mouse is moved over them.

When RowTracking is True and the user highlights a different row by moving the mouse, the ItemChanged event will not fire.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Clicking the Rightmost Column

The list always displays the leftmost column (the first visible column) in its entirety. The rightmost column, however, is usually clipped. The behavior of the last partially visible column when clicked by the user is controlled by the list's PartialRightColumn property.

The default value for the PartialRightColumn property is True. The rightmost column will be clipped if the control or split is not wide enough to accommodate the entire column.

If False, the rightmost column will not be clipped while other columns are visible. In this case, the rightmost column must be scrolled into view as the only visible column in the control or split.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Keyboard Navigation

By default, the user can navigate the list with the arrow keys, the Tab key, and the PgUp and PgDn keys.

Up/Down Arrows | These keys move the current cell to adjacent rows.
Tab | The Tab key moves focus to the next control on the form, as determined by the tab order.
PgUp, PgDn | These keys scroll the list up or down an entire page at a time. Unlike the vertical scroll bar, the PgUp and PgDn keys change the current row by the number of visible rows in the list's display. When paging up, the current row becomes the first row in the display area. When paging down, the current row becomes the last row in the display area. The current column does not change.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Searching and Field Completion

The following sections describe how the C1List and C1Combo controls locate list items in response to keyboard input.

Searching in C1List

Searching in C1Combo

Field Completion (C1Combo only)

Search Mismatch (C1Combo only)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Searching in C1List

The MatchEntry property determines how a C1List control performs searches based on user input.

When set to None (the default), the control does not perform any incremental searches.

When set to Standard, the search argument is limited to one character, and the control attempts to find a match for the character entered using the first letter of entries in the list. Repeatedly typing the same letter cycles through all of the entries in the list beginning with that letter.

When set to Extended, the control searches for an entry matching all characters entered. The search is performed incrementally as characters are typed. This behavior is almost identical to that of a C1Combo control except that the search argument is cleared when a C1List control gains focus or when the user presses Backspace or hesitates for a few seconds. Use the MatchEntryTimeout property to specify the timeout value; the next characters entered by the user after hesitating for the specified time will begin a new search through the list.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Searching in C1Combo

Incremental searching is always "on" for C1Combo controls, which search for an entry matching all characters entered, and perform the search incrementally as characters are typed. This behavior is almost identical to that of a C1List control with its MatchEntry property set to Extended except that the search argument is not cleared when the user presses Backspace or hesitates for a few seconds. If the ComboStyle property is set to DropdownCombomo or SimpleCombo, you can use the MatchEntryTimeout property to specify the timeout value. After the user hesitates for the specified amount of time, the combo text entry box will clear and the next characters entered will begin a new search.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Field Completion (C1Combo only)

The AutoCompletion property controls whether matching incremental search values are automatically copied to the text portion of a combo box during editing.

If True, when the user enters one or more characters that match a value in the combo box's list, the entire matching string is copied to the text portion of the control. The caret is positioned after the last character typed, and the remainder of the string is selected.

If False (the default), automatic completion does not occur, and the text portion of the control contains only the characters entered by the user.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Search Mismatch (C1Combo only)

The Mismatch event is triggered whenever the user enters a value in the text portion of a combo box that is not found in the list portion. By default, Reposition is False, which resets the current row back to the top of the list portion when the event is fired.

If you set Reposition to False, and the combo cannot locate NewEntry, the current row remains unchanged when this event is fired.

NOTE: This event is only fired when the LimitToList property is True and the ComboStyle property is set to DropdownCombo or SimpleCombo .

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Selection and Movement

The following sections describe how users can select columns, move selected columns and select rows. You can always restrict any or all of these operations at design time or in code.

Selecting Columns

Moving Columns

Moving Columns at Run-Time

Selecting Rows (C1List only)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Selecting Columns

If the AllowColSelect property is True, the user can select an individual column or a range of columns with the mouse. Nonadjacent column selections are not supported.

When the user points to the header of an unselected column, the mouse pointer changes to a down arrow to indicate that the column can be selected.

When the user clicks a column header, that column is selected and highlighted, and any columns or rows that were previously selected are deselected.

There are two ways for the user to select a range of columns:

1. After selecting the first column in the range by clicking its header, the user can select the last column in the range by holding down the Control or Shift key and clicking another column header. If necessary, the horizontal scroll bar can be used to bring additional columns into view.

2. Alternatively, the user can hold and drag the mouse pointer within the column headers to select multiple columns.

In order to manipulate the columns which have been selected at run-time, you will have to query the SelectedColumnCollection . This is a collection of all the C1DataColumn objects for the selected columns. For instance if you select columns 5 through 10, the SelectedColumnCollection will have six members, each a C1DataColumn object. This feature enables you to directly alter the display properties of the column. Using the Item property to access the C1DisplayColumn properties, the code to change the forecolor to red for the first column selected would be:

· Visual Basic

· C#

· Delphi

You can prevent a column selection from occurring at run time by setting the Cancel argument to True in the list's SelChange event.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Moving Columns

If the AllowColMove property is True, the user can move previously selected columns as a unit to a different location by pressing the mouse button within the header area of any selected column. The pointer will change to an arrow with a column header box on its tip, a small box at its lower right corner, and a position marker consisting of a red triangle will appear at the left edge of the column being pointed to and highlighted. The user specifies the desired location of the selected columns by dragging the column header, which changes positions as the mouse pointer crosses the columns.

The user completes the operation by releasing the mouse button, which moves the selected columns immediately to the right of the position marker. The moved columns remain selected.

If the user drags the marker to a position within the currently selected range, no movement occurs. Columns that are not selected cannot be moved interactively.

When a move occurs, the index in the Columns Collection is adjusted for all affected columns.

You can prevent interactive column movement from occurring at run time by setting the Cancel argument to True in the ColMove event.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Moving Columns at Run-Time

If the AllowColMove property is True, the user can move columns at run-time also. Since there is no order property for a C1DisplayColumn the C1DisplayColumnCollection needs to be manipulated to move a column at run-time. The C1DisplayColumnCollection holds all of the columns in a split. So to move a column, the user needs to remove the DisplayColumn from the collection, and then replace the column in the new position. The commonplace collection methods of RemoveAt and Insert help accomplish this quite easily. The code which would transpose the first two columns in the default split would look as follows:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Selecting Rows (C1List only)

If enabled, record selection behavior is determined by the SelectionMode property. By default, this property is set to 0ne, and the user can select one row with the mouse. When the user clicks a row, that row is selected and highlighted, and any rows or columns that were previously selected are deselected. The newly selected row also becomes the current row.

However, unlike column selections, nonadjacent row selections are supported. If the user holds down the Ctrl key while making the selection, the current row does not change, and any previously selected rows remain selected (when the SelectionMode property is set to MultiExtended). This technique also enables the user to select multiple rows, one at a time. Since selected rows do not have to be adjacent, the user can also operate the vertical scroll bar to bring other rows into view if desired.

The user can also select a range of contiguous rows by clicking the first row in the range, then holding down the Shift key and clicking the last row in the range. If necessary, the vertical scroll bar can be used to bring additional rows into view.

If SelectionMode is set to Extended, the default behavior is supported, but the user can also select records with the following key combinations: Shift + Up Arrow, Shift + Down Arrow, Shift + PgUp, and Shift + PgDn.

If SelectionMode is set to None, then no row selection is allowed from a user’s interaction, but you still can select rows from code.

If SelectionMode is set to One, multiple selection is disabled but single selection is permitted. When the user clicks an unselected row, the current selection is cleared and the clicked row is selected and highlighted. However, the Ctrl and Shift keys are ignored, and the user can only select one row at a time.

If SelectionMode is set to CheckBox, the user can select or unselect rows by clicking checkboxes.

Regardless of the value of SelectionMode, the user can deselect all rows by selecting columns.

You can prevent a row selection from occurring at run time by setting the Cancel argument to True in the list's SelChange event.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Sizing and Splitting

The following sections describe how users can resize rows, columns and splits. You can always restrict any or all of these operations at design time or in code.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Sizing Rows

If the AllowRowSizing property is set to either RowSizingEnum.AllRows or RowSizingEnum.IndividualRows, the user can change the row height at run time.

NOTE: This property only works when the SelectionMode property is set to CheckBox.

When the user points to a row divider between any pair of checkboxes, the pointer changes to a vertical double arrow, which the user can drag to resize the row.

Dragging the pointer upward makes the rows smaller; dragging it downward makes the rows larger. If the property is set to AllRows, then all rows in the list will be resized to the same height; it is not possible to resize individual rows. If the property is set to IndividualRows, then each row can be sized independently.

The ItemHeight property of the list will be adjusted when the user completes the resize operation.

You can prevent row resizing from occurring at run time by setting the Cancel argument to True in the RowResize event. You can always change the ItemHeight of the list in code, even if AllowRowSizing is RowSizingEnum.None or you cancel the RowResize event.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Sizing Columns

If the AllowSizing property is True for a column, then the user can adjust the width of the column individually at run time. When the user points to the divider at the right edge of a column's header, the pointer changes to a horizontal double arrow, which allows the user to resize the column in question.

Dragging the pointer to the left makes the column smaller; dragging it to the right makes the column larger. The column's Width property will be adjusted when the user completes the resize operation.

NOTE: Columns can only be resized using the mouse when the column headers are shown (the ColumnHeaders property is True).

If the user drags the pointer all the way to the left, the column retains its original Width property setting, but its Visible property is set to False. To make the column visible again, the user can point to the right side of the divider of the column that preceded it. The pointer turns into a vertical bar with a right arrow.

Dragging the pointer to the right establishes a new column width and sets the column's Visible property back to True.

Another way to resize columns is to use the AutoSize method, which allows you to specify auto-sizing for a specific Column object in code. When a column is auto-sized, its width is adjusted to fit the longest visible field in that column. Longer records that are not displayed in a visible row when AutoSize is invoked do not participate in the width calculations. Furthermore, if the specified column is either hidden or scrolled out of view, a trappable error occurs.

You can prevent column resizing from occurring at run time by setting the Cancel argument to True in the ColResize event. You can always change the width of a column in code, even if AllowSizing is False for that column.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Additional User Interaction Features

List for .NET provides additional data presentation and manipulation functionality that you can expose to your users at run time. For more information, please see the following topics:

Context-sensitive Help with CellTips

Scroll Tracking and ScrollTips

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Data Binding

Binding C1List or C1Combo to a Data Source

Unbound Columns

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Binding C1List or C1Combo to a Data Source

With an amazing ease of use, List for .NET can universally bind to any OLE DB data source. Requiring little or no code at all, the List control can create a fully-navigational database browser in mere seconds.

To associate a List control (C1List) or a Combo control (C1Combo) with an OLE DB data source, set the DataSource property of the list or combobox to the name of a DataSet on the same form. The DataSource property can be set both through code and through Visual Basic’s Property Window. This is all that is required to make List fully aware of the database or DataTable in your application.

Once such a link exists, List and the DataSet automatically notify and respond to all operations performed by the other, simplifying your application development.

For additional information and examples, see Tutorials.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Unbound Columns

Normally, List automatically displays data from bound database fields. However, you may need to augment the set of fields present in your layouts with columns derived from database fields, or columns which are unrelated (or only loosely related) to database information. For example, if your database contains a Balance field, you may instead want to display two columns, Credit and Debit, to show positive and negative numbers separately. Or, you may want to look up data in another database, or convert field data to some other form, such as mapping numeric codes to textual descriptions.

To accomplish such tasks you can use unbound columns. The term unbound column refers to a column that is part of a bound list, but is not tied directly to a database field.

Columns that do not have the DataField property set (that is, the DataField property is equal to an empty string), but do have the column Caption property set are considered unbound columns. The list will request data for these columns through the UnboundColumnFetch event.

Columns with their DataField property set will be bound if the DataField property is the same as one of the fields of the Data Source.

Columns with their DataField property set to a value that is not in the DataSet are ignored for the purposes of fetching data. Similarly, columns that have no value for both the DataField and Caption properties set are also ignored.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Creating unbound columns

The first step in using an unbound column is creating the column itself. This may be done at design time by adding a column through the C1List Designer. At run time, unbound columns may be added using the Insert method of the C1DataColumnCollection. The column must be given a name by setting its Caption property. At design time, this is done using the C1List Designer. At run time, the Caption property of the appropriate C1DataColumn object is set. C1DataColumn objects that are added to the C1DataColumnCollection cause a corresponding C1DisplayColumn to be added to the C1DisplayColumnCollection for all splits. The default visible property of the newly added C1DisplayColumn will be True.

NOTE: If you attempt to insert an unbound column in code, you may need to use the HoldFields method to ensure that the column appears at the desired position within the list:

· Visual Basic

· C#

· Delphi

When the list needs to display the value of an unbound column, it fires the UnboundColumnFetch event. This event supplies the user with a row and column index as the means of identifying the list cell being requested. The Value argument to the event is of type Object, which by default is Null, but can be changed to any desired value, and will be used to fill the contents of the cell specified by the given bookmark and column index.

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Implementing multiple unbound columns

So far, our examples have demonstrated the UnboundColumnFetch event using only a single unbound column. Suppose you want to have more than one? Since the UnboundColumnFetch event is fired for each unbound column of each row, only one column value may be set at a time, and each column must be identified for the value to be properly determined. The second UnboundColumnFetch argument, Col , is used to identify the column of the list for which the value is required.

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddItem Mode

When in AddItem mode, List allows you to populate a list or combo box control (C1List or C1Combo) manually by using the AddItem, RemoveItem, InsertItem and ClearItems methods. In this mode, your application determines what data is contained within the list control.

To use AddItem mode, set the DataMode property of the control to AddItem at design-time, then use the AddItem method to populate the control.

The AddItem method allows you to populate individual rows within the list. The following code adds the names and street addresses to the list control.

· Visual Basic

· C#

· Delphi

Note: The default AddItem separator is “;”.You can choose a custom separator by setting the AddItemSeparator property at design-time or from code.

The RemoveItem method allows you to remove rows from the list. The code below allows you to remove the selected row from the list control.

· Visual Basic

· C#

· Delphi

The ClearItems method removes all items from the list population. The code below removes the entire population from the list control.

· Visual Basic

· C#

· Delphi

The InsertItem method will insert an item to a specified position. The code below will insert a second row.

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


When to Use AddItem Mode

If you do not want to use a bound data source control to populate the list, but instead want to modify the list manually, use AddItem Mode.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


How AddItem Mode Works

When List runs in AddItem mode, it is not connected to a data control. Instead, your application must supply and maintain the data, while the list handles all user interaction and data display. In this mode, the functionality of the C1List control is similar in most ways to the standard listbox control.

When populating the list control, the first item starts at zero. Any event that uses a bookmark will use the zero-based index of the control.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Customizing the List`s Appearance

Customizing the List’s Appearance

This chapter explains how to configure the non-interactive elements of List's display, such as captions, headers, footers, record selectors and dividing lines.

Captions, Headers, and Footers

Three-dimensional versus Flat Display

Borders and Dividing Lines

Customizing the Scrollbars

Unpopulated Regions

Row Height and Word Wrap

Alternating Row Colors

Horizontal and Vertical Alignment

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Captions, Headers, and Footers

You can affix a title to a list, column or split by setting the Caption property of the appropriate object.

· Visual Basic

· C#

· Delphi

Column and list captions

Column footers

Multiple-line headers and footers

Split captions

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Column and list captions

For C1DataColumn objects, the Caption property specifies the text that appears in each column's header area.

If you are using List bound to a DataSet, the column captions are set automatically at run time.

You can also set column captions at design time using the C1List Designer or at run time by manipulating the C1DataColumnCollection in code.

The Caption property also applies to the C1List control itself, which lets you provide a descriptive header for the entire list.

By default, List displays headings for each column, even if you never set the Caption property of an individual column explicitly. However, you can hide all column headings by setting the ColumnHeaders property to False.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Column footers

Just as the ColumnHeaders property controls the display of column captions, the ColumnFooters property controls the display of the column footer row. Column footers, which are similar in appearance to column headers, are always displayed at the bottom of the list, even if it is underpopulated.

For each C1DataColumn object, the FooterText property determines the text that is displayed within the footer row. You can set the footer text at design time using the C1List Designer or at run time by manipulating the C1DataColumnCollection collection in code, as in the following example:

· Visual Basic

· C#

· Delphi

Unlike the Caption property, the FooterText property is not set automatically from a bound data source, so you will have to set it yourself.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Multiple-line headers and footers

The split specific property ColumnCaptionHeight property controls the height of the column headers. By default, it is based upon the font setting of the HeadingStyle property. If you need to display more than one line of text in a column header, you can increase the ColumnCaptionHeight property to accommodate additional lines, as in the following example:

· Visual Basic

· C#

· Delphi

Note the use of the Visual Basic constant vbCr to specify a line break within the caption text. After this code executes, the first column's caption will contain two lines of text and the second column's caption will be centered vertically.

Similarly, you can set the ColumnFooterHeight property to control the height of column footers and use the vbCr constant to specify a line break when setting the FooterText property of a column.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split captions

Split objects can also have their own captions. For a list with one split, a split caption can serve as a second list caption.

However, split captions are best used in lists with at least two splits, as they are ideal for categorizing groups of columns for end users.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Three-dimensional versus Flat Display

List for .NET supports a standard, "flat" control appearance, the more attractive three-dimensional appearance used by many controls, and a third that combines the flat appearance with the 3D. By default, the list's FlatStyle property is set to FlatModeEnum.Standard so that the 3-D look is used. However, this property only controls whether 3-D effects are used to draw the list's border, caption bars, column headings and footings, and the record selector column. It does not affect the list's data cells or row and column dividers.

When FlatStyle is set to FlatModeEnum.Standard, the list looks like this:

When FlatStyle is set to FlatModeEnum.PopUp, the list looks like this:

The initial list has the same appearance as when FlatStyle is set to FlatModeEnum.Flat (see below). As the mouse moves over any control element, the appearance of that element takes on a 3D look.

When FlatStyle is set to FlatModeEnum.Flat, the list looks like this:

To achieve a 3-D appearance for the entire list, including its interior, set the following properties at either design time or run time:

· In the Visual Basic properties window, set the RowDivider style property to Inset. Or, in code:

· Visual Basic

· C#

· Delphi

· In the Splits Collection Editor, set the Style property to LineStyleEnum.Inset for all ColumnDivider style objects for each split. Or, in code:

· Visual Basic

· C#

· Delphi

· In the Visual Basic properties window, set the BackColor property to gray. Or, in code:

· Visual Basic

· C#

· Delphi

The list will look something like this:

Note that changing the Style property of the RowDivider object to Inset consumes an extra vertical pixel in each data row, resulting in fewer visible rows.

You can experiment to achieve different 3-D effects using other color combinations and divider styles, as explained in the Borders and Dividing Lines section.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Borders and Dividing Lines

The RowDivider and ColumnDivider properties enable you to choose different horizontal and vertical lines and set their colors. They return an underlying GridLines object which has two properties. These two properties, Style and Color define how the list’s cell borders will look. The allowable values for the Style property are as follows:

LineStyleEnum.None

LineStyleEnum.Single

LineStyleEnum.Double

LineStyleEnum.Raised

LineStyleEnum.Inset

For example, setting the style property of RowDivider to LineStyleEnum.None eliminates the dividing lines between rows and enables you to cram a bit more data into the available area.

For ColumnDivider properties, you can set the Style property to LineStyleEnum.None and the HeaderDivider property to False. This enables you to visually group related columns, as shown in the following figure.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Customizing the Scrollbars

In some applications, you may want to change the thickness of the scroll bars on the list control. By setting the HScrollBar and VScrollBar properties, you can modify the thickness of each scroll bar individually in code.

As in the following code, you can change the HScrollBar and VScrollBar property values, to create most any scroll bar thickness variation.

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Unpopulated Regions

Depending upon the number of rows and columns in the data source, a portion of the list's interior may not contain data cells. However, you can eliminate these "dead zones" using the ExtendRightColumn and EmptyRows properties. Change the color of the dead areas by using the DeadAreaBackColor property.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


The rightmost column

As the list scrolls horizontally until the last column is totally visible, there is usually a blank area between the last column and the right border of the list.

The color of this blank area depends on the setting of the DeadAreaBackColor property. You can eliminate this blank area with the ExtendRightColumn property. The default value of this property is False, but if you set it to True, then the last column will extend its width to the right edge of the list.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Unused data rows

If the data source contains fewer rows than the list can display, the list will display empty rows below the last usable data row.

The color of this blank area depends on the setting of the DeadAreaBackColor property. You can eliminate this blank area with the EmptyRows property. The default value of this property is False, but if you set it to True, then the list will display empty rows below the last usable data row.

Note that the empty rows cannot receive focus.

You can set both the EmptyRows and ExtendRightColumn properties to True to ensure that no blank areas appear within the interior of the list.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Row Height and Word Wrap

Adjusting the height of all list rows

Enabling wordwrap in cells

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Adjusting the height of all list rows

You can configure the row height interactively at design time by placing the list in its visual editing mode or by changing the list's ItemHeight property in Visual Basic’s properties window. At run time, the user can adjust the row height interactively if AllowRowSizing is set to RowSizingEnum.AllRows or RowSizingEnum.IndividualRows. For more information, see Run Time Interaction.

The ItemHeight property is expressed in units of the container's coordinate system. However, a setting of 0 causes the list to readjust its display so that each row occupies a single line of text in the current font. Therefore, you can use the following code to adjust the row height to display exactly three lines of text:

· Visual Basic

· C#

· Delphi

This technique is particularly effective when displaying multiple-line memo fields, as in this example.

Note that the Description column’s Style object must have its WrapText property set to True; otherwise, the memo field display will be truncated after the first line.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Enabling wordwrap in cells

By default, a list cell displays a single line of text, truncated at the cell's right boundary. You can display multiple lines of text in a cell by increasing the list's ItemHeight property and setting the WrapText property of the desired column’s Style object to True. If WrapText is True (the default is False), a line break occurs before words that would otherwise be partially displayed in a cell. The cell contents will continue to display on the next line, assuming that the list's row height accommodates multiple lines.

You can use the following loop to enable wordwrap for all list columns:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Alternating Row Colors

You can often improve the readability of the display by alternating the background colors of adjacent rows. When you set the AlternatingRows property to True, the list displays odd-numbered rows (the first displayed row is 1) using the built-in style OddRow, and even-numbered rows using the built-in style EvenRow.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Horizontal and Vertical Alignment

Use the HorizontalAlignment property of the Column’s Style object to control the horizontal placement of cell text within a column. The allowable values for this property are as follows:

AlignHorzEnum.General

AlignHorzEnum.Near

AlignHorzEnum.Center

AlignHorzEnum.Far

AlignHorzEnum.Justify

The setting General, which is the default for data cells, indicates that the alignment should be based upon the underlying data type. For example, strings are left-aligned, while numbers are right-aligned.

Use the VerticalAlignment member of the Style object to control the vertical placement of text within the cells of a list, split, or column. The allowable values for this property are as follows:

AlignVertEnum.Top

AlignVertEnum.Center

AlignVertEnum.Bottom

For data cells, the default value is Top. For static list elements such as caption bars, column headers and column footers, the default value is Center. See the section Named style defaults to learn how the default values are derived.

The following list depicts all possible combinations of the HorizontalAlignment and VerticalAlignment properties (the general setting is omitted because it is ultimately rendered as left, right, or center).

The HorizontalAlignment and VerticalAlignment properties are tightly integrated with the concept of styles. For more information, see How to Use Styles.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Data Presentation Techniques

This chapter explains how to display cell data in a variety of textual and graphical formats.

Text Formatting

Automatic Data Translation with ValueItems

Context-sensitive Help with CellTips

Scroll Tracking and ScrollTips

Multiple Line Data Display

Owner-drawn Cells

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Text Formatting

In many cases, the raw numeric data that List for .NET receives from its data source is not suitable for end-user display. For example, date fields may need to be converted to a specific international format; currency fields may contain too many insignificant digits after the decimal point. Therefore, List for .NET provides a method with which you can alter the format of numerical fields, the NumberFormat property.

In addition, for situations where universal formatting of the database information is inadequate, List provides an event, FormatText, that enables your application to override the default formatting on a per-column basis. By writing a simple handler for this event, you can customize the display of your column data in a myriad of ways.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Numeric field formatting

List supports a variety of data formatting options through the C1DataColumn object's NumberFormat property. NumberFormat reconfigures the data format that is handed to the list from the database. It can alter most types of numeric values for a particular column. For example, to display all date values within a column according to the form 26-Apr-01, you would use the Medium Date setting:

· Visual Basic

· C#

· Delphi

Note that if you change the NumberFormat property of a column at run time, you do not need to refresh the display, as List handles this automatically.

For numeric data, the following predefined options are available:

Standard | Display number with thousands separator, at least one digit to the left and two digits to the right of the decimal separator.
General Number | Display number as is, with no thousand separators.
Currency | Display number with thousand separator, if appropriate; display two digits to the right of the decimal separator. Note that output is based on system local settings.
Percent | Display number multiplied by 100 with a percent sign (%) appended to the right; always display two digits to the right of the decimal separator.
Fixed | Display at least one digit to the left and two digits to the right of the decimal separator.
Scientific | Use standard scientific notation.
Yes/No | Display No if number is 0; otherwise, display Yes.
True/False | Display False if number is 0; otherwise, display True.
On/Off | Display Off if number is 0; otherwise, display On.
0% | Display number multiplied by 100, then rounded to the nearest integer, with a percent sign (%) appended to the right.
0.00% | Same as Percent.

For date and time data, the following predefined options are available:

General Date | Display a date and/or time. For real numbers, display a date and time (for example, 4/3/93 05:34 PM); if there is no fractional part, display only a date (for example, 4/3/93); if there is no integer part, display only a time (for example, 05:34 PM). Date display is determined by your system settings.
Long Date | Display a date using your system's long date format.
Medium Date | Display a date using the medium date format appropriate for the language version of Visual Basic.
Short Date | Display a date using your system's short date format.
Long Time | Display a time using your system's long time format: includes hours, minutes, seconds.
Medium Time | Display a time in 12-hour format using hours and minutes and the AM/PM designator.
Short Time | Display a time using the 24-hour format (for example, 17:45).
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Formatting with a custom event handler

On occasion, you may find that your current formatting options do not suit your particular needs. Furthermore, you may be restricted in the type of formatting that you can use, or you may need a custom formatting option. In these cases, the FormatText Event option can be specified for the NumberFormat property. Choosing this option for a column will cause the FormatText event to fire each time data is about to be displayed in that column. The event allows you to reformat, translate, indent or do anything you want to the data just prior to display:

· Visual Basic

· C#

· Delphi

ColIndex, a member of the FormatTextEventArgs object, is the column number of the list to be reformatted. The Value member contains the current value of the data and serves as a placeholder for the formatted display value. For example, suppose the first column contains numeric values from 1 to 30, and you wish to display the data as Roman numerals:

· Visual Basic

· C#

· Delphi

Since the FormatText event has fewer restrictions than other formatting techniques, you can always use it to gain full control over the textual content of any value displayed in the list.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Automatic Data Translation with ValueItems

Although you can use the FormatText event to map data values into more descriptive display values, List for .NET also provides a mechanism for performing such data translations automatically without code. With the ValueItemCollection collection object, you can specify alternate text or even pictures to be displayed in place of the underlying data values.

This feature is ideally suited for displaying numeric codes or cryptic abbreviations in a form that makes sense to end users. For example, country codes can be rendered as proper names or even as pictures of their respective flags. The numbers 0, 1, and 2 may be displayed as Yes, No, and Maybe. Note that either the actual values (0, 1, 2) or the translated values (Yes, No, Maybe) may be displayed as radio buttons in a cell or in a drop-down combo box.

What are ValueItems?

Specifying text-to-text translations

Specifying text-to-picture translations

Displaying both text and pictures in a cell

Displaying Boolean values as check boxes

Displaying allowable values as radio buttons

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


What are ValueItems?

The ValueItemCollection object contains a collection and properties which define the association between an underlying data value and its visual representation within the list. The ValueItemCollection contains a collection of zero or more ValueItem objects. Each ValueItem supports two main properties: Value, the underlying data value, and DisplayValue, its visual representation. Both properties are of type Object.

Each C1DataColumn object owns one ValueItemCollection object, which is initially empty.

At run time, you can manipulate the collection of ValueItem pairs as you would any other List or Visual Basic collection. ValueItems can be added, removed or manipulated through the ValueItemCollection object.

At design time, a ValueItem Collection Editor is available through .NET’s C1DataColumnCollection editor. For more information, see Using the ValueItem Collection Editor.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Specifying text-to-text translations

Consider the following example in which the Country field is represented by a short character code.

To display the character codes as proper names, you can use the column's ValueItemCollection object to specify automatic data translations. At design time, this is done with .NET’s ValueItemCollection editor.

Altering the ValueItemCollection object through the collection editor enables you to specify data translations on a per-column basis in a simple window. To construct a list of data translations for an individual column, do the following:

1. Open up the C1List Designer by clicking on the ellipsis next to the Columns collection in the Visual Basic properties window.

2. Select the column whose contents you would like translated in the left pane. In the right pane expand the ValueItems Node. Click the ellipsis next to the Values Node to bring up the ValueItem Collection Editor.

3. Click the Add button in the left pane to add ValueItem objects. In the right pane specify a Value and DisplayValue for each ValueItem. When entering the ValueItem text disregard the ellipsis. This is used for entering a bitmap as a DisplayValue.

4. After the ValueItem objects are configured correctly, select OK and return to the C1DataColumnCollection editor. In the right pane under the ValueItems node, set the Translate property to true.

5. Select OK or Apply to commit the changes.

When the program is run, Country field values that match an item in the Value column appear as the corresponding DisplayValue entry. For example, CAN becomes Canada, UK becomes United Kingdom, and so forth.

Note that the underlying database is not affected; only the presentation of the data value is different. The same effect can be achieved in code as follows:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Specifying text-to-picture translations

The same techniques used to specify text-to-text translations can also be used for text-to-picture translations. Within the ValueItems Collection Editor, instead of typing a string into the DisplayValue column, you can use the ellipsis button to select a bitmap to be used for data translations. To delete your bitmap selection, simply delete the text in the DisplayValue property box and either select another bitmap or type in text.

Note that the Translate property for the ValueItems object must be set to true. Depending upon the height of the bitmaps, you may need to increase the value of the ItemHeight property in the Visual Basic Properties window. If you do so, you may also want to change the VerticalAlignment member of the list's Style property to Center. This ensures that the bitmaps (as well as textual data in other columns) are centered vertically within list cells instead of being anchored at the top.

When the program is run, Country field values that match an item in the Value column appear as the corresponding DisplayValue picture.

As with textual translations, the underlying database is not affected; only the presentation of the data value is different. The same effect can be achieved in code as follows:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Displaying both text and pictures in a cell

Once you have configured the ValueItemCollection object to perform text-to-picture translations for a column, you can cause both the Value string and the DisplayValue bitmap to appear within the same cell by selecting the AnnotatePicture property under the ValueItems node in the C1DataColumnCollection Editor. Or, in code:

· Visual Basic

· C#

· Delphi

The horizontal placement of the bitmap with respect to the cell text is determined by the HorizontalAlignment and ForegroundPicturePosition properties of the column's Style object. The enumeration objects for these two properties are the AlignHorzEnum and ForegroundPicturePositionEnum objects respectively. In the following example, HorizontalAlignment is set to AlignHorzEnum.General. Since the Country column represents a string field, the cell text is left-aligned. However, since the ForegroundPicturePosition property is set to the default value of ForegroundPicturePosition.Near, the bitmap is placed at the left edge of the cell, and the cell text is left-aligned in the remaining space.

However, if you change the ForegroundPicturePosition property to ForegroundPicturePositionEnum.Far, then the cell text is left-aligned as usual, but the bitmap is right-aligned.

To place the cell text below the bitmap while centering both items, set the HorizontalAlignment property to AlignHorzEnum.Center and the ForegroundPicturePosition property to ForegroundPicturePositionEnum.Top of Text.

NOTE: For an illustration of all possible combinations of the HorizontalAlignment and ForegroundPicturePosition properties, see Displaying foreground pictures.

When editing, the editor uses all space available in the text portion of the cell. When the Presentation property of the ValueItemCollection object is set to one of the combo box options, the bitmap will not change until editing is completed.

Note that in the preceding examples, the text is displayed as it is stored in the database without formatting. But what if you want to display both a picture and formatted text? Since the ValueItem object can only accommodate one translation, you cannot accomplish this with ValueItems alone. However, you can use the FormatText event to translate the text, then use the ValueItemCollection object to associate the translated text (not the underlying data value) with a picture:

· Visual Basic

· C#

· Delphi

In this example, the NumberFormat property is set to a special value that causes the FormatText event to fire:

· Visual Basic

· C#

· Delphi

Since the FormatText event now translates the country codes stored in the database into actual names for display, the Value property of each ValueItem in the ValueItemCollection object must be changed accordingly.

Assuming that the HorizontalAlignment and ForegroundPicturePosition properties are set as in the previous example, the end result is that the underlying data is displayed as both descriptive text and a picture.

NOTE: DisplayValue pictures are ideally suited for translating status codes or other fields where the number of allowable values is relatively small. If you need a more generalized picture display mechanism than the ValueItemCollection object offers, you can use the ForegroundPicturePosition property in conjunction with the FetchCellStyle event to display arbitrary pictures on a per-cell basis. For more information, see Displaying foreground pictures.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Displaying Boolean values as check boxes

You can also use the ValueItemCollection object to represent Boolean values as in-cell check boxes. You can achieve the effect of a working Boolean checkbox without defining any ValueItem objects—just set the Presentation property to PresentationEnum.CheckBox.

Note that you do not need to select the Translate check box to enable automatic data translation. The following figure shows a typical check box display.

NOTE: If you want to use different check box bitmaps, you can still define a two-state collection of ValueItem objects through the Values property of the C1DataColumn. Set the Presentation property to PresentationEnum.Normal, and set the Translate property to True.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Displaying allowable values as radio buttons

If the number of allowable values for a column is relatively small, you may want to consider a radio button presentation. At design time, go to the C1List Designer, then to the ValueItems node for the column and set the Presentation property to PresentationEnum.RadioButton. Or, in code:

· Visual Basic

· C#

· Delphi

If necessary, adjust the Width property of the column style and the ItemHeight property of the list to accommodate all of the items.

For a given cell, if the underlying data does not match any of the available values, none of the radio buttons will be selected for that cell. However, you can provide a default ValueItem object that will be selected instead.

In this example, the last ValueItem has an empty Value property, but the DisplayValue is set to “Other”. This means that when Country fields that do not match any of the items are displayed, their value in the list will be displayed as Other.

· Visual Basic

· C#

· Delphi

In this example, 5 is the zero-based index of the default item.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Context-sensitive Help with CellTips

In many Windows applications, when the user points to a toolbar button and leaves the mouse at rest for a short time, a ToolTip window appears with the name of the associated command. You can provide similar context-sensitive help for your users with the CellTips property of List for .NET.

The CellTips property determines whether the list displays a pop-up text window when the cursor is idle. By default, this property is set to CellTipsEnum.NoCellTips, and cell tips are not displayed.

The setting CellTipsEnum.Anchored aligns the cell tip window with either the left or right edge of the cell. The left edge is favored, but the right edge will be used if necessary in order to display as much text as possible.

The setting CellTipsEnum.Floating displays the cell tip window below the cursor, if possible.

If you do not provide a handler for the FetchCellTips event, and the cursor is over a list cell, the default behavior is to display a text box containing the cell's contents (up to 256 characters). This enables the user to peruse the contents of a cell even if it is not big enough to be displayed in its entirety. You can also program the FetchCellTips event to override the default cell text display in order to provide users with context-sensitive help.

A common application of the FetchCellTips event is to display the contents of an invisible column that provides additional information about the row being pointed to, as in the following example:

· Visual Basic

· C#

· Delphi

You can use the CellTipsDelay property to control the amount of time that must elapse before the cell tip window is displayed.

You can use the CellTipsWidth property to control the width of the cell tip window.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Scroll Tracking and ScrollTips

If the ScrollTrack property is set to True, moving the scrollbar thumb causes vertical scrolling of the list's display. By default, this property is False, and no scrolling occurs until the thumb is released.

If the ScrollTips property is set to True, moving the scrollbar thumb causes the FetchScrollTips event to fire. You can use this event to track the position of the scroll bar on a record by record basis. You can also use this event to present the user with useful information relating to the current record or recordset. When used in tandem, the ScrollTrack and ScrollTips properties provide users with visual feedback when scrolling through large DataSets.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Multiple Line Data Display

Normally, a record is displayed in a single row in the list. If the list is not wide enough to display all of the columns in the record, a horizontal scroll bar automatically appears to enable users to scroll columns in and out of view. For discussion purposes, we shall distinguish between the following:

· A line in a list is a single physical row of cells displayed in the list. Do not confuse this with a line of text inside a list cell; depending upon the settings of the ItemHeight and WrapText properties, data in a list cell may be displayed in multiple lines of text.

· A row in a list is used to display a single record. A row may contain multiple lines or multiple physical rows.

Setting the DataView property of the list to MultipleLines will display every field of data in the dataset in the available list area. Ultimately, if your dataset contains more fields than can fit in the list area, then a single record will span multiple lines. This feature enables the end user to view simultaneously all of the columns (fields) of a record within the width of the list without scrolling horizontally, as in the following figure:

If the resulting column layout is not to your liking, you can adjust it at either design time or run time by changing the widths and orders of the columns. When changing the width of a column, the list will only increase the size of the column at the expense of the other columns in the line. Unlike previous versions of the list, the columns won’t wrap to another line if a column is resized.

To change the order of the columns while in Multiple Line view, click and drag the column header to the new position. A red arrow should indicate where you are about to place the column. After you have dropped the column, the list will reposition the columns accordingly.

NOTE: At design time, if the HScrollBar and VScrollBar style property is set to ScrollBarStyleEnum.Automatic, and the DataView property is set to MultipleLines, a vertical scroll bar appears even though no data is displayed. This is done so that you can take the width of the scroll bar into account when adjusting columns at design time.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Implications of multiple-line mode

Existing row-related properties, methods and events fit well with the earlier definitions of records, rows and lines (with two exceptions to be described later). For example:

· The VisibleRows property returns the number of visible rows or records displayed on the list—not the number of visible lines. If a row spans 2 lines, and the VisibleRows property is 5, then there are 10 visible lines displayed on the list.

· The RowTop method accepts a row number argument ranging from 0 to VisibleRows - 1. If a row spans 2 lines, then RowTop(2) returns the position of the top of the third displayed row (that is, the fifth displayed line).

· The RowResize event will be fired whenever a row is resized by the user at run time. In fact, at the record selector column, only row divider boundaries are displayed; thus, the user can only resize rows, not lines.

Other row-related properties, methods and events can be interpreted similarly. There are two exceptions:

1. The first is the ItemHeight property. The ItemHeight property returns the height of a cell or a line, not the height of a row. Changing this property would break users' existing code, so we decided to keep this property the same.

2. The second is more of a limitation than an exception. Currently the dividers between rows and lines are the same. When you change the RowDivider object’s Style property, all dividers between rows and lines change to the same style. That is, you cannot have different dividers for rows and for lines.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Owner-drawn Cells

For cases where you need to perform complex per-cell customizations, you can draw directly to the list's device context by writing a handler for the OwnerDrawCell event. This event is fired as needed to display the contents of cells that have their OwnerDraw property set to True.

To implement the example depicted here, bind C1List1 to a datasource. For more information, see Binding C1List or C1Combo to a Data Source.

Add the following handler for the Form_Load:Visual Basic events:

· Visual Basic

· C#

· Delphi

The Form_Load event fills the list and creates the first column for use in the OwnerDrawCell event.

Finally, implement the OwnerDrawCell event as follows:

· Visual Basic

· C#

· Delphi

NOTE: If you set the e.Handled argument to True, the list will not fill in the cell's background, nor will it display cell text or graphics. Therefore, you are responsible for filling in the entire cell, even if there is no data to display.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


How to Use Splits

In List for .NET, a split is similar to the split window features of products such as Microsoft Excel and Word. You can use splits to present your data in multiple horizontal or vertical panes. These panes, or splits, can display data in different colors and fonts. They can scroll as a unit or individually, and they can display different sets of columns or the same set. You can also use splits to prevent one or more columns or a set of rows from scrolling. Unlike other list products, fixed (nonscrolling) columns or rows in List for .NET do not have to be at the left edge of the list, but can be at the right edge or anywhere in the middle. You can even have multiple groups of fixed columns or rows within a list. Splits open up an endless variety of possibilities for presenting data to users of your applications.

Whenever you use List for .NET, you are always using a split. A list always contains at least one horizontal split, and the default values for the split properties are set so that you can ignore splits until you want to use them. Therefore, you can skip this chapter if you do not need to create and manipulate more than one split within a list.

You create and manipulate splits by working with Split objects and the SplitCollection object. Since an individual column can be visible in one split but hidden in another, each Split object maintains its own collection of columns, known as C1DisplayColumnCollection. This gives you complete control over the appearance of each split and the columns they contain.

Referencing Splits and their Properties

Split Matrix Notation

Creating and Removing Splits

Working with Columns in Splits

Sizing and Scaling Splits

Creating and Resizing Splits through User Interaction

Vertical Scrolling and Split Groups

Horizontal Scrolling and Fixed Columns

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Referencing Splits and their Properties

A C1List object initially contains a single horizontal split. If additional splits are created, you can determine or set the current split (that is, the split that has received focus) using the list's Split property:

· Visual Basic

· C#

· Delphi

Each split in a list is a different view of the same data source, and behaves just like an independent list. If you create additional splits without customizing any of the split properties, all splits will be identical and each will behave very much like the original list with one split.

Note that some properties are supported by both the C1List and Split objects. Three rules of thumb apply to properties that are common to a list and its splits:

1. When you set or get the property of a Split object, you are accessing a specific split, and other splits in the same list are not affected.

2. When you get the property of a C1List object, you are accessing the same property within the current split.

3. When you set the property of a C1List object, you are setting the same property within all splits.

To understand how these rules work in code, consider a list with two horizontal splits, and assume that the current split index is 1.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split properties common to C1List

The following properties, which are supported by both Split and C1List objects, adhere to the rules described in the preceding section:

AllowColMove | Enables interactive column movement.
AllowColSelect | Enables interactive column selection.
AllowRowSizing | Enables interactive row resizing.
CaptionStyle | Controls the caption style for a split.
Caption | Returns or sets the caption to the list.
CaptionHeight | Sets the height of the list’s caption area.
CaptionStyle | Sets or returns the Style object that controls the appearance of the caption area.
ColumnCaptionHeight | Sets the height of the column captions.
ColumnFooterHeight | Sets the height of the footer captions.
EvenRowStyle | Sets or returns the Style object that controls the appearance of an even-numbered row.
ExtendRightColumn | Sets/returns extended right column for a split.
FetchRowStyles | Controls whether the FetchRowStyle event will be fired.
TopIndex | Bookmark of row occupying first display line.
FooterStyle | Returns the Style object that controls the appearance of column footers.
HeadingStyle | Returns the HeadingStyle Style object.
HighLightRowStyle | Returns the HighlightRowStyle Style object.
HscrollBar | Returns the HBar object that controls the appearance of the horizontal scrollbar.
LeftCol | Returns the leftmost visible column.
OddRowStyle | Returns the OddRowStyle Style object.
SelectedStyle | Returns the SelectedStyle Style object.
SpringMode | Specifies whether the columns will resize when the list is resized.
Style | Returns or sets the Style object.
VScrollBar | Sets or returns the VBar object that controls the appearance of the vertical scrollbar.

NOTE: The Caption property is not included in this list, even though it is supported by both objects. Since lists and splits maintain separate caption bars, setting the Caption property of the list does not apply the same string to each split caption.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split-only properties not supported by List

The following properties are supported by Split objects but not by C1List. Therefore, to apply a value to the entire list, you need to explicitly set the value for each split individually.

AllowFocus | Allows cells within a split to receive focus.
AllowHorizontalSizing | Specifies if a user is allowed to resize horizontal splits.
AllowVerticalSizing | Enables interactive resizing for a split.
AlternatingRowStyle | Determines if a grid or split displays odd-numbered rows in one style and even-numbered rows in another.
DisplayColumns | Returns a collection of C1DisplayColumn objects.
HorizontalScrollGroup | Controls the HorizontalScrollBar.
InactiveStyle | Returns the InactiveStyle Style object.
SplitSize | Sets/returns split width according to SizeMode.
SplitSizeMode | Controls whether a split is scalable or fixed size.
VerticalScrollGroup | Controls the Vertical Scroll Bar.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Matrix Notation

When the list contains both horizontal and vertical splits, it is said to be organized in a two-dimensional split matrix. Reference and access to the properties of the split objects in the matrix is accomplished with a two-dimensional matrix notation. The index for a particular split in a split matrix is the split row, then the column delimited by a comma. For instance, accessing the second vertical split (column) in the third horizontal split (row) would look like the following:

· Visual Basic

· C#

· Delphi

Note: Notice that the Item property is used in the previous example. When accessing a split through split matrix notation, the item property must be explicitly specified. When accessing a split in a list with a one-dimensional structure, the Item property is taken as implicit and can be omitted. For instance, accessing the second split in a list with only horizontal splits would look like the following:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Creating and Removing Splits

At run time, you must create and remove splits using the RemoveHorizontalSplit, InsertHorizontalSplit, RemoveVerticalSplit, and InsertVerticalSplit methods. Each method takes a zero-based split index:

· Visual Basic

· C#

· Delphi

You can determine the number of splits in a list using the SplitCollection Count property:

· Visual Basic

· C#

· Delphi

You can iterate through all splits using the Count property, for example:

· Visual Basic

· C#

· Delphi

Of course, a more efficient way to code this would be to use a For Each...Next loop:

· Visual Basic

· C#

· Delphi

The new Split object will inherit all of its properties from the last object in the collection.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Working with Columns in Splits

Each split in a List for .NET control maintains its own collection of columns. The C1DisplayColumnCollection object provides access to both split-specific display properties for columns inside a split. The split-specific properties of the C1DisplayColumnCollection allow for tremendous flexibility in controlling the look and behavior of individual splits. The list is connected to a single data source, so the splits just present different views of the same data. Therefore, the C1DisplayColumnCollection in each split contains the same number of columns and the columns are bound to the same data fields.

However, the values of other C1DisplayColumn object properties, such as Visible, may vary from split to split. These properties are said to be split-specific. For example, a column created at run time is not visible by default. Thus, the LastName column created in the preceding example is invisible in all splits. The following code makes it visible in the second split:

· Visual Basic

· C#

· Delphi

Since Visible is a split-specific property, the LastName column remains invisible in other splits.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Sizing and Scaling Splits

List for .NET gives you full control over the size and scaling of individual splits. You can configure a split to occupy an exact width or height, hold a fixed number of columns or rows, or adjust its size proportionally in relation to other splits. If you are just starting out with List, you can use splits in a variety of ways without having to master all of the details.

At run time, the actual size of a Split object depends upon its SplitSize and SplitSizeMode properties. The SplitSizeMode property specifies the unit of measurement; the SplitSize property specifies the number of units. List supports three different sizing modes for splits, as determined by the setting of the SplitSizeMode property:

SizeModeEnum.Scalable | denotes relative width in relation to other splits
SizeModeEnum.Exact | specifies a fixed width in container coordinates
SizeModeEnum.NumberofColumns | specifies a fixed number of columns

A scalable split uses the value of its SplitSize property to determine the percentage of space the split will occupy. For any scalable split, the percentage is determined by dividing its SplitSize value by the sum of the SplitSize values of all other scalable splits. Thus, you can consider the SplitSize property of a scalable split to be the numerator of a fraction, the denominator of which is the sum of the scalable split sizes. Scalable splits compete for the space remaining after nonscalable splits have been allocated. By default, all splits are scalable, so they compete for the entire list display region. SplitSizeMode is always Scalable when a list contains only one split.

An exact split uses the value of its SplitSize property as its fixed width in container coordinates. Exact splits will be truncated if they will not fit within the horizontal list boundaries. This mode is not applicable when a list contains only one split.

A fixed-column split uses the SplitSize property to indicate the exact number of columns that should always be displayed within the split. These splits automatically reconfigure the entire list if the size of the displayed columns changes (either by code or user interaction), or if columns in the split are scrolled horizontally so that the widths of the displayed columns are different. This mode is primarily used to create fixed columns that do not scroll horizontally. However, it can be used for a variety of other purposes as well. This mode is not applicable when a list contains only one split.

Note that when there is only one split (the list's default behavior), the split spans the entire width of the list, the SplitSizeMode property is always Scalable, and the SplitSize property is always 1. Setting either of these properties has no effect when there is only one split. If there are multiple splits, and you then remove all but one, the SplitSizeMode and SplitSize properties of the remaining split automatically revert to 0 and 1, respectively.

By default, the SplitSizeMode property for a newly created split is Scalable, and the SplitSize property is set to 1. For example, if you create two additional splits with the following code:

· Visual Basic

· C#

· Delphi

the resulting list display will look like this.

Notice that each split occupies 1/3 of the total list space. This is because there are three scalable splits, and each split has a SplitSize of 1. If you change the sizes of the splits to 1, 2 and 3, respectively:

· Visual Basic

· C#

· Delphi

The resulting list display will look like this.

Notice the sum of the split sizes (1+2+3) is 6, so the size of each split is a fraction with the numerator being the value of its SplitSize property and a denominator of 6.

When a split's SplitSizeMode is set to Exact, that split receives space before the other splits. This behavior is somewhat more complex, but understanding how scalable splits work is helpful. For example, assume that splits are set in the following way:

· Visual Basic

· C#

· Delphi

After configuring the splits in this way, the resulting list display will look like this.

The fixed-size split in the middle (Split1) is configured to exactly 250 pixels and the remaining splits compete for the space remaining in the list. Since the remaining splits are both scalable splits, they divide the remaining space among themselves according to the percentages calculated using their SplitSize property values. So, the leftmost split occupies 1/3 of the remaining space and the rightmost split occupies 2/3.

Splits with SplitSizeMode set to NumberofColumns behave almost identically to exact splits, except their size is determined by the width of an integral number of columns. The width, however, is dynamic, so resizing the columns or scrolling so that different columns are in view will cause the entire list to reconfigure itself.

Avoid creating a list with no scalable splits. Although List handles this situation, it is difficult to work with a list configured in this way. For example, if no splits are scalable, all splits will have an exact size, which may not fill the entire horizontal width of the list. If the total width of the splits is too short, List displays a "null-zone" where there are no splits. If the total width of the splits is wider than the list, then List will show only the separator lines for the splits that cannot be shown.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Creating and Resizing Splits through User Interaction

You can always create and resize splits in code. However, you can also let your users create and resize splits interactively by setting the AllowHorizontalSplit or AllowVerticalSplit property of a split to True. By default, both properties are set to False and users are prevented from creating and resizing splits.

A typical list with these properties set to False is shown in the following figure. Notice that there is no split box at the left edge of the horizontal scroll bar or at the top of the vertical scroll bar.

If you set the split's AllowVerticalSplit property to True:

· Visual Basic

· C#

· Delphi

A split box will appear at the top edge of the vertical scroll bar, and the user will be able to create new splits at run time.

If you set the split's AllowHorizontalSplit property to True:

· Visual Basic

· C#

· Delphi

A split box will appear at the left edge of the horizontal scroll bar, and the user will be able to create new splits at run time.

The new split will inherit its properties from the original split. The SplitSizeMode properties of both splits will be automatically set to 0 - Scalable, regardless of the SplitSizeMode of the original split. The SplitSize properties of both splits will be set to the correct ratio of the splits' sizes. The values of the SplitSize properties may end up being rather large. This is because List needs to choose the least common denominator for the total split size, and the user may drag the pointer to an arbitrary position.

If the user points to the split box between the two splits, the pointer will turn into a double vertical bar with horizontal arrows. The user can drag this pointer to the left or right to adjust the relative sizes of the splits.

To summarize:

· You can always create or resize splits in code, but the AllowHorizontalSplit and AllowVerticalSplit properties control whether users can create or resize splits interactively at run time.

· The user can resize the relative sizes of two splits only if both splits' AllowSizing properties are True. When the user completes a resize operation, the total size of the two splits remains unchanged, but the SplitSizeMode properties of both splits will automatically be set to Scalable regardless of their previous settings. The SplitSize properties of the two splits will be set to reflect the ratio of their new sizes.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Vertical Scrolling and Split Groups

By default, the list has only one horizontal split, with split index 0, and its HScrollBar and VScrollBar style properties are set to ScrollBarStyleEnum.Automatic. That is, the horizontal or vertical scroll bar will appear as necessary depending upon the column widths and the number of data rows available. The default split's HorizontalScrollGroup and VerticalScrollGroup properties are set to 1. Splits having the same scrollgroup property setting will scroll vertically or horizontally together. When a new split is created, it will inherit both the state of the scroll bars and the Scroll Group properties from the parent split. If all of the splits belonging to the same HorizontalScrollGroup or VerticalScrollGroup have their HScrollBar and VScrollBar style properties set to ScrollBarStyleEnum.Automatic, then List will display the vertical scroll bar or horizontal scroll bar only at the rightmost or bottomost split of the scroll group. Manipulating this single scroll bar will cause all splits in the same scroll group to scroll simultaneously.

For example, if you create two additional splits with the following code:

· Visual Basic

· C#

· Delphi

The resulting list display will look like this:

All three splits will have the same HScrollBar and VScrollBar settings and a VerticalScrollGroup setting of 1. However, only one vertical scroll bar will be displayed, within the rightmost split. When the user operates this scroll bar, all three splits will scroll simultaneously.

Vertical splits react in the same manner. After adding two vertical splits to the list, all of the splits have the same HorizontalScrollGroup value of 1. Thus there is only one horizontal scroll bar at the bottom of the list, and if this scroll bar is scrolled, all three splits will scroll simultaneously.

You can change one of the scroll group properties of the splits to create split groups that scroll independently. In the preceding example, setting the HorizontalScrollGroup property of the middle split to 2 creates a new scroll group:

· Visual Basic

· C#

· Delphi

After this statement executes, scrolling the middle split will not disturb the others, as shown in the following figure:

Note that the middle split now contains a horizontal scroll bar. This scroll bar operates only on the middle split, since it is the only one with its HorizontalScrollGroup property equal to 2. The horizontal scroll bar in the bottomost split now controls the bottom and top splits only. It no longer affects the middle split.

A common application of this feature is to create two independent split groups so that users can compare field values from different records by scrolling each split to view a different set of rows.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Horizontal Scrolling and Fixed Columns

Scrolling is independent for each split. Often, you need to prevent one or more columns from scrolling horizontally or vertically so that they will always be in view. List provides you with an easy way to keep any number of columns from scrolling at any location within the list (even in the middle!) by setting a few split properties.

As an example, assume that you have a list with three horizontal splits. The following code will "fix" columns 0 and 1 in the middle split:

· Visual Basic

· C#

· Delphi

Usually, if you keep columns 0 and 1 from scrolling in one split, you will want to make them invisible in the other splits:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


How to Use Styles

List for .NET uses a style model similar to that of Microsoft Word and Excel to simplify the task of customizing a list's appearance. A Style object is a combination of font, color, picture, and formatting information comprising the following properties:

BackColor | Controls the background color.
BackgroundImage | Sets/returns a style's background picture.
BackgroundPictureDrawMode | Controls how a style's background picture is displayed.
Borders | Sets the style, color, and width for a set of cell borders.
Font | Specifies typeface, size, and other text characteristics.
ForeColor | Controls the foreground color.
ForegroundImage | Sets/returns a style's foreground picture.
ForeGroundPicturePosition | Controls how a style's foreground picture is positioned.
HorizontalAlignment | Specifies cell text alignment.
Trimming | Determines how a string is trimmed.
VerticalAlignment | Specifies vertical text alignment.
WrapText | Word wraps cell text when true.

Built-in Named Styles

Working with Style Properties

Applying Styles to Cells

Applying Pictures to List Elements

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Built-in Named Styles

When a list is first created, it has a collection of built-in named styles that control various aspects of its display. For example, the Heading style determines the attributes used to display column headers. At design time, you can change the appearance of the list as a whole by modifying the built-in named styles in the Style Collection Editor. At run time, the GridStyleCollection object provides access to the same set of named styles. Initially, all lists contain ten built-in styles, which control the display of the following list elements:

Normal | Data cells in unselected, unhighlighted rows
Heading | Column headers
Footer | Column footers
Caption | List and split caption bars
Inactive | Column headings when another column has focus
Selected | Data cells in selected rows
HighlightRow | Data cells in highlighted rows
EvenRow | Data cells in even numbered rows
OddRow | Data cells in odd numbered rows
RecordSelector | Data in the record selector column
Group | Group columns in list grouping area

A selected row is one whose bookmark has been added to the SelectedRowCollection, either in code or through user interaction. The term highlighted row refers to the current row when the ForeColor property is set to HighlightText.

The EvenRow and OddRow styles are used only when the AlternatingRows property is set to True.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Named style defaults

As in Microsoft Word, a Style object in List can inherit its characteristics from another style, referred to as the parent style. For a newly created list, the Normal style is the parent (or grandparent) of all named styles. Its default properties are as follows:

BackColor | System.Drawing.Color.White
BackgroundImage | None
BackgroundPictureDrawMode | BackgroundPictureDrawModeEnum.Stretch
Font | Microsoft Sans Serif, 8.25pt
ForeColor | System.Drawing.Color.Black
ForegroundImage | None
ForeGroundPicturePosition | ForegroundPicturePositionEnum.LeftOfText
HorizontalAlignment | AlignHorzEnum.General
Trimming | Character
VerticalAlignment | AlignVertEnum.Top
WrapText | False

The Heading and Footing styles are defined similarly. Each inherits from Normal, and each overrides the following properties:

BackColor | System.Drawing.SystemColors.Control
ForeColor | System.Drawing.Color.Black
VerticalAlignment | AlignVertEnum.Center

The Heading style overrides one additional property that the Footer style does not:

WrapText

True

The Selected style also inherits from Normal and overrides two color properties:

BackColor | System.Drawing.SystemColors.Highlight
ForeColor | System.Drawing.SystemColors.HighlightText

The same is true of the HighlightRow style, which uses the inverse of the color settings for the default Normal style:

BackColor | System.Drawing.SystemColors.Highlight
ForeColor | System.Drawing.SystemColors.HighlightText

The EvenRow and OddRow styles inherit from Normal, but only EvenRow overrides any properties:

BackColor

System.Drawing.Color.Aqua

The only styles that do not inherit directly from Normal are Caption and RecordSelector, which inherit from Heading. The reason that list and split captions are justified by default is that the Caption style specializes the following property:

HorizontalAlignment

AlignHorzEnum.Justify

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Named style inheritance

To see for yourself how named style inheritance works, place a list on a form and set the Caption property of the list and its default columns. Set the FooterText property of the default columns and set the ColumnFooters property of the list to True. The list should look something like this.

In the Style Collection Editor, expand the Normal node, select its Font property, and set Bold to True. Note that the column headers, column footers, and list caption are all bold, since all built-in styles inherit from the Normal style or one of its children.

Next, expand the Heading node and select its ForeColor property. Choose Web from the color tabs, then select White. Note that the text color of both the column headers and the list's caption bar is now white, since the Caption style inherits its color properties from the Heading style. The column footers remain the same because the Footer style inherits from Normal, not Heading.

Finally, expand the Caption node and select its BackColor property. Choose Web from the color tabs, then select Gray. Note that the background color of the column headers is not changed, and that the Caption style continues to inherit its text color from its parent style, Heading.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Modifying named styles

You can change the appearance of the overall list at design time by using .NET’s collection editors to modify the GridStyleCollection object. For example, to force all column headers to center their caption text, you can change the HorizontalAlignment property of the built-in Heading style to AlignHorzEnum.Center.

The following statement accomplishes the same result in code:

· Visual Basic

· C#

· Delphi

However, you are not required to use the Style Collection Editor or manipulate named members of the GridStyleCollection in code, as the list and its component objects expose several properties that return Style objects. As the next section describes, you can fine tune the appearance of the list by manipulating these objects directly. For more information see Using the Style Collection Editor.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Working with Style Properties

Just as a document template in Microsoft Word specifies the overall appearance of individual paragraphs in a document, the named members of the GridStyleCollection object provide an overall display template for a C1List or C1Combo control. However, to customize the appearance of individual Split or C1DisplayColumn objects, you need to modify the appropriate Style object property:

CaptionStyle | Controls the caption style for an object.
EvenRowStyle | Controls the row style for even-numbered rows.
FooterStyle | Controls the footing style for an object.
HeadingStyle | Controls the heading style for an object.
HighlightRowStyle | Controls the marquee style when set to Highlight Row.
InactiveStyle | Controls the inactive heading style for an object.
OddRowStyle | Controls the row style for odd-numbered rows.
SelectedStyle | Controls the selected row and column style for an object.
Style | Controls the normal style for an object.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Modifying a style property directly

You can customize the appearance of a list component by modifying one or more members of an appropriate style property. For example, to make the list's caption text bold, you can change the Font property associated with the CaptionStyle property. At design time, this is done by expanding the CaptionStyle tree node on the Visual Basic properties window, expanding the Font node, and setting Bold to True. The change is committed to the list when you click out of this particular property.

Note that if you switch to the Style Collection Editor, you will see that the built-in Caption style has not changed.

This means that the following statements are not equivalent:

· Visual Basic

· C#

· Delphi

The first statement specializes the font of the list's caption bar without changing the named Caption style. The second statement changes the named Caption style, which may or may not affect the display of the list's caption bar, depending on whether the Font member of the CaptionStyle property was specialized previously. For example, if you change the list's CaptionStyle font to Arial, then change the font of the built-in Caption style to Courier, the list caption will remain Arial. However, if you never change the CaptionStyle font, then any font change to the built-in Caption style will be instantly reflected in the list's caption bar.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Named styles versus anonymous styles

When setting style properties at design time, it is important to understand the distinction between named styles and the anonymous styles exposed by list properties.

Named styles provide templates that govern the appearance of the list, its splits, and its columns. At design time, you can create, modify, and delete named styles using the Style Collection Editor. At run time, the GridStyleCollection is used to represent the same set of named Style objects.

Anonymous styles are not members of the GridStyleCollection, however. They are provided so that you can easily and directly customize the appearance of an individual split or column without having to define a separate named style.

The following analogy should help to clarify the distinction between named and anonymous styles. Consider a Microsoft Word document that consists of several paragraphs based on the default normal style. Suppose that one of the paragraphs is a quotation that needs to be indented and displayed in italics. If the document is part of a larger work that contains several quotations, it makes sense to define a special style for that purpose and apply it to all paragraphs that contain quotations. If the document is an early draft or is not likely to be updated, defining a style for one paragraph is overkill, and it would be more convenient to apply indentation and italics to the quotation itself.

In this analogy, specifying paragraph attributes directly is akin to setting the members of a property that returns an anonymous style. For example, if you want cell data to be vertically centered within a particular list column, you can modify the VerticalAlignment member of the column's Style property in the C1DisplayColumn Collection Editor.

Note that modifying an anonymous style is just like modifying a named style. You first expand the desired Style object node in a property tree, then select and edit one or more of its member properties.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Anonymous style inheritance

Just as one named style can inherit font, color and formatting characteristics from another, an anonymous style in a Split object can inherit from its counterpart in the containing C1List control. Similarly, an anonymous style in a C1DisplayColumn object can inherit from its counterpart in the containing Split object. Since the C1Combo control does not have a Splits collection, the anonymous styles of its C1DisplayColumn objects can inherit values from the control itself.

When a list is first created, its Style property inherits all of its attributes from the built-in Normal style, which controls the appearance of all data cells. Any changes to the Normal style are propagated to all splits, and in turn to the columns within each split. However, you can change the appearance of all data cells within a Split or C1DisplayColumn object by modifying the members of its anonymous Style property.

Consider the following list layout, which uses the default values of all built-in styles and contains two identical splits.

All of the subsequent examples use this layout as a starting point. For clarity, the examples use code to illustrate the relationships between style properties and the list's display; however, you can perform the same operations at design time using the list's collection editors.

Example 1:

· Visual Basic

· C#

· Delphi

Since the default values of all built-in styles are in effect, columns inherit from their containing splits, which in turn inherit from the list as a whole. Therefore, this statement affects not only data cells, but all headers, footers and caption bars. This statement has the same visual effect as changing the Normal style directly using the Style Collection Editor; however, the built-in Normal style itself is not changed.

Example 2:

· Visual Basic

· C#

· Delphi

In this example, only the data cells of the first split are affected. This is because the split caption, column headers and column footers inherit their fonts from the built-in styles Caption, Heading and Footing, respectively.

Example 3:

· Visual Basic

· C#

· Delphi

This example extends the previous one to render all elements of the first split in bold. In addition to the Style property, it is necessary to set the CaptionStyle, HeadingStyle and FooterStyle properties.

Example 4:

· Visual Basic

· C#

· Delphi

In this example, only the data cells of the first column of the first split are affected. This is because the column headers and column footers inherit their fonts from the built-in styles Heading and Footing, respectively.

Example 5:

· Visual Basic

· C#

· Delphi

This example extends the previous one to render all elements of the first column of the first split in bold. In addition to the Style property, it is necessary to set the HeadingStyle and FooterStyle properties.

Example 6:

· Visual Basic

· C#

· Delphi

In the first example, setting the Font member of the list's Style property affected the entire list, including each caption bar, column header and column footer. However, the same is not true of the BackColor and ForeColor properties. Since the built-in Caption, Heading and Footing styles override both of these properties, only the data cells of the list are displayed with a dark gray background.

Example 7:

· Visual Basic

· C#

· Delphi

In this example, only the data cells of the first split are affected. This is because the split caption, column headers, and column footers inherit their background colors from the built-in styles Caption, Heading and Footing, respectively.

Example 8:

· Visual Basic

· C#

· Delphi

In this example, only the data cells of the first column of the first split are affected. This is because the column headers and column footers inherit their background colors from the built-in styles Heading and Footing, respectively.

Example 9:

· Visual Basic

· C#

· Delphi

Setting the HorizontalAlignment property of a C1DisplayColumn object affects not only its data cells, but also its header and footer. The reason for this is that the default setting of the HorizontalAlignment property for the built-in Heading and Footing styles, which is inherited from Normal, is set to AlignHorzEnum.General. For data cells, the general setting means that the underlying data type determines whether the cell text is left, center or right aligned; for column headers and footers, the general setting means that the column's data cell alignment should be followed.

Example 10:

· Visual Basic

· C#

· Delphi

This example illustrates the distinction between general and specific alignment for column headers and footers. If the HorizontalAlignment member of the HeadingStyle (or FooterStyle) property is not set to AlignHorzEnum.General, then the header (or footer) is aligned independently of the data cells.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Applying Styles to Cells

List for .NET gives you three ways to control the display characteristics of individual cells:

By Status | Each list cell has a cell status that identifies its disposition (any combination of current, modified, part of a selected row, or part of a highlighted row). Using the AddCellStyle method, you can set style attributes that apply to any possible combination of cell status values.
By Contents | You can specify a pattern (called a regular expression) that is used to perform pattern matching on cell contents. When the contents match the pattern supplied in the AddRegexCellStyle method, List will automatically apply pre-selected style attributes to the cell.
By Custom Criteria | Using the FetchCellStyle (or FetchRowStyle) event, you can make decisions about cell colors and fonts each time a cell (or row) is displayed.

You can use Style objects defined at design time as arguments to the AddCellStyle and AddRegexCellStyle methods. Or, you can create a temporary style in code and use it to specialize one or more attributes.

The FetchCellStyle and FetchRowStyle events pass a temporary Style object as the final parameter. By setting its properties, you can control the appearance of the cell specified by the other event parameters.

In this version of List, per-cell font and color control can only be achieved by writing code. However, by creating styles at design time, you can keep this code to a minimum. To learn how to create named styles at design time, see Using the Style Collection Editor.

Specifying cell status values

Applying cell styles by status

Applying cell styles by contents

Applying cell styles by custom criteria

Cell style evaluation order

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Specifying cell status values

List recognizes 16 distinct cell status values which are used in code to indicate the disposition of a cell. A cell status value is a combination of four separate conditions. These conditions are enumerations that have the flag attribute, which means that they can be combined with the Or operator:

Current Cell | The cell is the current cell as specified by the Bookmark, Col and Split properties. At any given time, only one cell can have this status.
Marquee Row | The cell is part of a highlighted row marquee.
Selected Row | The cell is part of a row selected by the user or in code. The SelectedRowCollection contains a bookmark for each selected row.

List defines the following constants corresponding to these cell conditions:

CellStyleFlag.CurrentCell | Applies to the current cell
CellStyleFlag.MarqueeRow | Applies to cells in a highlighted row marquee
CellStyleFlag.SelectedRow | Applies to cells in a selected row

List also defines the following constants, which are not meant to be combined with those listed earlier:

CellStyleFlag.AllCells | Applies to all cells
CellStyleFlag.NormalCell | Applies to cells without status conditions

Use AllCells to refer to all cells regardless of status. Use NormalCell to refer to only those cells without any of the three basic cell conditions described earlier.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Applying cell styles by status

Each cell in the List display has a status value which identifies its disposition (any combination of current, modified, part of a selected row or part of a highlighted row). Using the AddCellStyle method, you can set style attributes which apply to any possible combination of cell status values. The AddCellStyle method is supported by the C1List, C1Combo, Split and C1DisplayColumn objects, enabling you to control the range of cells for which certain conditions apply.

For each unique status combination, you can set the color, font and picture attributes to be used for cells of that status. When a cell's status changes, List checks to see if any style property overrides are defined for that cell and applies those attributes to the cell when it is displayed. Style objects are used to specify the color and font for a cell, as in the following example:

· Visual Basic

· C#

· Delphi

Here, a new temporary style object is created to specify the color and font (red text, bold) to be applied to the current cell throughout the entire list. Since the style object's BackColor property is not set explicitly, the background color of the current cell is not changed.

You can also use styles defined at design time as arguments to the AddCellStyle method:

· Visual Basic

· C#

· Delphi

The preceding example can be simplified since the AddCellStyle method accepts a style name as well as an actual style object:

· Visual Basic

· C#

· Delphi

All of the preceding examples cause the text of the current cell to appear in red and bold. However, it is important to note that the status CurrentCell applies only to cells which have only this status.

Although this method of specifying cell conditions offers more control and flexibility, it also requires that additional code be written for some common cases.

Calls to AddCellStyle take effect immediately, and can be used for interactive effects as well as overall list characteristics.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Applying cell styles by contents

You can tell List to automatically apply colors and fonts to particular cells, based upon their displayed contents. To do so, you provide a pattern, called a regular expression, which the list tests against the displayed value of each cell. Using the AddRegexCellStyle method, you can associate a regular expression with a set of style attributes, then apply them to any possible combination of cell status values. The AddRegexCellStyle method is supported by the C1List, C1Combo, Split and C1DisplayColumn objects, allowing you to control the range of cells for which certain conditions apply.

The AddRegexCellStyle method is similar to the AddCellStyle method, but it requires an additional argument for the regular expression string. As with AddCellStyle, you can use either temporary or named styles. The following example uses a temporary style to display all cells in the first column that contain the string "Computer" in bold:

· Visual Basic

· C#

· Delphi

This feature allows you to implement "visual queries" that attach distinctive font or color attributes to cells that match a certain pattern.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Applying cell styles by custom criteria

For cases where regular expressions are insufficient to express your formatting requirements, you can use the FetchCellStyle event to customize fonts and colors on a per-cell basis. This event will only be fired for columns that have the FetchStyle property set to True.

For example, you may want to provide color coding for values that fall within a certain range. The following code assumes that the FetchStyle property is True for a single column of numeric data, and handles the FetchCellStyle event to display values greater than 1000 in blue:

· Visual Basic

· C#

· Delphi

The Split, Row and Col arguments identify which cell the list is displaying. The CellStyle argument conveys formatting information from your application to the list. Since the CellStyle argument is a Style object, you can also change a cell's font characteristics in the FetchCellStyle event:

· Visual Basic

· C#

· Delphi

The FetchCellStyle event can also be used to apply formatting to one cell based upon the values of other cells or even other controls. For example, suppose that you want to:

· Make the cell text red in column 4 if column 1 minus column 2 is negative.

· Make the cell text bold in column 7 if it matches the contents of a text box.

In this case, you need to set the FetchStyle property to True for columns 4 and 7, and handle the FetchCellStyle event as follows:

· Visual Basic

· C#

· Delphi

For efficiency reasons, you should only set FetchStyle to True for columns that you plan to handle in the FetchCellStyle event.

NOTE: The preceding examples use the CellText method for simplicity. However, the CellText and CellValue methods always create and destroy an internal clone of the dataset each time they are called, which may make them too inefficient to use in the FetchCellStyle event. If you need to customize fonts and colors on a per-row instead of a per-cell basis, use the FetchRowStyle event, which will only be fired once per row for lists that have the FetchRowStyles property set to True. The syntax for this event is as follows:

· Visual Basic

· C#

· Delphi

Although you can use the FetchRowStyle event to implement an alternating row color scheme, an easier and more efficient way to accomplish the same task would be to use the AlternatingRows property, together with the built-in EvenRow and OddRow styles.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Cell style evaluation order

The following list defines the order in which cell styles are applied relative to the anonymous styles of a list, split or column.

1. Style property, C1List control. The default named parent of this anonymous style is Normal.

2. Style property, Split object. By default, this anonymous style inherits from its C1List control counterpart.

3. EvenRowStyle and OddRowStyle properties, Split object. By default, these anonymous styles inherit from their C1List control counterparts, which in turn have default named parents of EvenRow and OddRow. These properties apply only if the AlternatingRows property is True.

4. Style property, C1DisplayColumn object. By default, this anonymous style inherits from its Split object counterpart.

5. FetchRowStyle event. This event fires only if the FetchRowStyles property is True for a list or split.

6. SelectedStyle property, Split object. By default, this anonymous style inherits from its C1List control counterpart, which in turn has a default named parent of Selected. This property applies only to selected rows; that is, rows whose bookmarks have been added to the SelectedRowCollection through code or user interaction.

7. HighlightRowStyle property, Split object. By default, this anonymous style inherits from its C1List control counterpart, which in turn has a default named parent of HighlightRow. This property applies only to highlighted rows.

8. AddCellStyle and AddRegexCellStyle methods, if called. Cell styles specified at the C1DisplayColumn object level have the highest priority, followed by those specified at the Split object and C1List control levels. Within an object level, cell styles are tested in the order in which they were added in code. Cell styles do not inherit from one another; as soon as a match is found, testing stops.

9. FetchCellStyle event. This event fires only if the FetchStyle property is True for a C1DisplayColumn object. Thus, you always have final control over the rendering of a cell via the FetchCellStyle event.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Applying Pictures to List Elements

We extend the concept of styles to include background and foreground pictures, enabling you to add adornments to headers, footers and caption bars, to specify a background pattern for data cells, and to render picture data in cells without having to populate a ValueItems object. The following properties of the Style object determine how pictures are displayed:

BackgroundImage | Sets/returns a style's background picture.
BackgroundPictureDrawMode | Controls how a style's background picture is displayed.
ForegroundImage | Sets/returns a style's foreground picture.
ForegroundPicturePosition | Controls how a style's foreground picture is positioned.

Since picture properties follow the same inheritance rules as other style attributes, any technique described earlier in this chapter also works with pictures. This means that you can attach pictures to a list element using any of the following methods:

· Setting the BackgroundImage or ForegroundImage property of a built-in named style at design time or run time.

· Setting the BackgroundImage or ForegroundImage property of an anonymous style at design time or run time.

· Calling the AddCellStyle or AddRegexCellStyle methods.

· Writing a handler for the FetchCellStyle or FetchRowStyle events.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Displaying background pictures

You can use background pictures to customize static list elements such as caption bars, column headers and column footers. For example, the following code applies a colored gradient bitmap to the BackgroundImage member of the Style object returned by the list's CaptionStyle property:

· Visual Basic

· C#

· Delphi

This code also adjusts the color of the caption text and makes it bold, producing the following display:

You can achieve the same effect at design time by editing either the built-in Caption style on the Style Collection Editor, or the members of the CaptionStyle property in Visual Basic’s Properties Window.

By default, background pictures are centered within the associated list element. Depending upon the height of the background bitmap, you may need to adjust the value of the BackgroundPictureDrawMode property to ensure that the entire area is filled. This property determines whether the picture is centered, tiled or stretched to fit the entire area, as shown in the following figure:

You can also use background pictures within data cells to produce interesting visual effects. For example, the following patterns were designed to be replicated in adjacent rows.

By eliminating the dividing lines between data rows and the column header dividers, these patterns can be used to produce the following display.

The trick is to insert an empty unbound column on the left to display the binder rings. Add a column using the C1List Designer (see Using the C1List Designer). The following code demonstrates how to display the list:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Displaying foreground pictures

You can use foreground pictures to add visual cues to static list elements such as caption bars, column headers and column footers. Foreground Pictures are specified by the ForegroundImage property of the Style. Foreground pictures can be displayed beside some text or in place of it, but can’t be displayed over text. For an example of Foreground picture positions, see below.

Foreground pictures have the ForegroundPicturePosition property which specifies where a foreground picture is situated in comparison to the cell text. The values and their representations are displayed below:

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorials

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.

Introduction

Tutorial 1 - Binding C1List to a DataSet

Tutorial 2 - Binding C1Combo to a DataSet

Tutorial 3 - AddItem Mode

Tutorial 4 - Displaying Master-Detail Relationships

Tutorial 5 - Using C1List with SQL Query Results

Tutorial 6 - Selecting Multiple Rows Using Bookmarks

Tutorial 7 - Displaying Unbound Columns in a Bound List

Tutorial 8 - Displaying Translated Data

Tutorial 9 - Displaying Translated Data Using Images

Tutorial 10 - Using Row Styles to Highlight Related Data

Tutorial 11 - Displaying Rows in Alternating Colors

Tutorial 12 - Creating Fixed, Nonscrolling Columns in List

Tutorial 13 - CheckBox Selection

Tutorial 14 - Displaying Bitmaps

Tutorial 15 - OwnerDraw List Cells

Tutorial 16 - Borders, Scroll Tracking and Scroll Tips

Tutorial 17 - Conduct Searching using the Find Method

Tutorial 18 - Search Using MatchEntry

Tutorial 19 - Using the LookUp Feature

Tutorial 20 - Using the LimitToList Feature

Tutorial 21 - Design-Time Support for C1Combo's AddItem Mode

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Introduction

Twenty-one tutorials are presented in this section. The tutorials assume that you are familiar with programming in Visual Basic.NET, know what a DataSet is, and know how to use bound controls in general. The tutorials provide step-by-step instructions—no prior knowledge of List for .NET is needed. By following the steps outlined in this chapter, you will be able to create projects demonstrating a variety of List features, and get a good sense of what the List can do and how to do it.

The tutorials use an Access database, C1ListDemo.MDB. The database files C1ListDemo.MDB and the tutorial projects are in the TUTORIAL subdirectory of the List installation directory.

We encourage you to run the tutorial projects in Visual Basic .NET, examine the code, and experiment with your own modifications. This is the best and quickest way to realize the full potential of List. You will find that List is very easy to use, and it enables you to create powerful database applications.

The tutorials assume that the database file C1ListDemo.MDB is in the C:\Program Files\ComponentOne Studio.NET\common directory, and refer to it by filename instead of the full pathname for the sake of brevity.

NOTE: Depending on where you store the projects and database files, you may need to change the location of the C1ListDemo.mdb reference in the DataSet. For more information, see Modifying the ConnectionString.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Modifying the ConnectionString

To change the location of the C1ListDemo.mdb reference, you can edit the ConnectionString property of the OleDbConnection.

1. Select the OleDbConnection (in this case, OleDbConnection1) on the form. In the VB Properties window, select <New Connection…> from the dropdown box next to the ConnectionString property.

2. The Data Link Properties dialog box appears. Click the Provider tab and select the data to connect to.

3. Click the Connection tab to specify the location of the data and enter the correct login information. The information you must specify depends on the Provider you choose.

4. Click the Test Connection button to make sure that you have successfully connected to the database or server and click OK. The new string appears in the ConnectionString property box.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 1 - Binding C1List to a DataSet

In this tutorial, you will learn how to bind C1List to a DataSet and create a fully functional database browser. You will also learn about the basic properties of the C1List control. You will then be able to run the program and observe the run-time features of the list.

1. Create a new .NET project.

2. Double-click the C1List icon in Visual Studio’s toolbox to add it to the Form.

NOTE: See Adding the List for .NET Components to the Toolbox for information on adding a component to the toolbox.

3. Go to the Data tab in the ToolBox and add an OleDbDataAdapter to the form. In the adapter’s Data Configuration wizard, either select a connection to C1ListDemo.mdb or create a new OleDbConnection to this database. In the Choose a Query Type window of the wizard, select the Use SQL statements option. In the Generate SQL statements window, set the SQL statement to SELECT * FROM Composer, and then finish out the wizard.

4. Select Generate DataSet from .NET’s Data menu. You can also right-click the DataAdapter to bring up the Generate Dataset Wizard. Select New in the Generate Dataset window, and type DsComposer into the listbox. Click OK.

5. In the VB Properties Window on the right side of the .NET IDE, set C1List’s DataSource property to DsComposer1.Composer. At this point, your .NET design window and form should look like the following:

6. In the Form_Load event add the following code:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· List retrieves the database schema information from the DataSet and automatically configures itself to display all of the fields contained in the database table. Note that the field names are used as the default column headings.

· List automatically communicates with the DataSet. Any actions taken on the DataSet will be reflected in the list.

· You have created a fully functional database browser by only writing a one line of simple code!

Refer to Run Time Interaction and try the instructions for navigating, editing, and configuring the list at run time.

To end the program, close the window or press the stop button on the .NET Visual Basic toolbar.

This concludes Tutorial 1.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 2 - Binding C1Combo to a DataSet

In this tutorial, you will learn how to bind C1Combo to a DataSet. You will also learn about the basic properties of the C1Combo control. You will then be able to run the program and observe the run-time features of the combo.

1. Create a new .NET project.

2. Double-click the C1Combo icon in Visual Studio’s toolbox to add it to the Form.

NOTE: See Adding the List for .NET Components to the Toolbox for information on adding a component to the toolbox.

3. Go to the Data tab in the ToolBox and add an OleDbDataAdapter to the form. In the adapter’s Data Configuration wizard, either select a connection to C1ListDemo.mdb or create a new OleDbConnection to this database. In the Choose a Query Type window of the wizard select the Use SQL statements option. In the Generate SQL statements window, set the SQL statement to SELECT First, Last, Country, Birth, Death FROM Composer, and then finish out the wizard.

4. Select Generate DataSet from .NET’s Data menu. You can also right-click the DataAdapter to bring up the Generate Dataset Wizard. Select New in the Generate Dataset window, and type DataSet1 into the listbox. Click OK.

5. In the Properties Window, set C1Combo’s DataSource property to dataSet11.Composer ( or DataSource to dataSet11 and the DataMember property to Composer). Set DisplayMember to First. At this point your .NET design window and form should look like the following:

6. In the Form_Load event add the following code:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

NOTE: When C1Combo has the focus, press F4 to open the dropdown box.

To end the program, close the window or press the stop button on the toolbar.

This concludes Tutorial 2.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 3 - AddItem Mode

Tutorial 3 – AddItem Mode

This tutorial demonstrates how you can manually add information to a list using the AddItem Mode without having to bind C1List to a DataSet.

1. Create a new .NET project and add: one C1List control (C1List1), three text boxes (TextBox1, 2, 3), three labels and three buttons (Button1, 2, 3). The form should look like the following:

2. Set the DataMode property for the C1List control to AddItem.

3. In the Form_Load event, add the following code:

· Visual Basic

· C#

· Delphi

4. Add the following code to the Button1_Click event to allow the user to add a record:

· Visual Basic

· C#

· Delphi

5. Add the following code to the Button2_Click event to allow the user to delete a record:

· Visual Basic

· C#

· Delphi

6. Add the following to allow the user to clear the list:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· When you enter information into the text boxes and click the Add Record button, the information you entered is added to the list.

· Selecting a row and clicking Delete Selected will delete the whole row, while clicking Clear All will delete the entire list.

NOTE: For faster data processing, you can use the AddItem method. For example, replace the code in the Form_Load event with the following code:

· Visual Basic

· C#

· Delphi

In this tutorial only a small amount of data was used, so you may not notice a difference in the processing time. For larger amounts of data, use the AddItem method for a much faster processing time.

This concludes Tutorial 3.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 4 - Displaying Master-Detail Relationships

This tutorial demonstrates how to link multiple C1List and C1Combo controls using the Change event to trigger related actions. This technique is particularly useful for displaying master-detail relationships.

1. Create a new .NET project.

2. Place two OleDbAdapter controls (OleDbAdapter1 and OleDbAdapter2), a C1Combo control (dbcComp), and a C1List control (dblOpus) on the form (Form1) as shown in this figure.

3. For OleDbAdapter1 in the adapter’s Data Configuration wizard, either select a connection to C1ListDemo.mdb or create a new OleDbConnection to this database. In the Choose a Query Type window of the wizard select the Use SQL statements option. In the Generate SQL statements window, set the SQL statement to SELECT Last FROM Composer, and then finish out the wizard. Select Generate DataSet from .NET’s Data menu. Select New in the Generate Dataset window, and type DataSet1 into the listbox. Click OK.

4. For OleDbAdapter2 in the adapter’s Data Configuration wizard, either select a connection to C1ListDemo.mdb or create a new OleDbConnection to this database. In the Choose a Query Type window of the wizard select the Use SQL statements option. In the Generate SQL statements window, set the SQL statement to SELECT Opus.* FROM Opus, and then finish out the wizard. Select Generate DataSet from .NET’s Data menu. Select New in the Generate Dataset window, and type DataSet2 into the listbox. Click OK.

5. Set the DataSource property of dbcComp and dblOpus to dataSet11.Composer and dataSet21.Opus, respectively. Set the DisplayMember property of dbcComp to None.

6. In the Form_Load event, add the following code:

· Visual Basic

· C#

· Delphi

7. Add the following code to the RowChange event of dbcComp:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· Change the current record position of dbcComp by selecting a different composer. Observe that dblOpus (the detail list) displays a new set of compositions each time the row changes in C1Combo1 (the master list).

NOTE: When C1Combo has the focus, press F4 to open the dropdown box.

To end the program, press the End button on the toolbar. This concludes Tutorial 4.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 5 - Using C1List with SQL Query Results

Tutorial 5 – Using C1List with SQL Query Results

In this tutorial, you will learn how to use C1List to display the results of ad-hoc SQL queries. In addition, it will also outline how to set up a connection to a DataSet at run-time. Note that in order for the list to automatically respond to field layout changes, you must not have defined any column properties at design time. If a layout is already defined, use the list's Clear Fields context menu command to remove it. This will cause the list to configure itself automatically at run time.

1. Follow steps 1 through 6 of Tutorial 1 - Binding C1List to a DataSet to create a project with a C1List control bound to a Data Set.

2. Set the DataMember property of the list to Composer.

3. Place a C1List control, a Command button and a Text box on the form as shown in the figure. Rename the text property of the command button to read Execute SQL and set the text property of the TextBox to Enter SQL statement here.

4. Add the following code to the Button1_Click event:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· As in Tutorial 1 - Binding C1List to a DataSet, List retrieves the database schema information from the DataSet and automatically configures itself to display the data for all fields in the database table. Note that the field names are used as the default column headings.

5. In the TextBox control, enter the following SQL statement:

Select * from Composer

then press the Execute SQL command button. The above SQL statement displays all fields from the Customer table and is equivalent to the default display.

6. In the TextBox control, enter the following SQL statement:

Select Country from Composer

then press the Execute SQL command button. The list responds by displaying only one column for the Country field.

7. In the TextBox control, enter the following SQL statement:

Select Last, Country from Composer

then press the Execute SQL command button. This is similar to the previous SQL statement except that two columns (Last and Country) are now displayed.

8. In the TextBox control, enter the following SQL statement:

Select Count(*) from Composer

then press the Execute SQL command button. The above SQL statement uses an aggregate function, Count(*):SQL, to return the total number of records in the Customer table. Even though the SQL result is not a set of records, the list faithfully responds by displaying the number of records in a single column. By default, Expr1000 is used as the column heading, indicating that the display is the result of an expression.

9. In the TextBox control, enter the following SQL statement:

Select UCase(Last) as ULAST, UCase(First) AS UFIRST from Composer

then press the Execute SQL command button. The above SQL statement produces two calculated columns which display the Last and First fields in upper case. The list also displays the (assigned) calculated column names, ULAST and UFIRST, as the column headings.

10. In the TextBox control, enter the following SQL statement:

SELECT * FROM Composer WHERE First = "Edward"

then press the Execute SQL command button. The above SQL statement displays only records with First equal to Edward.

11. In the TextBox control, enter the following SQL statement:

SELECT * FROM Composer ORDER BY Last

then press the Execute SQL command button. The above SQL statement displays records in alphabetical order according to the Last field.

This concludes Tutorial 5.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 6 - Selecting Multiple Rows Using Bookmarks

Tutorial 6 – Selecting Multiple Rows Using Bookmarks

In this tutorial, you will learn how to select and highlight records that satisfy specified criteria. A group of similar items is generally implemented as a collection in C1List. When manipulating a group of items in C1List, use techniques similar to those described here.

1. Follow steps 1 through 6 of Tutorial 1 - Binding C1List to a DataSet to create a project with a C1List control bound to a Data Set.

2. Set Button1’s Text property to Select and set Button2’s Text property to Clear. The .NET design window and form should look like the following:

3. We can easily select and deselect rows in List by manipulating the SelectedRowCollection. To select rows, place the following code in the Button1_Click event:

· Visual Basic

· C#

· Delphi

4. To deselect rows, place the following code in the Button2_Click event:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1List1 retrieves the database schema information from the DataSet and automatically configures itself to display all of the fields in the database table. This is again similar to the behavior of the list in Tutorial 1 - Binding C1List to a DataSet.

· Click the Select command button and observe that all records with the Country field equal to Germany will be highlighted.

· To deselect the highlighted records, click the Clear command button. Alternatively, clicking anywhere on a list cell will also clear the selected rows.

This concludes Tutorial 6.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 7 - Displaying Unbound Columns in a Bound List

In this tutorial, you will learn how to use the UnboundColumnFetch event to display two fields (First and Last) together in one column.

1. Follow steps 1 through 5 of Tutorial 1 - Binding C1List to a DataSet to create a project with a C1List control bound to a Data Set.

2. Declare a new global DataTable object in Form1:

· Visual Basic

· C#

· Delphi

3. Add the following code to the Form_Load event:

· Visual Basic

· C#

· Delphi

NOTE: The first line fills the dataset, the second line makes a copy of this DataSet, which we will use later to populate the unbound column. The last two lines of code hide the columns with field names “First” and “Last”:

4. To create an unbound column open up the C1List Designer by clicking on the ellipsis button next to the Columns property in the VB Properties window. Next click the Add button in the left pane to create column, which is added at the bottom of the list. You can maneuver where you would like the column to appear by using the up and down arrow buttons in the left pane. Move the new column to the very first column and set its Caption property to Name in the right pane. Notice that we have a value in the Caption field, but no value in the Data field. This is how C1List knows it is an unbound column. C1List now knows to fire the UnboundColumnFetch event.

5. Open the Split Collection Editor by clicking on the ellipsis button next to the Splits property in the VB Properties window. Open the C1DisplayColumn Collection Editor by clicking on the ellipsis button next to the DisplayColumns property. In this editor, find the unbound column that we just created, and set its Visible property equal to True. Now our unbound column is visible to the end-user and not just the C1List control.

6. Add the following code to the UnboundColumnFetch event:

· Visual Basic

· C#

· Delphi

NOTE: This code uses dtCopy to gather values, which are set to e.Value, to place them in the unbound column.

Run the program and observe the following:

· C1List1 displays data from the table with the "First" and "Last" fields missing.

· The first column displays the combined First and Last fields as defined in the UnboundColumnFetch event.

This concludes Tutorial 7.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 8 - Displaying Translated Data

Tutorial 8 – Displaying Translated Data

In this tutorial, you will learn how to use the Translate and DisplayValue properties to assign text to numerical values for a more descriptive list.

1. Create a new .NET project.

2. Double-click the C1List icon in Visual Studio’s toolbox to add it to the Form.

NOTE: See Adding the List for .NET Components to the Toolbox for information on adding a component to the toolbox.

3. Go to the Data tab in the ToolBox and add an OleDbDataAdapter to the form. In the adapter’s Data Configuration wizard, either select a connection to C1ListDemo.mdb or create a new OleDbConnection to this database. In the Choose a Query Type window of the wizard select the Use SQL statements option. In the Generate SQL statements window, set the SQL statement to SELECT * FROM Contacts INNER JOIN Customers ON Contacts.UserCode = Customers.UserCode, and then finish out the wizard.

4. Select Generate DataSet from .NET’s Data menu. You can also right-click the DataAdapter to bring up the Generate DatasetWizard. Select New in the Generate Dataset window, and type DsContacts into the listbox. Click OK.

5. In the VB Properties Window on the right of the .NET IDE, set C1List’s DataSource property to DsContacts1.Contacts.

6. In the Form_Load event, add the following code:

· Visual Basic

· C#

· Delphi

7. Click the ellipsis button next to the Columns property of C1List1 in the VB Properties window. This will bring up the C1List Designer. Select CustType in the left pane, and in the right pane expand the ValueItems property. Set the Translate property to True.

8. Click the ellipsis button next to the Values property and the ValueItem Collection Editor appears. Click the Add button and the first ValueItem member appears in the left pane. In the right pane enter Prospective in the DisplayValue box and enter 1 in the Value box.

9. Add four more members with the following properties to the Members list:

Member | DisplayValue | Value
1 | Normal | 2
2 | Buyer | 3
3 | Distributor | 4
4 | Other | 5

The ValueItem Collection Editor should look like the following:

10. Click OK to return to the C1List Designer. Select Callback in the left pane, and in the right pane expand the ValueItems property. Set the Presentation property to CheckBox and the Translate property to True.

Run the program and observe the following:

· In the CustType column C1List1 displays the DisplayValues that you entered in the ValueItem Collection Editor. Setting the Translate property to True displays the DisplayValues instead of the data values entered for the Value property.

· In the Callback column C1List1 automatically places a checkmark next to the customers wanting a call back instead of True or False.

This concludes Tutorial 8.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 9 - Displaying Translated Data Using Images

Tutorial 9 – Displaying Translated Data Using Images

In this tutorial, you will learn how to use the Translate and DisplayValue properties to display images in the column.

1. Follow steps 1 through 6 of Tutorial 8 - Displaying Translated Data to create a project with a C1List control bound to a Data Set.

2. Click the ellipsis button next to the Columns property of C1List1 in the VB Properties window. This will bring up the C1List Designer. Select ContactType in the left pane, and in the right pane expand the ValueItems property. Set the Translate property to True.

3. Click the ellipsis button next to the Values property and the ValueItem Collection Editor appears. Click the Add button and the first ValueItem member appears in the left pane. In the right pane enter 0 in the Value box. For the DisplayValue, click the ellipsis button and find the phone.bmp file that came with this tutorial. Click Open and a phone icon appears next to the DisplayValue.

4. Add two more members with the following properties to the Members list:

Member | DisplayValue | Value
1 | mail.bmp | 1
2 | person.bmp | 2

The ValueItem collection should look like the following:

Run the program and observe the following:

· In the ContactType column C1List1 displays the icons that you entered as DisplayValues in the ValueItem Collection Editor. Setting the Translate property to True displays the DisplayValues instead of the data values entered for the Value property.

This concludes Tutorial 9.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 10 - Using Row Styles to Highlight Related Data

In this tutorial, you will learn how to change the list's display to highlight rows by creating row styles depending upon a value in the list. List uses the FetchRowStyle event to create style characteristics and apply them to rows dynamically.

1. Follow steps 1 through 6 of Tutorial 8 - Displaying Translated Data, setting SELECT * FROM CUSTOMERS as the SQL statement, to create a project with a C1List control bound to a Data Set.

2. Add thee buttons to the form. Change the caption of Button1 to Prospective Customers, Button2 to Distributors, and Button3 to Reset the List so that the form appears as follows.

3. Add the following declarations to the General section of Form1:

· Visual Basic

· C#

· Delphi

4. Enter the following code in the Button1_Click event:

· Visual Basic

· C#

· Delphi

5. Enter the following code in the Button2_Click event:

· Visual Basic

· C#

· Delphi

6. Enter the following code in the Button3_Click event:

· Visual Basic

· C#

· Delphi

7. Enter the following code in the FetchRowStyle event. This code interacts with the setting of the FetchRowStyles property in the click event. When the FetchRowStyles is set to True, the list fires the FetchRowStyle event when it needs to repaint the cells. Thus the row style is applied according to the value of the bflag flag integer:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· Click the Prospective Customers button. The list should appear as follows:

· Click the Distributors button. The list should now appear as follows:

· Finally, click the Reset the List button. The list should clear itself of the styles.

This concludes Tutorial 10.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 11 - Displaying Rows in Alternating Colors

In this tutorial, you will learn how to use the AlternatingRows property and built-in styles to apply alternating colors to list rows to improve their readability.

1. Follow steps 1 through 5 of Tutorial 8 - Displaying Translated Data to create a project with a C1List bound to a Data Set.

2. In the Form_Load event add the following code:

· Visual Basic

· C#

· Delphi

The list has default settings for both the EvenRow and OddRow styles. We will use the default settings first and then change the settings for the EvenRowStyle.

Run the program and observe the following:

· C1List1 displays even-numbered rows with a light cyan background.

· Click the ellipsis button next to the Styles property in the VB Properties window. This will bring up the Style Collection Editor. Select the EvenRowStyle in the left pane, and in the right pane change its backcolor to LightGray. Click OK and close the editor.

Run the program and observe the following:

· C1List1 displays data as in the previous figure, except that even-numbered rows now have a light gray background.

This concludes Tutorial 11.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 12 - Creating Fixed, Nonscrolling Columns in List

Often, you would like to prevent one or more columns from scrolling horizontally or vertically so that they will always be in view. The SplitCollection of List provides a generalized mechanism for defining groups of adjacent columns, and can be used to implement any number of fixed, nonscrolling columns or rows. In this tutorial, you will learn how to write code to create a list with two horizontal splits, and then "fix" a pair of columns in the leftmost split.

1. Follow steps 1 through 6 of Tutorial 1 - Binding C1List to a DataSet to create a project with a C1List bound to a Data Set.

2. In the Form_Load event, add the following code to create an additional split and to fix columns 0 and 1 in the leftmost split:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· The two columns (Birth and Country) in the leftmost split are fixed and cannot be scrolled. In fact, there is no horizontal scroll bar present under the left split. A horizontal scroll bar appears under the rightmost split, allowing users to scroll the columns in this split.

You can use splits to create fixed, nonscrolling columns anywhere within the list—even in the middle! You can also use splits to present different views of your data. For example, you can create splits which scroll independently (in the vertical direction) so that users may compare records at the beginning of the database with those at the end. For more information, see How to Use Splits.

NOTE: There is another way to fix columns. Use the FixColumn method for the DisplayColumn object. Follow the steps below:

3. Add another List control (C1List2) to the form right below C1List1. Add two buttons with the text Fix Columns and Unfix Columns, respectively.

4. Set the C1List1 DataSource property to DsComposer1.Composer.

5. Under the Button_Click1 event for Fix Columns, add the following code:

· Visual Basic

· C#

· Delphi

6. Under the Button_Click2 event for Unfix Columns, add the following code:

· Visual Basic

· C#

· Delphi

7. Run the program and click Fix Columns. The first two columns are fixed and you cannot scroll them. Click Unfix Columns. The first two columns are not fixed. You may fix any column this way.

This concludes Tutorial 12.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 13 - CheckBox Selection

Tutorial 13 – CheckBox Selection

In this tutorial you will learn to use the SelectionMode property to allow users to select multiple items in a list using a checkbox.

1. Follow steps 1 through 5 of Tutorial 8 - Displaying Translated Data to create a project with a C1List bound to a Data Set.

2. In the Form_Load event, add the following code:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· You can place a checkmark in multiple boxes to select multiple rows:

This concludes Tutorial 13.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 14 - Displaying Bitmaps

Tutorial 14 – Displaying Bitmaps

In this tutorial, you will learn how to use Style objects to display arbitrary bitmaps within list cells. In addition to font, color and alignment settings. Style objects support both background and foreground pictures. Background pictures can be centered, tiled, or stretched to fill the entire cell. Foreground pictures can be positioned relative to the cell text, and can also be displayed using a transparent color.

1. Create a new .NET project.

2. Place a C1List control (C1List1), a command button (Button1), and a TextBox control (TextBox1) on the form (Form1).

3. Set the DataMode property of C1List1 to AddItem.

4. In the Form_Load event, add the following code to find the Flag directory that came with this tutorial:

· Visual Basic

· C#

· Delphi

5. To handle the Button1_Click event, add the following code:

· Visual Basic

· C#

· Delphi

6. In the FetchCellStyle event, add the following code:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· Press the Display button. The list will display pictures in the first column and their filenames in the second.

· You have created a fully functional bitmap browser with just a few lines of code.

For more information, see Applying Pictures to List Elements.

This concludes Tutorial 14.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 15 - OwnerDraw List Cells

Tutorial 15 – OwnerDraw List Cells

In this tutorial you will learn to format your list with the OwnerDrawCell event.

1. Follow steps 1 through 6 of Tutorial 8 - Displaying Translated Data, setting the SQL statement to SELECT * FROM CUSTOMER, to create a project with a C1List bound to a Data Set.

2. Define the following variables at the Form level:

· Visual Basic

· C#

· Delphi

In the Form_Load event, add the following code:

· Visual Basic

· C#

· Delphi

3. Add the following code to the OwnerDrawCell event:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1List1 displays the data using the font and color changes specified in step 4.

This concludes Tutorial 15.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips

Tutorial 16 – Borders, Scroll Tracking and Scroll Tips

In this tutorial, you will learn how to use the ScrollTips property and the FetchScrollTips event to provide a tip box as the user scrolls through a list. You will also learn to create borders and colored borders for each item.

1. Create a new .NET project.

2. Double-click the C1List icon in Visual Studio’s toolbox to add it to the Form.

NOTE: See Adding the List for .NET Components to the Toolbox for information on adding a component to the toolbox.

3. Add the following items to the form and situate them like they appear in the following figure:

· Five C1Combo boxes (C1Combo1– 5)

· Two frames and set their text property to Border Size and Scrolling

· Four Labels (Label1 – 5) and set their Text properties to Top Width, Bottom Width, Left Width, Right Width and Border Appearance respectively

· A Button (Button1) and set its Text property to Border Color

· Two Checkboxes and set their text properties to ScrollTips and ScrollTracking

4. Add a Color Dialog to the form (ColorDialog1).

5. Go to the Data tab in the ToolBox and add an OleDbDataAdapter to the form. In the adapter’s Data Configuration wizard, either select a connection to C1ListDemo.mdb or create a new OleDbConnection to this database. In the Choose a Query Type window of the wizard select the Use SQL statements option. In the Generate SQL statements window, set the SQL statement to Select * from Customer, and then finish out the wizard.

6. Select Generate DataSet from .NET’s Data menu. Select New in the Generate Dataset window, and type DsCustomer into the listbox. Click OK.

7. In the VB Properties window set the DataSource property for the list to DsCustomer1.

8. In the Form_Load event add the following code:

· Visual Basic

· C#

· Delphi

9. In the general section of Form1 add the following declarations:

· Visual Basic

· C#

· Delphi

10. In the Form_Load event, add the following code:

· Visual Basic

· C#

· Delphi

11. Now add the functions which will fill the C1Combo boxes:

· Visual Basic

· C#

· Delphi

12. Create a handler for the Button1_Click event which sets the color of the border using the color dialog:

· Visual Basic

· C#

· Delphi

13. Include the function which updates the borders:

· Visual Basic

· C#

· Delphi

14. Enter code which handles changes in the C1Combo box values:

· Visual Basic

· C#

· Delphi

15. Finally, include the code which handles the checkboxes and the FetchScrollTips event which sets the Tooltip box that displays when the user is scrolling:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1List1 displays the data specified.

· Setting ScrollTrack to True lets you see the data as it is being scrolled.

· Setting ScrollTips to True shows a Tooltip box with column information while the user is scrolling.

· By manipulating the C1Combo boxes, and the Color Dialog, you can create a border around a column’s cells and set them to a System color.

NOTE: When C1Combo has the focus, press F4 to open the dropdown box.

This concludes tutorial 16.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 17 - Conduct Searching using the Find Method

Tutorial 17 – Conduct Searching using the Find Method

In this tutorial you will utilize the Find method in List. The Find method allows you to perform custom searches within the control.

1. Create a new .NET project.

2. Double-click the C1List icon in Visual Studio’s toolbox to add it to the Form.

NOTE: See Adding the List for .NET Components to the Toolbox for information on adding a component to the toolbox.

3. Go to the Data tab in the ToolBox and add an OleDbDataAdapter to the form. In the adapter’s Data Configuration wizard, either select a connection to C1ListDemo.mdb or create a new OleDbConnection to this database. In the Choose a Query Type window of the wizard select the Use SQL statements option. In the Generate SQL statements window, set the SQL statement to SELECT * FROM CUSTOMERS, and then finish out the wizard.

4. Select Generate DataSet from .NET’s Data menu. You can also right-click the DataAdapter to bring up the Generate Dataset Wizard. Select New in the Generate Dataset window, and type DsCustomers into the listbox. Click OK.

5. Based on the following illustration, place 3 C1Combo boxes (C1Combo1, 2 and 3), a text box (TextBox1), two command buttons (Button1, 2) and four labels on the form as shown in the illustration below.

6. In the VB Properties Window on the right side of the .NET IDE, set C1List’s DataSource property to DsCustomers1.Customers.

7. Define some variables at the Form level:

· Visual Basic

· C#

· Delphi

To connect to the datasource and fill the three C1Combo boxes with values at runtime, add the following code to the Form_Load event:

· Visual Basic

· C#

· Delphi

8. To handle the Button1_Click event, add the following code:

· Visual Basic

· C#

· Delphi

9. Finally, add the code below to clear the selected rows:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· Set the Column box to LastName and the Compare Mode box to Partial Include. Then place a letter in the Search String box and press the Find button. Notice how the first item in the LastName column beginning with the letter you entered is found.

NOTE: When C1Combo has the focus, press F4 to open the dropdown box.

· Next, set the Search Pos box to Start After Current Row and press the Find button. Notice how the next item in the LastName column beginning with the letter you entered is found.

· The Find method will also let you search numeric strings. Set the Column box to Contacted and the Compare Mode box to Partial Include. Then place a date from the Contacted column in the Search String box and press the Find button. Notice how the first item in the Contacted column with the date you entered is found.

This concludes Tutorial 17.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 18 - Search Using MatchEntry

Tutorial 18 – Search Using MatchEntry

In this tutorial, you will learn how to search a record from a list using the MatchEntry, MatchCol, MatchCompare and MatchEntryTimeout properties.

1. Create a new .NET project.

2. Double-click the C1List icon in Visual Studio’s toolbox to add it to the Form.

NOTE: See Adding the List for .NET Components to the Toolbox for information on adding a component to the toolbox.

3. Go to the Data tab in the ToolBox and add an OledbDataAdapter to the form. In the adapter’s Data Configuration wizard, either select a connection to C1ListDemo.mdb or create a new OleDbConnection to this database. In the Choose a Query Type window of the wizard select the Use SQL statements option. In the Generate SQL statements window, set the SQL statement to SELECT * FROM CUSTOMERS, and then finish out the wizard.

4. Select Generate DataSet from .NET’s Data menu. You can also right-click the DataAdapter to bring up the Generate Dataset Wizard. Select New in the Generate Dataset window, and type DsCustomers into the listbox. Click OK.

5. Based on the following illustration, place four C1Combo boxes (C1Combo1, 2, 3 and 4), and four labels on the form as shown in the illustration below.

6. In the VB Properties Window on the right side of the .NET IDE, set C1List’s DataSource property to DsCustomers1.Customers.

7. In the Form_Load event, add the following code to fill the dataset and the combo boxes:

· Visual Basic

· C#

· Delphi

8. Add the following code for the Change event of each of the combo boxes:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· Set the MatchCol box to Current Mouse position.

NOTE: When C1Combo has the focus, press F4 to open the dropdown box.

· Place your mouse in the first column (Company), select a row and type the letter S. The next row where an S appears in the Company name is highlighted. If you type an S again, the next row where an S appears in the Company name after that becomes highlighted and so on.

· Set the MatchEntry box to Extended. Place your mouse in the FirstName column, and type Alice. The next row where an Alice appears in the FirstName column is highlighted.

This concludes Tutorial 18.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 19 - Using the LookUp Feature

Tutorial 19 – Using the LookUp Feature

In this tutorial, you will learn how to use the LookUp feature to change the value of a C1Combo box.

In the database C1ListDemo.mdb there are two tables: CustType and Customers. CustType has two fields: "TypeDesc" and "TypeId". Customers has a field called "CustType" corresponding to the "TypeId" in the CustType table. In other words, the "CustType" field in the Customers table is the foreign key to the CustType table. When users want to navigate or update the Customers table, they usually want more meaningful words than Ids. In our case, they want the "TypeDesc" instead of the "TypeId". This is where the LookUp feature comes into play.

1. Create a new .NET project.

2. Double-click the C1List icon in Visual Studio’s toolbox to add it to the Form.

NOTE: See Adding the List for .NET Components to the Toolbox for information on adding a component to the toolbox.

3. Add a C1Combo control, a DataGrid object, and a button control to the form. Change the button's Text property to Update To DataBase.

4. Add two OleDbDataAdapters to the form. For OleDbDataAdapter1, either select a connection to C1ListDemo.mdb or create a new OleDbConnection to this database. In the Choose a Query Type window of the wizard, select the Use SQL statements option. In the Generate SQL statements window, set the SQL statement to SELECT * FROM CUSTOMERS, and then finish out the wizard. For OleDbDataAdapter2, either select a connection to C1ListDemo.mdb or create a new OleDbConnection to this database. In the Choose a Query Type window of the wizard, select the Use SQL statements option. In the Generate SQL statements window, set the SQL statement to SELECT * FROM CUSTTYPE, and then finish out the wizard.

5. Select Generate DataSet from .NET’s Data menu. You can also right-click the DataAdapter to bring up the Generate Dataset Wizard. Select New in the Generate Dataset window, and type DataSet1 into the listbox. Select both the Customers and the CustType tables to add to the dataset and click OK.

6. Select DataGrid1 and set its DataSource property to DataSet11.Customers from the properties panel. Select C1Combo1 and set its DataSource property to DataSet11.CustType. Set its DisplayMember property to TypeDesc and its ValueMember property to TypeId.

7. Add the following code in the Form_Load event:

· Visual Basic

· C#

· Delphi

8. Add the following code to the Button1_Click event:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· When you click the second row and then third row, the C1Combo box value will change from "Normal" to "Distributor" and then to "Prospective".

· Go to the first row with the C1Combo box value changed to "Normal" and click the arrow button from the combo box.

Note: When C1Combo has the focus, press F4 to open the dropdown box.

· Choose Other and move the DataGrid to second row. Notice that the value in the "CustType" field in the first row changed from 2 to 5. You can change the CustType value for others row using the same steps. Note that the changed value is not in the database yet (only changed to the dataset now). If you want to update the changed value to database, click the Update To Database button, and the value will be updated to the database.

This concludes Tutorial 19.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 20 - Using the LimitToList Feature

Tutorial 20 – Using the LimitToList Feature

In this tutorial, you will learn how to use the LimitToList feature to prevent users from entering an item which does not appear in the combo box list.

1. Follow steps 1 through 6 of Tutorial 2 - Binding C1Combo to a DataSet to create a project with a C1Combo control bound to a Data Set.

2. Select the C1Combo control and set its DisplayMember property to First.

3. Add one button with the text Limit To List and one label with the text as it appears in the label below:

4. Add the following code to the Form_Load event:

· Visual Basic

· C#

· Delphi

5. Add the following code to the Button1_Click event:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· Click the Limit To List button. You cannot change the text to something that does not appear in the combo box list.

This concludes Tutorial 20.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tutorial 21 - Design-Time Support for C1Combo's AddItem Mode

Tutorial 21 – Design-Time Support for C1Combo's AddItem Mode

Design-time support for the AddItem mode of C1List is now available. The following steps demonstrate how to add items and set a layout at design time.

1. Create a new project.

2. Double-click the C1Combo icon in Visual Studio’s toolbox to add it to the Form.

NOTE: See Adding the List for .NET Components to the Toolbox for information on adding a component to the toolbox.

3. Select the DataMode property in the VB Properties Window and change it to AddItem.

4. Open the C1List Designer by clicking the ellipsis button next to the Columns property in the VB Properties window.

5. Add a column by clicking the Insert button in the C1List Designer, and change its Caption property to Name.

6. Add another column and change its Caption property to Contacted.

7. Expand the Contacted column's ValueItems property by clicking the + sign, and set the Translate property to True.

8. With ValueItems still expanded, click the ellipsis button next to the Values property, and the ValueItem Collection Editor appears.

9. Click the Add button and the first ValueItem member appears in the left pane. In the right pane enter No in the DisplayValue box and enter 0 in the Value box.

10. Add another ValueItem member. Enter Yes in the DisplayValue box and enter 1 in the Value box.

11. Open the Split Collection Editor by clicking the ellipsis button next to the Splits property in the VB Properties window.

12. In the right pane, click the ellipsis button next to the DisplayColumns property. The DisplayColumns Collection Editor appears.

13. Select the Name column: set its Visible property to True and its Width to 200.

14. Select the Contacted column and set its Visible property to True.

15. Click OK to close the editor windows.

16. Add the following code to the Form_Load event:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· The design-time layout is used. The width for the first column is 200, and anything with a value of 0 is changed to False, or No. Anything with a value of 1 is changed to True, or Yes.

· If you use the up and down arrow keys to navigate through the list, the item currently selected appears in the combo box.

· If you delete the HoldFields line in the code and run the program, then the default layout is used.

NOTE: For faster data processing, use the AddItem method. For example, replace the code entered in the Form_Load event with the following code:

· Visual Basic

· C#

· Delphi

In this tutorial only a small amount of data was used, so you may not notice a difference in the processing time. For larger amounts of data, use the AddItem method for a much faster processing time.

This concludes Tutorial 21.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Reference

All C1List Members

C1List Property Reference

C1List Method Reference

C1List Event Reference

C1List Event Handler Reference

C1List Event Argument Reference

C1List Enumeration Reference

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


All C1List Members

C1List Public Properties

C1List Public Methods

C1List Public Events

C1DataColumn Public Properties

C1DataColumn Public Methods

C1DisplayColumn Public Properties

C1DisplayColumn Public Methods

GridStyleCollection Public Properties

GridStyleCollection Public Methods

Split Public Properties

Split Public Methods

SplitCollection Public Properties

SplitCollection Public Methods

Style Public Properties

Style Public Methods

ValueItem Public Properties

ValueItems Public Properties

ValueItemCollection Public Properties

ValueItemCollection Public Methods

HBar Public Properties

VBar Public Properties

GridLines Public Properties

CellBorders Public Properties

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Public Properties

AddItemCols | Sets or returns the column number for the AddItem mode.
AddItemSeparator | Determines the separation string for columns when using the AddItem method in AddItem mode.
AllowColMove | Enables/disables interactive column movement.
AllowColSelect | Specifies if the user has the ability to select columns in the list.
AllowHorizontalSplit | Specifies if a user is allowed to create horizontal splits.
AllowRowSizing | Specifies if a user is allowed to resize the rows in the list.
AllowSort | Sets or returns whether or not column sort is allowed.
AllowVerticalSplit | Specifies if a user is allowed to create vertical splits.
AlternatingRows | Determines if a list or split displays odd-numbered rows in one style and even-numbered rows in another.
BackColor | Controls the background color of an object.
Bookmark | Returns or sets the bookmark identifying the current row in the list.
BorderStyle | Sets or returns the border style for the control.
Caption | Returns or sets the caption for the list.
CaptionHeight | Sets or returns the height of the list caption area.
CaptionStyle | Sets or returns the Style object that controls the appearance of the caption area.
CellTips | Determines whether the list displays a pop-up text window when the cursor is idle.
CellTipsDelay | Determines the amount of time before the cell tip window is displayed.
CellTipsWidth | Returns or sets the width of the cell tip window.
Col | Returns or sets the column position of the current cell.
ColumnCaptionHeight | Sets or returns the height of the column headers.
ColumnFooterHeight | Sets or returns the height of the column footers.
ColumnFooters | Specifies whether footers are displayed.
ColumnHeaders | Specifies whether headers are displayed.
Columns | Returns a collection of C1DataColumn objects.
ColumnWidth | Sets or returns the column width for each column in the control.
DataMember | Returns or sets the name of the data member used to populate the control.
DataMode | Specifies the normal or additem mode.
DataSource | Specifies the data source object used to bind the control to.
DataView | Returns or sets the method by which the list will display data.
DeadAreaBackColor | Controls the background color of the dead area in the list.
DefColWidth | Specifies column width for auto-created columns.
DestinationCol | Indicates which list column will be the destination after cell movement.
DestinationRow | Indicates which list row will be the destination after cell movement.
DestinationSplit | Indicates which list split will be the destination after cell movement.
DisplayMember | Sets or returns the DataSource field used for incremental search.
EmptyRows | Returns or sets a value that determines how the list displays rows below the last data row.
Enabled | Enables or disables user interaction.
EvenRowStyle | Sets or returns the Style object that controls the appearance of an even-numbered row.
ExtendRightColumn | Sets or returns whether the last column will extend to fill the dead area of the list.
FetchRowStyles | Specifies whether the FetchRowStyle event will be fired.
FlatStyle | Determines the appearance of the list.
FooterStyle | Returns the Style object that controls the appearance of column footers.
HeadingStyle | Returns the Style object that controls the appearance of column heading.
HighLightRowStyle | Returns the Style object that controls the appearance of the highlighted row.
HScrollBar | Returns the HBar object that controls the appearance of the horizontal scrollbar.
IntegralHeight | Controls whether partial rows are displayed.
ItemHeight | Returns or sets the height of all list rows.
LeftCol | Returns or sets the zero-based index of the leftmost column in a list or split.
ListCount | Returns the total row number for the control.
MatchCol | Sets the search column when the MatchEntry property is not None.
MatchCompare | Sets or returns the comparing mode for search.
MatchEntry | Sets or returns the type of incremental search.
MatchEntryTimeout | Sets or returns the incremental search timeout value.
OddRowStyle | Sets or returns the Style object that controls the appearance of an odd-numbered row.
PartialRightColumn | True if rightmost column can be clipped to the edge of a split.
RightToLeft | When True, applies right to left text functionality.
Row | Specifies the current row.
RowDivider | Determines the style of the border drawn between list rows.
RowSubDividerColor | Returns or sets the color of a RowSubDivider.
RowTracking | Controls whether rows are automatically highlighted as the mouse is moved over the C1List control.
ScrollTips | Determines whether the list displays a pop-up text window when the scrollbar thumb is dragged.
ScrollTrack | Determines whether the list constantly displays information as it scrolls.
SelectedCols | Returns the SelectedColumnCollection object.
SelectedIndex | Sets or returns the bookmark of the currently selected item.
SelectedIndices | Returns the SelectedRowCollection object.
SelectedStyle | Returns the Style object that controls the appearance of selected cells.
SelectedValue | Gets or sets the value of the member property specified by the ValueMember property.
SelectionMode | Sets or returns the type of selection allowed in the list.
Split | Returns current split number.
Splits | Returns a Collection of Split objects.
SpringMode | Specifies whether the columns will resize when the list is resized.
Style | Returns or sets the normal Style object for the list.
Styles | Returns a collection of named Style objects.
TopIndex | Returns or sets a value containing the bookmark for the first visible row in a list or split.
ValueMember | Specifies the field name for binding purposes.
VisibleCols | Returns the number of visible columns in the current split.
VisibleRows | Returns the number of visible rows in the list.
VScrollBar | Sets or returns the VBar object that controls the appearance of the vertical scrollbar.
WillChangeToIndex | Returns the bookmark identifying the will-be selected item in a control.
WillChangeToText | Returns the string identifying the text for the item to be selected.
WillChangeToValue | Returns the object identifying the value to be selected.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Public Methods

AddCellStyle | Controls the font and color of cells within a list, column, or split according to value.
AddItem | Add a new item to the end in the AddItem mode.
AddItemTitles | Sets the column titles in the AddItem mode.
AddRegexCellStyle | Controls the font and color of cells within a list, column, or split according to their contents.
CellContaining | Returns the cell position for a set of coordinates.
ClearCellStyle | Removes a cell condition established with a previous call to the AddCellStyle method.
ClearFields | Restores the default list layout.
ClearItems | Clear all of the items in the AddItem mode.
ClearSelCols | Deselects all selected columns in the current split.
ClearSelected | Clears all selected rows.
ColContaining | Returns the column index containing the specified coordinate.
ExportToDelimitedFile | Exports the specified rows from the list to the specified file as delimited ASCII text.
Find | Search a string in a specific column. If found, returns the row bookmark, otherwise returns –1.
FindString | Finds the first row index such that the cell text starts with string s in the given column.
FindStringExact | Finds the first row index such that the cell text is the same with string s in the given column.
GetDisplayText | Gets the display text for the specified row and column.
GetItemText | Gets the cell text for any cell.
GetSelected | Check whether the given row is selected.
HoldFields | Sets the current column/field layout as the customized layout.
IndexFromPoint | Returns the row index for a given point.
InsertHorizontalSplit | Inserts a horizontal split at the specified index.
InsertItem | Inserts a new item at the index position in the AddItem mode.
InsertVerticalSplit | Inserts a vertical split at the specified index.
PointAt | Returns one of the PointAtEnum constants, which indicates the kind of list element beneath the specified coordinate pair.
Rebind | Re-establishes the connection with the bound data source.
Refresh | Discards all data and repopulates all cells from a data source.
RemoveHorizontalSplit | Removes a horizontal split at the specified index.
RemoveItem | Removes the item at the given position in the AddItem mode.
RemoveVerticalSplit | Removes a vertical split at the specified index.
ResumeBinding | Resumes data binding notification from the datasource.
RowContaining | Returns the zero-based index of the display row containing the specified coordinate.
RowTop | Returns the Y coordinate of the top of a visible row.
ScrollCtl | Scrolls the list data area by the specified number of rows and columns.
SetAddItemData | Updates the cell data for the AddItem mode.
SetSelected | Selects or unselects a row from the code.
Sort | Sort a specific column for the control.
SplitContaining | Returns the Index value of the split containing the specified coordinate pair.
SuspendBinding | Temporary suspension of data binding notifications from the datasource.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Public Events

AfterSort | Fires after a column is sorted by clicking the column header.
ColFootClick | Fires when the footer of the control is clicked.
ColHeadClick | Fires when the headers of the control is clicked.
ColMove | Fires when the user has finished moving the selected columns.
ColResize | Fires after the user has finished resizing a column.
DataSourceChanged | Fires when a bound data source is changed or requeried.
DisplayMemberChanged | Occurs when the DisplayMember property changes.
Error | Fires when a data access error occurs.
FetchCellStyle | Fires when the list is about to display cell data in a column whose FetchStyle property is set to True.
FetchCellTips | Fires when the control has focus and the cursor is idle for a small amount of time (defined by the CellTipsDelay property) over a data cell, column header, column footer, split header or control caption bar.
FetchRowStyle | Fires whenever the list is about to display a row of data and the FetchRowStyles property is True.
FetchScrollTips | Fires whenever the list has focus and the scrollbar thumb is moved using the mouse.
FormatText | Fires when the list is about to display cell data in a column whose NumberFormat property is set.
LayoutReady | Fires when asynchronous downloading of a control layout file has been completed.
LeftColChange | Fires when the first visible column of a list or split is changed.
OnScroll | Fires when the user scrolls the list horizontally or vertically using the scroll bars.
OwnerDrawCell | Fires just before the cell is to be painted when the column’s OwnerDraw is true.
RowChange | Fires when the user changes a row in the list.
RowResize | Fires when the user has finished resizing a list row.
SelChange | Fires when the user selects a different range of rows or columns.
SelectedValueChanged | Occurs when the SelectedValue property changes.
TopIndexChange | Fires when the TopIndex property changes.
UnboundColumnFetch | Fires when the control needs to display the value of a cell in an unbound column.
ValueMemberChanged | Occurs when the ValueMember property changes.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Public Properties

Caption | Returns or sets the caption to the list.
DataChanged | Returns a value indicating that the data in the bound control has been changed.
DataField | Sets or returns the name of the field in the database table to which a list column is bound.
DataWidth | Holds the database width, in bytes, for a list column.
DefaultValue | Sets or returns the default value of an unbound list column in a bound list.
FooterText | Sets or returns the text displayed in the column's footing area.
NumberFormat | Sets or returns a value indicating the format string for a list column.
SortIndicator | Allows the user to set the sorting indicator by code.
Tag | Sets or returns an expression that stores any extra data needed for your program.
Text | Sets or returns the formatted data value in a column for the current row.
Value | Sets or returns the underlying data value in a column for the current row.
ValueItems | Returns a ValueItems object for a column.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Public Methods

CellText | Returns a formatted string representation of the data in a column.
CellValue | Returns the raw data value in a column for the specified row.
Refresh | Discards all data and repopulates all cells from a data source.
RefreshCell | Repaints the specified cell.
Refetch | Repopulates the cells of the specified column from a data source.
RefetchCell | Repopulates the specified cell from a data source control.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn Public Properties

AllowFocus | Specifies whether the user has the ability to set focus to the column.
AllowSizing | Specifies whether the user has the ability to size a column.
ButtonFooter | Specifies whether the column footer is also a button.
ButtonHeader | Specifies whether the column header is also a button.
CellTop | Returns the vertical offset of the top of any cell in the specified column.
ColumnDivider | Determines the style of the border drawn between Columns rows.
DataColumn | Returns the C1DataColumn object.
FetchStyle | Specifies whether the FetchCellStyle event will be fired.
FooterDivider | Specifies whether the right edge of the column's footer is drawn with a vertical dividing line.
FooterStyle | Returns the Style object that controls the appearance of column footers.
HeaderDivider | Specifies whether the right edge of the column's header is drawn with a vertical dividing line.
HeadingStyle | Returns the Style object that controls the appearance of column heading.
Height | Height of Columns.
MinWidth | Sets or returns the minimum width that a column can be sized to when the list is resized.
OwnerDraw | Specifies whether the OwnerDraw event will be fired.
Style | Returns or sets the Style object for the column.
Visible | Determines if the current cell is visible within the displayed area of the list.
Width | Sets or returns the width of a column.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn Public Methods

AddCellStyle | Controls the font and color of cells within a list, column, or split according to value.
AddRegexCellStyle | Controls the font and color of cells within a list, column, or split according to their contents.
AutoSize | Adjusts the width of a column to accommodate the longest visible field within that column.
ClearCellStyle | Removes a cell condition established with a previous call to the AddCellStyle method.
ClearRegexCellStyle | Removes a cell condition established with a previous call to the AddRegexCellStyle method.
FixColumn | Fixes the column to keep it from scrolling or resizing when v is True, and unfixes the column when v is False.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection Public Properties

Item

Exposes a specified item from the collection.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection Public Methods

Add | Adds an item to the collection.
IndexOf | Gets the index of the specified item in the collection.
Insert | Inserts the specified item into the collection.
RemoveAt | Removes the specified item from the collection.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Public Properties

AllowColMove | Specifies if the user has the ability to move columns in the list.
AllowColSelect | Specifies if the user has the ability to select columns in the list.
AllowFocus | Specifies whether the user has the ability to set focus to the column.
AllowHorizontalSizing | Specifies if a user is allowed to resize horizontal splits.
AllowRowSizing | Specifies if a user is allowed to resize the rows in the list.
AllowVerticalSizing | Specifies if a user is allowed to resize vertical splits.
AlternatingRowStyle | Determines if a list or split displays odd-numbered rows in one style and even-numbered rows in another.
Caption | Returns or sets the caption to the list.
CaptionHeight | Sets the height of the list’s caption area.
CaptionStyle | Sets or returns the Style object that controls the appearance of the caption area.
ColumnCaptionHeight | Sets the height of the column captions.
ColumnFooterHeight | Sets the height of the footer captions.
DisplayColumns | Returns a collection of C1DisplayColumn objects.
EvenRowStyle | Sets or returns the Style object that controls the appearance of an even-numbered row.
ExtendRightColumn | Sets whether the last column will extend to fill the dead area of the list.
FetchRowStyles | Specifies whether the FetchRowStyle event will be fired.
FirstRow | Returns or sets a value containing the bookmark for the first visible row in a grid or split.
FooterStyle | Returns the Style object that controls the appearance of column footers.
HeadingStyle | Returns the Style object that controls the appearance of column heading.
HighLightRowStyle | Returns the Style object that controls the appearance of the highlighted row.
HorizontalScrollGroup | Synchronizes horizontal scrolling between splits.
HScrollBar | Returns the HBar object that controls the appearance of the horizontal scrollbar.
InactiveStyle | Returns the InactiveStyle Style object.
LeftCol | Returns or sets the zero-based index of the leftmost column in a list or split.
OddRowStyle | Returns the OddRowStyle Style object.
RecordSelectorStyle | Returns the RecordSelector Style object.
SelectedStyle | Returns the Style object that controls the appearance of selected cells.
SplitSize | Returns or sets the size of a split.
SplitSizeMode | Determines how the SplitSize property is used to determine the actual size of a split.
SpringMode | Specifies whether the columns will resize when the list is resized.
Style | Returns or sets the Style object.
VerticalScrollGroup | Synchronizes vertical scrolling between splits.
VScrollBar | Sets or returns the VBar object that controls the appearance of the vertical scrollbar.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Public Methods

AddCellStyle | Controls the font and color of cells within a list, column, or split according to value.
AddRegexCellStyle | Controls the font and color of cells within a list, column, or split according to their contents.
ClearCellStyle | Removes a cell condition established with a previous call to the AddCellStyle method.
ClearRegexCellStyle | Removes a cell condition established with a previous call to the AddRegexCellStyle method.
FixedCols | Returns the fixed column number for that split.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection Public Properties

ColCount | Sets or returns how many columns there are in each split.
Item | Exposes a specified item from the collection.
RowCount | Returns how many rows there are in each split.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection Public Methods

IndexOf

Gets the index of the specified item in the collection.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Style Public Properties

BackColor | Controls the background color of an object.
BackgroundImage | Specifies the background picture.
BackgroundPictureDrawMode | Specifies the draw mode for the background picture.
Borders | Sets a border style and color for a Style.
Font | Specifies the font object for a Style.
ForeColor | Specifies the foreground color of an object.
ForegroundImage | Specifies the foreground picture.
ForeGroundPicturePosition | Specifies the cell position of a foreground picture.
HorizontalAlignment | Specifies the horizontal alignment of a cell.
Trimming | Specifies how cell text gets trimmed if necessary.
VerticalAlignment | Specifies the vertical alignment of a cell.
WrapText | Specifies if cell text gets wrapped.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Style Public Methods

Reset | Resets the style to it’s initial state.
ResetBackColor | Resets the BackColor property to its default value.
ResetBackgroundImage | Resets the BackGroundImage property to its default value.
ResetBackgroundPictureDrawMode | Resets the BackgroundPictureDrawMode property to its default value.
ResetFont | Resets the Font property to its default value.
ResetForeColor | Resets the ForeColor property to its default value.
ResetForegroundImage | Resets the ForegroundImage property to its default value.
ResetForeGroundPicturePosition | Resets the ForeGroundPicturePosition property to its default value.
ResetHorizontalAlignment | Resets the HorizontalAlignment property to its default value.
ResetLocked | Resets the Locked property to its default value.
ResetTrimming | Resets the Trimming property to its default value.
ResetVerticalAlignment | Resets the VerticalAlignment property to its default value.
ResetWrapText | Resets the WrapText property to its default value.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem Public Properties

DisplayValue | Sets or returns the translated data value for a member of a ValueItems object.
Value | Sets the underlying data value for a member of a ValueItems collection.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems Public Properties

AnnotatePicture | Specifies whether a column can display both text and graphics in a single cell.
DefaultItem | Sets or returns the zero-based index of the default item for a ValueItems object.
Presentation | Determines how the members of a ValueItems collection are displayed.
Translate | Determines whether a column's underlying data values are displayed in a translated form.
Validate | Determines whether values entered by the user must match one of the ValueItem objects.
Values | Returns a collection of DisplayValue/Value pairs.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection Public Properties

Item

Exposes a specified item from the collection.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection Public Methods

Add | Adds an item to the collection.
IndexOf | Gets the index of the specified item in the collection.
Insert | Inserts the specified item into the collection.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar Public Properties

Height | Specifies the horizontal scroll bar height.
Style | Specifies the ScrollBarEnum value for the horizontal scroll bar.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar Public Properties

Style | Specifies the ScrollBarEnum value for the vertical scroll bar.
Width | Specifies the vertical scroll bar width.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridLines Public Properties

Color | Specifies the color of the Gridlines object.
Style | Specifies the LineStyleEnum value for the GridLines object.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellBorders Public Properties

BorderType | Sets or returns the type of border.
Bottom | Specifies the width of the bottom border of a cell.
Color | Specifies the BorderTypeEnum value for the CellBorders object.
Left | Specifies the width of the left border of a cell.
Right | Specifies the width of the right border of a cell.
Top | Specifies the width of the top border of a cell.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Property Reference

AddItemCols Property

AddItemSeparator Property

AllowColMove Property

AllowColSelect Property

AllowFocus Property

AllowHorizontalSplit Property

AllowHorizontalSizing Property

AllowRowSizing Property

AllowSizing Property

AllowSort Property

AllowVerticalSizing Property

AllowVerticalSplit Property

AlternatingRows Property

AlternatingRowStyle Property

AnnotatePicture Property

BackColor Property

BackgroundImage Property

BackgroundPictureDrawMode Property

Bookmark Property

Borders Property

BorderStyle Property

BorderType Property

Bottom Property

ButtonFooter Property

ButtonHeader Property

Caption Property

CaptionHeight Property

CaptionStyle Property

CellTips Property

CellTipsDelay Property

CellTipsWidth Property

CellTop Property

Col Property

ColCount Property

Color Property

ColumnCaptionHeight Property

ColumnDivider Property

ColumnFooterHeight Property

ColumnFooters Property

ColumnHeaders Property

Columns Property

ColumnWidth Property

DataChanged Property

DataColumn Property

DataField Property

DataMember Property

DataMode Property

DataSource Property

DataView Property

DataWidth Property

DeadAreaBackColor Property

DefaultItem Property

DefaultValue Property

DefColWidth Property

DestinationCol Property

DestinationRow Property

DestinationSplit Property

DisplayColumns Property

DisplayMember Property

DisplayValue Property

EmptyRows Property

Enabled Property

EvenRowStyle Property

ExtendRightColumn Property

FetchRowStyles Property

FetchStyle Property

FirstRow Property

FlatStyle Property

Font Property (Style)

FooterDivider Property

FooterStyle Property

FooterText Property

ForeColor Property

ForegroundImage Property

ForegroundPicturePosition Property

HeaderDivider Property

HeadingStyle Property

Height Property

HighlightRowStyle Property

HorizontalAlignment Property

HorizontalScrollGroup Property

HScrollBar Property

InactiveStyle Property

IntegralHeight Property

Item Property (GridStyleCollection)

Item Property (SplitCollection)

Item Property (ValueItemCollection)

ItemHeight Property

Left Property

LeftCol Property

ListCount Property

MatchCol Property

MatchCompare Property

MatchEntry Property

MatchEntryTimeout Property

MinWidth Property

NumberFormat Property

OddRowStyle Property

OwnerDraw Property

PartialRightColumn Property

Presentation Property

RecordSelectorStyle Property

Right Property

RightToLeft Property

Row Property

RowCount Property

RowDivider Property

RowSubDividerColor Property

RowTracking Property

ScrollTips Property

ScrollTrack Property

SelectedCols Property

SelectedIndex Property

SelectedIndices Property

SelectedStyle Property

SelectedValue Property

SelectionMode Property

Split Property

Splits Property

SplitSize Property

SplitSizeMode Property

SpringMode Property

SortIndicator Property

Style Property

Style Property (GridLines)

Styles Property

Tag Property

Text Property (C1DataColumn)

Top Property

TopIndex Property

Translate Property

Trimming Property

Validate Property

Value Property (C1DataColumn)

Value Property (ValueItem)

ValueItems Property

ValueMember Property

Values Property

VerticalAlignment Property

VerticalScrollGroup Property

Visible Property

VisibleCols Property

VisibleRows Property

VScrollBar Property

Width Property

WillChangeToIndex Property

WillChangeToText Property

WillChangeToValue Property

WrapText Property

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddItemCols Property

AddItemCols Property

Sets or returns the column number for the AddItem mode.

Syntax

[VB]

C1List1.AddItemCols = 5

[C#]

public int AddItemCols {get; set;}

[Delphi]

property AddItemCols: Integer;

Remarks

You can set the AddItemCols property explicitly, or if it is not set (in that case, the AddItemCols is 0), when you call AddItem or AddItemTitles, the control will set the AddItemCols property for you.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddItemSeparator Property

AddItemSeparator Property

Determines the separation string for columns when using the AddItem method in AddItem mode.

Syntax

[VB]

object.AddItemSeparator = String

[C#]

public string AddItemSeparator {get; set;}

[Delphi]

property AddItemSeparator: string;

Default Value

This property takes ; as the default value.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowColMove Property

AllowColMove Property

Specifies if the user has the ability to move columns in the list.

Syntax

[VB]

Public AllowColMove As Boolean

[C#]

public bool AllowColMove {get; set;}

[Delphi]

property AllowColMove: Boolean;

Remarks

If True (the default), the user can move columns.

If False, the user cannot move columns.

Use the AllowColMove property to control whether the user can move columns by dragging the column header to the desired location. Any change in column order causes a ColMove event.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowColSelect Property

AllowColSelect Property

Specifies if the user has the ability to select columns in the list.

Syntax

[VB]

Public AllowColSelect As Boolean

[C#]

public bool AllowColSelect {get; set;}

[Delphi]

property AllowColSelect: Boolean;

Remarks

If True (the default), the user can select columns.

If False, the user cannot select columns.

Use the AllowColSelect property to control whether the user can select columns by clicking within the column header area. Setting this property to False suppresses highlighting when the user clicks a column header, which is useful for applications that respond to the ColHeadClick event.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowFocus Property

AllowFocus Property

Specifies whether the user has the ability to set focus to the column.

Syntax

[VB]

Public AllowFocus As Boolean

[C#]

public bool AllowFocus {get; set;}

[Delphi]

property AllowFocus: Boolean;

Remarks

If True (the default), the user will be able to interactively select the object, giving it focus.

If False, the user will not be able to interactively select the object. When clicked, the object will not receive focus and the control (or control column) that previously had focus will retain it.

For C1DisplayColumn objects, setting AllowFocus to True enables cells within the object to receive focus. If set to False, there is no way to change the focus to a cell within the object. However, if an object already has the focus, setting AllowFocus to False will not give focus to another split, column, or control.

If a cell in a column which does not allow focus is clicked, and the cell is in a row other than the current row, then the row is changed, but the column with the focus retains it.

See Also

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowHorizontalSplit Property

AllowHorizontalSplit Property

Specifies if a user is allowed to create horizontal splits.

Syntax

[VB]

Public AllowHorizontalSplit As Boolean

[C#]

public bool AllowHorizontalSplit {get; set;}

[Delphi]

property AllowHorizontalSplit: Boolean;

Remarks

If True, then the user is able to split the current list into multiple horizontal splits at run-time.

If False, then the user is prevented from splitting the list horizontally.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowHorizontalSizing Property

AllowHorizontalSizing Property

Specifies if a user is allowed to resize horizontal splits.

Syntax

[VB]

Public AllowHorizontalSizing As Boolean

[C#]

public bool AllowHorizontalSizing {get; set;}

[Delphi]

property AllowHorizontalSizing: Boolean;

Remarks

If True, then the user is able to resize horizontal splits at run-time.

If False, then the user is prevented from resizing horizontal splits at run-time.

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowRowSizing Property

AllowRowSizing Property

Specifies if a user is allowed to resize the rows in the list.

Syntax

[VB]

Public AllowRowSizing As RowSizingEnum

[C#]

public RowSizingEnum AllowRowSizing {get;}

[Delphi]

property AllowRowSizing: RowSizingEnum;

Remarks

This property determines whether a user is allowed to resize rows individually, all together, or not at all.

Member Name | Description
None | No sizing will be allowed.
AllRows | All rows will be sized as a group.
IndividualRows | Rows can be resized independently.

Note

This property only works when the SelectionMode property is set to CheckBox.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowSizing Property

AllowSizing Property

Specifies whether the user has the ability to size a column.

Syntax

[VB]

Public AllowSizing As Boolean

[C#]

public bool AllowSizing {get; set;}

[Delphi]

property AllowSizing: Boolean;

Remarks

If True, the user can resize the column or split.

If False, the user cannot resize the column or split.

For columns, AllowSizing defaults to True.

If AllowSizing is True for a column, the mouse pointer turns into a double-headed arrow when positioned over that column's divider within the column heading area, and the user can resize the column by dragging it. Any change in column size causes a ColResize event.

See Also

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowSort Property

AllowSort Property

Sets or returns whether or not column sort is allowed.

Syntax

[VB]

Public AllowSort As Boolean

[C#]

public bool AllowSort {get; set;}

[Delphi]

property AllowSort: Boolean;

Remarks

If False, the list will fire the AfterSort event. The AfterSort event allows the application to sort the data.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowVerticalSizing Property

AllowVerticalSizing Property

Specifies if a user is allowed to resize vertical splits.

Syntax

[VB]

Public AllowVerticalSizing As Boolean

[C#]

public bool AllowVerticalSizing {get; set;}

[Delphi]

property AllowVerticalSizing: Boolean;

Remarks

If True, then the user is able to resize vertical splits in the control.

If False, then the user is restricted from resizing vertical splits.

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowVerticalSplit Property

AllowVerticalSplit Property

Specifies if a user is allowed to create vertical splits.

Syntax

[VB]

Public AllowVerticalSplit As Boolean

[C#]

public bool AllowVerticalSplit {get; set;}

[Delphi]

property AllowVerticalSplit: Boolean;

Remarks

If True, then the user is able to create multiple vertical splits in the list.

If False, then the user is restricted from creating vertical splits.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AlternatingRows Property

AlternatingRows Property

Determines if a list or split displays odd-numbered rows in one style and even-numbered rows in another.

Syntax

[VB]

Public AlternatingRows As Boolean

[C#]

public bool AlternatingRows {get; set;}

[Delphi]

property AlternatingRows: Boolean;

Remarks

If True, the OddRowStyle and EvenRowStyle properties control the appearance of rows within the specified object.

If False (the default), the Style property controls the display of rows within the specified object.

At design time, you can change the colors and fonts used to render odd (even) rows by modifying the built-in OddRow (EvenRow) style using the Styles property page.

At run time, you can change the colors and fonts used to render odd (even) rows by modifying the Style object returned by the OddRowStyle (EvenRowStyle) property.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AlternatingRowStyle Property

AlternatingRowStyle Property

Determines if a split displays odd-numbered rows in one style and even-numbered rows in another.

Syntax

[VB]

Public AlternatingRowStyle As Boolean

[C#]

public bool AlternatingRowStyle {get; set;}

[Delphi]

property AlternatingRowStyle: Boolean;

Remarks

If True, the OddRowStyle and EvenRowStyle properties control the appearance of rows within the specified object.

If False (the default), the Style property controls the display of rows within the specified object.

At design time, you can change the colors and fonts used to render odd (even) rows by modifying the built-in OddRow (EvenRow) style using the Styles property page.

At run time, you can change the colors and fonts used to render odd (even) rows by modifying the Style object returned by the OddRowStyle (EvenRowStyle) property.

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AnnotatePicture Property

AnnotatePicture Property

Specifies whether a column can display both text and graphics in a single cell.

Syntax

[VB]

Public AnnotatePicture As Boolean

[C#]

public bool AnnotatePicture {get; set;}

[Delphi]

property AnnotatePicture: Boolean;

Remarks

This property determines whether the column associated with a ValueItem can display both text and graphics in a single cell.

If True, both text and graphics are displayed in a cell when all of the following conditions are met:

· The Presentation property of the ValueItems object is set to any value except RadioButton.

· The Translate property of the ValueItems object is set to True.

· The underlying data value for a cell matches the Value property of a ValueItem member.

· The corresponding DisplayValue contains a bitmap, not text.

If False (the default), matching cells are rendered as the Value or DisplayValue setting, depending on the value of the Translate property.

When both text and graphics are displayed, the horizontal placement of the bitmap with respect to the cell text is determined by the HorizontalAlignment and ForegroundPicturePosition properties of the column's Style object. For example, if HorizontalAlignment is set to Center, and ForegroundPicturePosition is set to Left, the bitmap is placed at the left edge of the cell, and the cell text is centered in the remaining space. For more information, see Displaying foreground pictures.

When editing, the editor uses all space available in the text portion of the cell. If the Presentation property is set to one of the combo box options, the bitmap will not change until editing is completed.

Note

In the ActiveX versions, ValueItems was a collection. In .NET ValueItems is an object that has properties and also exposes a collection of Value/DisplayValue pairs.

Use the ValueItems property to access the ValueItems object for a C1DataColumn object.

See Also

ValueItems Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BackColor Property

BackColor Property

Controls the background color of an object.

Syntax

[VB]

Public BackColor As Color

[C#]

public Color BackColor {get; set;}

[Delphi]

property BackColor: Color;

Remarks

This property controls the background color of an object. Colors may be specified as RGB values or system default colors.

The background color of a list, column, or split is determined by its Style property setting. For these objects, the BackColor property is a shortcut to the BackColor member of the Style property.

For Style objects, the value of the BackColor property is inherited from the parent style (if any) unless explicitly overridden.

NOTE: Changing this property will not affect the NormalStyle.BackColor property.

See Also

C1Combo Object

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BackgroundImage Property

BackgroundImage Property

Sets or returns the background bitmap of a style object.

Syntax

[VB]

Public BackgroundImage As Image

[C#]

public Image BackgroundImage {get; set;}

[Delphi]

property BackgroundImage: Image;

Remarks

This property sets or returns the background bitmap of a style object. If a style has no background bitmap, then this property returns a null.

You can assign a bitmap to the BackgroundImage property in code at run time:

· Visual Basic

· C#

· Delphi

Note

Use the BackgroundPictureDrawMode property to control how the background bitmap is displayed when the style is applied to an object.

See Also

C1List Object

C1Combo Object

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BackgroundPictureDrawMode Property

BackgroundPictureDrawMode Property

Determines how a style's background bitmap is displayed when the style is applied to an object.

Syntax

[VB]

Public BackgroundPictureDrawMode as BackgroundPictureDrawModeEnum

[C#]

public BackgroundPictureDrawModeEnum BackgroundPictureDrawMode {get; set;}

[Delphi]

property BackgroundPictureDrawMode: BackgroundPictureDrawModeEnum;

Remarks

This property determines how a style's background bitmap is displayed when the style is applied to a data cell, header, footer, or caption bar.

Member Name | Description
Center | The background bitmap is centered within the object to which the style is applied.
Tile | The background bitmap is drawn repeatedly, starting at the upper left corner of the object, until the entire area is filled.
Stretch | The bitmap displayed is resized to fit the area occupied by the object. The original bitmap is not altered.

Note

Use the BackgroundImage property to specify a background bitmap for a style.

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Bookmark Property

Bookmark Property

Returns or sets the bookmark identifying the current row in the list.

Syntax

[VB]

Public Property Bookmark As Integer

[C#]

public int Bookmark {get; set;}

[Delphi]

property Bookmark: Integer;

Remarks

Use the value returned by the Bookmark property to save a reference to the current row that remains valid even after another row becomes current.

When you set the Bookmark property to a valid value in code, the row associated with that value becomes the current row, and the list adjusts its display to bring the new current row into view if necessary.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Borders Property

Borders Property

Sets the style, color, and width for a set of cell borders.

Syntax

[VB]

Public Property Borders As CellBorders

[C#]

public CellBorders Borders {get; set;}

[Delphi]

property Borders: CellBorders;

Remarks

Every Style has a Borders property which allows you to alter the cell borders for the cells that have been applied with that style. The five properties that make up the CellBorders object set the line width for each side of the cell and set its line style. In addition, it also lets you set the color of the cell border to any color within .NET.

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BorderStyle Property

BorderStyle Property

Sets or returns the border style for the control.

Syntax

[VB]

Public BorderStyle As System.Windows.Forms.BorderStyle

[C#]

public System.Windows.Forms.BorderStyle BorderStyle {get; set;}

[Delphi]

property BorderStyle: System.Windows.Forms.BorderStyle;

Remarks

This property determines whether a C1List control has a border.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BorderType Property

BorderType Property

Sets or returns the type of border.

Syntax

[VB]

Public Property BorderType As C1.Win.C1List.BorderTypeEnum

[C#]

public BorderTypeEnum BorderType {get; set;}

[Delphi]

property BorderType: BorderTypeEnum;

See Also

CellBorders Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Bottom Property

Bottom Property

Sets the width of the bottom cell border.

Syntax

[VB]

Public Bottom As Integer

[C#]

public int Bottom {get; set;}

[Delphi]

property Bottom: Integer;

Remarks

One of the five properties of CellBorders. This property sets the width of the bottom cell border to the integer specified.

See Also

CellBorders Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ButtonFooter Property

ButtonFooter Property

Specifies whether the column footer is also a button.

Syntax

[VB]

Public ButtonFooter As Boolean

[C#]

public bool ButtonFooter {get; set;}

[Delphi]

property ButtonFooter: Boolean;

Remarks

If True, the column footer depresses like a standard Windows command button when clicked by the user.

If False (the default), the column footer does not change its appearance when clicked by the user.

Typically, you set the ButtonFooter property to True when you want to perform a column-based action (such as summation) when the user clicks a column footer. Note that the ColFootClick event always fires when the user clicks a column footer, even if ButtonFooter is False.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ButtonHeader Property

ButtonHeader Property

Specifies whether the column header is also a button.

Syntax

[VB]

Public ButtonHeader As Boolean

[C#]

public bool ButtonHeader {get; set;}

[Delphi]

property ButtonHeader: Boolean;

Remarks

If True, the column header depresses like a standard Windows command button when clicked by the user.

If False (the default), the AllowColSelect property determines how the column header responds to mouse input.

Typically, you set the ButtonHeader property to True when you want to perform a column-based action (such as sorting) when the user clicks a column header. Note that the ColHeadClick event always fires when the user clicks a column header, even if ButtonHeader is False.

Note

If ButtonHeader is True, the user must hold down the Ctrl key in order to select columns with the mouse.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Caption Property

Caption Property

Returns or sets the caption for the list.

Syntax

[VB]

Public Caption As System.String

[C#]

public string Caption {get; set;}

[Delphi]

property Caption: string;

Remarks

For a C1List control, this property determines the text displayed in the caption bar at the top of the list.

Setting the Caption property to an empty string for a C1List control hides its caption bar.

For a C1DataColumn object, this property determines the text displayed in the object's heading area.

Setting the Caption property to an empty string for a C1DataColumn object clears the text in the column's heading area but does not hide the heading. Column captions are only displayed if the list's ColumnHeaders property is set to True.

Setting the Caption property to an empty string for a Split object hides the heading area, even if other splits have non-empty captions.

See Also

C1List Object

C1Combo Object

C1DataColumn Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CaptionHeight Property

CaptionHeight Property

Sets or returns the height of the list caption area.

Syntax

[VB]

Public CaptionHeight As Integer

[C#]

public int CaptionHeight {get; set;}

[Delphi]

property CaptionHeight: Integer;

Remarks

This property requires that the Caption property of the list has a value.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CaptionStyle Property

CaptionStyle Property

Sets or returns the Style object that controls the appearance of the caption area.

Syntax

[VB]

Public CaptionStyle As Style

[C#]

public Style CaptionStyle {get; set;}

[Delphi]

property CaptionStyle: Style;

Remarks

This property sets or returns the Style object that controls the appearance of a C1List control's caption bar or a Split object's heading area. By default, this is the built-in Caption style.

The value of the Caption property is not affected by changes to the CaptionStyle property.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellTips Property

CellTips Property

Determines whether the list displays a pop-up text window when the cursor is idle.

Syntax

[VB]

Public CellTips as CellTipEnum

[C#]

public CellTipEnum CellTips {get; set;}

[Delphi]

property CellTipEnum: CellTips;

Remarks

The CellTips property determines whether the list displays a pop-up text window when the cursor is idle. By default, this property is set to NoCellTips, and cell tips are not displayed.

Member Name | Description
NoCellTips | No cell tips will be applied.
Anchored | Celltip will be anchored to the cell.
Floating | Celltip will be floating near the cell.

If the CellTips property is set to either Anchored or Floating, the FetchCellTips event will be fired whenever the list has focus and the cursor is idle over a list cell, record selector, column header, split header, or list caption. The event will not fire if the cursor is over the scroll bars.

The setting Anchored aligns the cell tip window with either the left or right edge of the cell. The left edge is favored, but the right edge will be used if necessary in order to display as much text as possible.

The setting Floating displays the cell tip window below the cursor, if possible.

If you do not provide a handler for the FetchCellTips event, and the cursor is over a list cell, the default behavior is to display a text box containing the cell's contents (up to 256 characters). This enables the user to peruse the contents of a cell even if it is not big enough to be displayed in its entirety. You can also program the FetchCellTips event to override the default cell text display in order to provide users with context-sensitive help.

Note

Use the CellTipsDelay property to control the amount of idle time that must elapse before the cell tip window is displayed.

Use the CellTipsWidth property to control the width of the cell tip window.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellTipsDelay Property

CellTipsDelay Property

Determines the amount of time before the cell tip window is displayed.

Syntax

[VB]

Public CellTipsDelay As Integer

[C#]

public int CellTipsDelay {get; set;}

[Delphi]

property CellTipsDelay: Integer;

Remarks

The CellTipsDelay property controls the amount of idle time, in milliseconds, that must elapse before the cell tip window is displayed. By default, this property is set to 1000 (one second).

Setting this property to zero does not disable cell tips, but restores the default value of 1000. To disable cell tips, set the CellTips property to NoCellTips.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellTipsWidth Property

CellTipsWidth Property

Returns or sets the width of the cell tip window.

Syntax

[VB]

Public CellTipsWidth As Integer

[C#]

public int CellTipsWidth {get; set;}

[Delphi]

property CellTipsWidth: Integer;

Remarks

The CellTipsWidth property returns or sets the width of the cell tip window in terms of the coordinate system of the list's container.

By default, this property is set to zero, which causes the cell tip window to grow or shrink to accommodate the cell tip text. You can override this behavior and give the cell tip window a fixed width by specifying a non-zero value for this property.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellTop Property

CellTop Property

Returns the vertical offset of the top of any cell in the specified column.

Syntax

[VB]

Public ReadOnly Property CellTop As Integer

[C#]

public int CellTop {get;}

[Delphi]

property CellTop: Integer;

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Col Property

Col Property

Returns or sets the column position of the current cell.

Syntax

[VB]

Public Col As Integer

[C#]

public int Col {get; set;}

[Delphi]

property Col: Integer;

Remarks

This property specifies the zero-based index of the current cell's column position. It may be set at run time to highlight a different cell within the current row. If the column is visible, the caret or marquee will be moved to the selected column. If the column is not visible, the list will scroll to make it visible as a result of setting this property.

Setting the Col property at run time does not affect selected columns.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColCount Property

ColCount Property

Sets or returns how many horizontal splits in the collection.

Syntax

[VB]

Public ReadOnly Property ColCount As Integer

[C#]

public int ColCount {get;}

[Delphi]

property ColCount: Integer;

See Also

SplitCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Color Property

Color Property

Returns or sets the color characteristic for an object.

Syntax

[VB]

Public Color As Color

[C#]

public Color Color {get; set;}

[Delphi]

property Color: Color;

See Also

CellBorders Object

GridLines Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnCaptionHeight Property

ColumnCaptionHeight Property

Sets or returns the height of the column headers.

Syntax

[VB]

C1List1.ColumnCaptionHeight = 30

[C#]

public int ColumnCaptionHeight {get; set;}

[Delphi]

property ColumnCaptionHeight: Integer;

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnDivider Property

ColumnDivider Property

Determines the style of the border drawn between Columns rows.

Syntax

[VB]

Public ColumnDivider As GridLines

[C#]

public GridLines ColumnDivider {get; set;}

[Delphi]

property ColumnDivider: GridLines;

Remarks

This property determines the style of the border drawn between list columns.

The ColumnDivider property does not control whether columns can be resized by dragging their border. Use the AllowSizing property to control this behavior.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnFooterHeight Property

ColumnFooterHeight Property

Sets or returns the height of the column footers.

Syntax

[VB]

C1List1.ColumnFooterHeight = 30

[C#]

public int ColumnFooterHeight {get; set;}

[Delphi]

property ColumnFooterHeight: Integer;

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnFooters Property

ColumnFooters Property

Specifies whether footers are displayed.

Syntax

[VB]

Public ColumnFooters As Boolean

[C#]

public bool ColumnFooters {get; set;}

[Delphi]

property ColumnFooters: Boolean;

Remarks

If True, the control's column footers are displayed.

If False (the default), the control's column footers are not displayed.

Use the FooterText property to set the footing text of an individual column.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnHeaders Property

ColumnHeaders Property

Specifies whether headers are displayed.

Syntax

[VB]

Public ColumnHeaders As Boolean

[C#]

public bool ColumnHeaders {get; set;}

[Delphi]

property ColumnHeaders: Boolean;

Remarks

If True (the default), the control's column headers are displayed.

If False, the control's column headers are not displayed.

Use the Caption property to set the heading text of an individual Column.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Columns Property

Columns Property

Returns a collection of C1DataColumn objects.

Syntax

[VB]

Public Columns As C1DataColumnCollection

[C#]

public C1DataColumnCollection Columns {get;}

[Delphi]

property Columns: C1DataColumnCollection;

Remarks

This property returns a collection of C1DataColumn objects for a list or drop-down control.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnWidth Property

ColumnWidth Property

Sets or returns the column width for each column in the control.

Syntax

[VB]

Public ColumnWidth As Integer

[C#]

public int ColumnWidth {get; set;}

[Delphi]

property ColumnWidth: Integer;

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataChanged Property

DataChanged Property

Returns a value indicating that the data in the bound control has been changed.

Syntax

[VB]

Public ReadOnly Property DataChanged As Boolean

[C#]

public bool DataChanged {get;}

[Delphi]

property DataChanged: Boolean;

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataColumn Property

DataColumn Property

Returns the C1DataColumn object.

Syntax

[VB]

Public ReadOnly Property DataColumn As C1.Win.C1List.C1DataColumn

[C#]

public C1DataColumn DataColumn {get;}

[Delphi]

property DataColumn: C1DataColumn;

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataField Property

DataField Property

Sets or returns the name of the field in the database table to which a list column is bound.

Syntax

[VB]

Public Property DataField As String

[C#]

public string DataField {get; set;}

[Delphi]

property DataField: string;

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataMember Property

DataMember Property

Returns or sets the name of the data member used to populate the control.

Syntax

[VB]

Public Property DataMember As String

[C#]

public string DataMember {get; set;}

[Delphi]

property DataMember: string;

Remarks

This property returns or sets the name of the data member used to populate the control. Typically, a data member represents a database table or query.

A bound DataSource can expose multiple sets of data that consumers can bind to. Each set of data is called a data member, and is identified by a unique string.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataMode Property

DataMode Property

Specifies the normal or additem mode.

Syntax

[VB]

Public Property DataMode As C1.Win.C1List.DataModeEnum

[C#]

public DataModeEnum DataMode {get; set}

[Delphi]

property DataMode: DataModeEnum;

Remarks

Member Name | Description
Normal | The control displays data available from its bound DataSource.
AddItem | The list portion of the control is populated with data via the AddItem method. The first item added starts at zero. When in AddItem mode, the DataSource and DataMember properties are ignored.

Note

There will be no impact if changing the DataMode property at runtime.

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataSource Property

DataSource Property

Specifies the data source object used to bind the control to.

Syntax

[VB]

Public DataSource As Object

[C#]

public object DataSource {get; set;}

[Delphi]

property DataSource: Object;

Remarks

The DataSource property specifies the data control used to bind a C1List or C1Combo control to a database.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataView Property

DataView Property

Returns or sets the method by which the list will display data.

Syntax

[VB]

Public DataView As DataViewEnum

[C#]

public DataViewEnum DataView {get; set;}

[Delphi]

property DataView: DataViewEnum;

Remarks

The DataView property returns or sets the method by which the list will display data.

Member Name | Description
Normal | The list will only display flat files and will not support a hierarchical view. If the data source is a hierarchical dataset, the list will only display data from the master table.
MultipleLines | The list will display all the fields in the current list area with multiple lines. Columns that would have occluded by the bounds of the list are all displayed in the current list area.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataWidth Property

DataWidth Property

Holds the database width, in bytes, for a list column.

Syntax

[VB]

Public DataWidth As Integer

[C#]

public int DataWidth {get; set;}

[Delphi]

property DataWidth: Integer;

Remarks

This property is set to the appropriate field width (not display width) automatically when the layout of a bound list is initialized at run time.

This property does not affect the physical size of a column, but imposes a limit on the number of characters that may be entered when editing a cell. If set to 0, no such limits are imposed. Setting this property does not cause truncation of existing data.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DeadAreaBackColor Property

DeadAreaBackColor Property

Controls the background color of the dead area in the list.

Syntax

[VB]

Public DeadAreaBackColor As Color

[C#]

public Color DeadAreaBackColor {get; set;}

[Delphi]

property DeadAreaBackColor: Color;

Remarks

Colors may be specified as RGB values or system default colors.

Setting this property will affect the appearance of the "dead area" of under populated controls, such as the area to the right of the last column, the area below the last data row, and the Outlook Grouping area.

Note

If the EmptyRows property is True, the empty data rows it creates are not considered part of the "dead area" and will not be displayed in the DeadAreaBackColor. If you wish for the area occupied by the empty rows to be shown in the DeadAreaBackColor, you should first set the EmptyRows property to False.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DefaultItem Property

DefaultItem Property

Sets or returns the zero-based index of the default item for a ValueItems object associated with a column..

Syntax

[VB]

Public DefaultItem As Integer

[C#]

public int DefaultItem {get; set;}

[Delphi]

property DefaultItem: Integer;

Remarks

The default value for this property is -1, which is used to indicate that there is no default item.

Use the DefaultItem property to provide an alternate display for data values not present in the ValueItems object.

When the DefaultItem property is set to a valid collection index (an integer between 0 and Count – 1 inclusive), then the corresponding ValueItem is displayed when the list encounters a value which is not present in the ValueItems object.

When the DefaultItem property is set to -1, then the list will not substitute a ValueItem when it encounters a value which is not present in the ValueItems object.

A trappable error will occur if you attempt to set this property to an invalid value.

Note

In the ActiveX versions, Valueitems was a collection. In .NET ValueItems is an object that has properties and also exposes a collection of Value/DisplayValue pairs.

Use the ValueItems property to access the ValueItems object for a C1DataColumn object.

See Also

ValueItems Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DefaultValue Property

DefaultValue Property

Sets or returns the default value of an unbound list column in a bound list.

Syntax

[VB]

Public Property DefaultValue As String

[C#]

public string DefaultValue {get; set;}

[Delphi]

property DefaultValue: string;

Remarks

This property returns or sets the default value of an unbound list column in a bound list. Unbound columns are typically used to display calculated fields or local data not maintained by the primary data source.

This property applies only to unbound columns. The value specified will be preloaded into the last argument passed to the UnboundColumnFetch event.

The DefaultValue property can also be used to identify specific columns in the UnboundColumnFetch event when columns are added, moved, or removed at run time.

This property can also be used as a tag for a column (whether it is bound or unbound). Arbitrary values can be stored and retrieved later.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DefColWidth Property

DefColWidth Property

Specifies column width for auto-created columns.

Syntax

[VB]

Public DefColWidth As Integer

[C#]

public int DefColWidth {get; set;}

[Delphi]

property DefColWidth: Integer;

Remarks

This property returns or sets the default width for all list columns in terms of the coordinate system of the list's container.

For bound lists, the DefColWidth property is respected under the following circumstances:

· When the list's layout is initialized at run time.

· When a new column is created at run time.

If you set the DefColWidth property to 0, the list automatically sizes all columns based on either the width of the column heading or the display width of the underlying field, whichever is larger. For example, to set the default column width to the width of the first column:

· Visual Basic

· C#

· Delphi

Note

Setting the DefColWidth property at run time does not affect existing columns, only those that are subsequently created in code.

In bound mode, some data sources do not provide text field widths when requested by the list. Therefore, if DefColWidth is 0, the actual column widths may not be what you expect since the list must supply a default width.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DestinationCol Property

DestinationCol Property

Indicates which list column will be the destination after cell movement.

Syntax

[VB]

Public DestinationCol As Integer

[C#]

public int DestinationCol {get;}

[Delphi]

property DestinationCol: Integer;

Remarks

This property is used when moving from one cell to another in the list. The value returned is the zero-based index of the column containing the destination cell. If you click outside of the column data area, DestinationCol returns -1.

This property is available only during those events related to cell movement: Click, DoubleClick, ColFootClick, ColHeadClick, MouseDown, MouseUp. Any attempt to access the DestinationCol property outside of these events results in a trappable error ("Property not available in this context").

The property can only be used if the movement is initiated interactively by the user, via the keyboard or mouse. The property is not available when movement is initiated programmatically (for example, when setting the list's Col property).

Note

Care must be exercised when using this property, because it is possible to use the value of this property in an event (such as MouseDown) before knowing whether or not the movement will actually succeed. The value returned by this property only indicates what the correct destination column will be if the cell movement is successful.

The DestinationCol property does not guarantee that the cell movement will succeed (for example, movement may fail if the contents of the current cell are not valid). In such cases, the DestinationCol property will not reflect the actual destination position (usually the cell position will remain at the previous location).

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DestinationRow Property

DestinationRow Property

Indicates which list row will be the destination after cell movement.

Syntax

[VB]

Public DestinationRow As Integer

[C#]

public int DestinationRow {get;}

[Delphi]

property DestinationRow: Integer;

Remarks

This property is used when moving from one cell to another in the list. The value returned is the bookmark of the row containing the destination cell. If you click outside any visible row (for example, on the header), DestinationRow returns Null. If you click the AddNew row, DestinationRow returns "" (empty string).

This property is available only during those events related to cell movement: Click, DoubleClick, ColFootClick, ColHeadClick, MouseDown, MouseUp. Any attempt to access the DestinationRow property outside of these events results in a trappable error ("Property not available in this context").

The property can only be used if the movement is initiated interactively by the user, via the keyboard or mouse. The property is not available when movement is initiated programmatically.

Note

Care must be exercised when using this property, because it is possible to use the value of this property in an event (such as MouseDown) before knowing whether or not the movement will actually succeed. The value returned by this property only indicates what the correct destination row will be if the cell movement is successful.

The DestinationRow property does not guarantee that the cell movement will succeed (for example, movement may fail if contents of the current cell are not valid). In such cases, the DestinationRow property will not reflect the actual destination position (usually the cell position will remain at the previous location).

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DestinationSplit Property

DestinationSplit Property

Indicates which list split will be the destination after cell movement.

Syntax

[VB]

Public DestinationSplit As Integer

[C#]

public int DestinationSplit {get;}

[Delphi]

property DestinationSplit: Integer;

Remarks

This property is used when moving from one cell to another in the list. The value returned is the zero-based index of the split containing the destination cell. In the case of a click on an area of the list not belonging to any split, such as the corner between the vertical and horizontal scrollbars, or on a split border, DestinationSplit returns -1.

This property is available only during those events related to cell movement: Click, DoubleClick, ColFootClick, ColHeadClick, MouseDown, MouseUp. Any attempt to access the DestinationSplit property outside of these events results in a trappable error ("Property not available in this context").

The property can only be used if the movement is initiated interactively by the user, via the keyboard or mouse. The property is not available when movement is initiated programmatically (for example, when setting the list's Split property).

Note

Care must be exercised when using this property, because it is possible to use the value of this property in an event (such as MouseDown) before knowing whether or not the movement will actually succeed. The value returned by this property only indicates what the correct destination split will be if the cell movement is successful.

The DestinationSplit property does not guarantee that the cell movement will succeed (for example, movement may fail if the contents of the current cell are not valid). In such cases, the DestinationSplit property will not reflect the actual destination position (usually the cell position will remain at the previous location).

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DisplayColumns Property

DisplayColumns Property

Returns a collection of C1DisplayColumn objects.

Syntax

[VB]

Public DisplayColumns As C1DisplayColumnCollection

[C#]

public C1DisplayColumnCollection DisplayColumns {get;}

[Delphi]

property DisplayColumns: C1DisplayColumnCollection;

Remarks

This Split property returns its collection of DisplayColumns. This collection can be also modified in the C1DisplayColumnCollection editor.

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DisplayMember Property

DisplayMember Property

Returns or sets the name of the column used for incremental search within a C1List or C1Combo control.

Syntax

[VB]

object.DisplayMember = string

[C#]

public string DisplayMember {get; set;}

[Delphi]

property DisplayMember: string;

Remarks

If the DisplayMember property is not specified, the first column in the control will be used for both incremental search and the selection value.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DisplayValue Property

DisplayValue Property

Sets or returns the translated data value for a member of a ValueItems object.

Syntax

[VB]

Public DisplayValue As Object

[C#]

public object DisplayValue {get; set;}

[Delphi]

property DisplayValue: Object;

Remarks

The DisplayValue property may be set to a string that specifies the mapping between the underlying data value and its displayed representation. It may also be set to a picture, such as that returned by the LoadPicture function in Visual Basic.

If the DisplayValue property is not explicitly set, it returns the same result as the Value property.

Use the ValueItems property to access the ValueItems collection for a C1DataColumn object.

See Also

ValueItem Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


EmptyRows Property

EmptyRows Property

Returns or sets a value that determines how the list displays rows below the last data row.

Syntax

[VB]

Public EmptyRows As Boolean

[C#]

public bool EmptyRows {get; set;}

[Delphi]

property EmptyRows: Boolean;

Remarks

If all of the records in the data source do not fill up the entire list, setting EmptyRows to True will fill the unpopulated list area with empty data rows. If EmptyRows is False (the default), then the unpopulated list area will be blank and will be filled with the system 3D Objects color (or the system Button Face color) as determined by your Control Panel settings.

Note

The RowDivider property applies to data rows and empty rows alike. You cannot suppress row dividers for just the empty rows when EmptyRows is True.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Enabled Property

Enabled Property

Returns or sets a value that determines whether a control can respond to user-generated events.

Syntax

[VB]

object.Enabled = boolean

[C#]

public bool Enabled {get; set;}

[Delphi]

property Enabled: Boolean;

Remarks

If True (the default), the user can give focus to the control and manipulate it with the keyboard or mouse.

If False, the user cannot manipulate the control directly.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


EvenRowStyle Property

EvenRowStyle Property

Sets or returns the Style object that controls the appearance of an even-numbered row.

Syntax

[VB]

Public EvenRowStyle As Style

[C#]

public Style EvenRowStyle {get; set;}

[Delphi]

property EvenRowStyle: Style;

Remarks

This property sets or returns the Style object that controls the appearance of an even-numbered row in a list or split where the AlternatingRows property is set to True. By default, this is the built-in EvenRow style.

To change the appearance of odd-numbered rows, set the OddRowStyle property.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ExtendRightColumn Property

ExtendRightColumn Property

Sets or returns whether the last column will extend to fill the dead area of the list.

Syntax

[VB]

Public ExtendRightColumn As Boolean

[C#]

public bool ExtendRightColumn {get; set;}

[Delphi]

property ExtendRightColumn: Boolean;

Remarks

If the columns in the list don’t take up all of the space available, then there is an area which is exposed. This area is called the dead area and has a default back color of gray. This property sets whether this area is to be filled with the last column of the list.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyles Property

FetchRowStyles Property

Specifies whether the FetchRowStyle event will be fired.

Syntax

[VB]

Public FetchRowStyles As Boolean

[C#]

public bool FetchRowStyles {get; set;}

[Delphi]

property FetchRowStyles: Boolean;

Remarks

If True, the FetchRowStyle event will be fired whenever the list is about to display a row of data.

If False (the default), the FetchRowStyle event is not fired.

Set this value to True when you need to perform complex per-row formatting operations that can only be done using the FetchRowStyle event. For example, if you want to apply fonts and/or colors to all rows that satisfy certain criteria, then you need to set the FetchRowStyles property to True and write code for the FetchRowStyle event.

Note

To display every other row in a different color or font, you can simply set the AlternatingRows property to True.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchStyle Property

FetchStyle Property

Specifies whether the FetchCellStyle event will be fired.

Syntax

[VB]

Public FetchStyle As Boolean

[C#]

public bool FetchStyle {get; set;}

[Delphi]

property FetchStyle: Boolean;

Remarks

If True, the FetchCellStyle event will be fired as needed to determine the font and color characteristics of each cell in the associated column.

If False (the default), the FetchCellStyle event will not be fired.

Set this value to True when you need to perform complex per-cell formatting operations that can only be done using the FetchCellStyle event. For example, if you want to apply fonts and/or colors to cells within a certain range, or cells that satisfy a complex expression, then you need to set FetchStyle to True for the desired column(s) and write code for the FetchCellStyle event.

Note

If you want to apply the same formatting to all cells within a row, then you should set the FetchRowStyles property instead of FetchStyle, and write code for the FetchRowStyle event instead of FetchCellStyle. This is much more efficient because events are fired on a per-row rather than on a per-cell basis.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FirstRow Property

FirstRow Property

Returns or sets a value containing the bookmark for the first visible row in a grid or split.

Syntax

[VB]

Public Property FirstRow As Integer

[C#]

public int FirstRow {get; set;}

[Delphi]

property FirstRow: Integer;

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FlatStyle Property

FlatStyle Property

Determines the appearance of the list.

Syntax

[VB]

Public FlatStyle As FlatModeEnum

[C#]

public FlatModeEnum FlatStyle {get; set;}

[Delphi]

property FlatStyle: FlatModeEnum;

Remarks

The FlatStyle property determines the appearance of the list.

Member Name | Description
Flat | Takes away all three-dimensional features of the list and gives it a plain flat appearance.
PopUp | Looks similar to the Flat FlatStyle, but when the user drags the cursor over a column heading or record selector, they become three-dimensional and appear to pop up.
Standard | The default. The Standard FlatStyle gives the list’s column headers and record selectors an inset three-dimensional look.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Font Property (Style)

Font Property (Style)

Sets the font object associated with a style.

Syntax

[VB]

Public Font As Font

[C#]

public Font Font {get; set;}

[Delphi]

property Font: Font;

Remarks

For Style objects, the value of the Font property is inherited from the parent style (if any) unless explicitly overridden.

See Also

C1List Object

C1Combo Object

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FooterDivider Property

FooterDivider Property

Specifies whether the right edge of the column's footer is drawn with a vertical dividing line.

Syntax

[VB]

Public FooterDivider As Boolean

[C#]

public bool FooterDivider {get; set;}

[Delphi]

property FooterDivider: Boolean;

Remarks

If True (the default), the right edge of the column's footer is drawn with a vertical dividing line.

If False, no dividing line is drawn in the column's header area.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FooterStyle Property

FooterStyle Property

Returns the Style object that controls the appearance of column footers within a list, column, or split.

Syntax

[VB]

Public FooterStyle As Style

[C#]

public Style FooterStyle {get; set;}

[Delphi]

property FooterStyle: Style;

Remarks

By default, this is the built-in Footing style.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FooterText Property

FooterText Property

Sets or returns the text displayed in the column's footing area.

Syntax

[VB]

Public FooterText As String

[C#]

public string FooterText {get; set;}

[Delphi]

property FooterText: string;

Remarks

Setting the FooterText property to an empty string clears the text in the column's footing area but does not hide the footing. Column footings are only displayed if the list's ColumnFooters property is set to True and the ColumnFooterHeight property is not set to 0.

The FooterText property is limited to 255 characters. Attempting to set the footer text to more than 255 characters results in a trappable error.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ForeColor Property

ForeColor Property

Specifies the foreground color of an object.

Syntax

[VB]

Public ForeColor As Color

[C#]

public Color ForeColor {get; set;}

[Delphi]

property ForeColor: Color;

Remarks

Colors may be specified as RGB values or system default colors.

For Style objects, the value of the ForeColor property is inherited from the parent style (if any) unless explicitly overridden.

See Also

C1List Object

C1Combo Object

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ForegroundImage Property

ForegroundImage Property

Sets or returns the foreground bitmap of a style object.

Syntax

[VB]

Public ForegroundImage As Image

[C#]

public Image ForegroundImage {get; set;}

[Delphi]

property ForegroundImage: Image;

Remarks

If a style has no foreground bitmap, then this property returns a null variant.

You can change a style's foreground bitmap at design time using the Style Factory property page. Or, you can assign a bitmap to the ForegroundImage property in code at run time:

· Visual Basic

· C#

· Delphi

Note

Use the ForegroundPicturePosition property to control the placement of the bitmap relative to the cell or heading text when the style is applied to an object.

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ForegroundPicturePosition Property

ForegroundPicturePosition Property

Determines where a style's foreground bitmap is displayed when the style is applied to an object.

Syntax

[VB]

Public ForeGroundPicturePosition As ForegroundPicturePositionEnum

[C#]

public ForegroundPicturePositionEnum ForeGroundPicturePosition {get; set;}

[Delphi]

property ForeGroundPicturePosition: ForegroundPicturePositionEnum;

Remarks

This property determines where a style's foreground bitmap is displayed when the style is applied to a data cell, header, footer, or caption bar.

Member Name | Description
Near | Positions text on far side of cell
Far | Positions text on near side of cell
LeftOfText | Positions Foreground picture to the left of the cell text
RightOfText | Positions Foreground picture to the right of the cell text
TopOfText | Positions Foreground picture on top of the cell text
BottomOfText | Positions Foreground picture below the cell text
PictureOnly | Foreground picture is only display object included
TextOnly | Text is only display object included

Note

Use the ForegroundImage property to specify a foreground bitmap for a style.

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HeaderDivider Property

HeaderDivider Property

Specifies whether the right edge of the column's header is drawn with a vertical dividing line.

Syntax

[VB]

Public HeaderDivider As Boolean

[C#]

public bool HeaderDivider {get; set;}

[Delphi]

property HeaderDivider: Boolean;

Remarks

If True (the default), the right edge of the column's header is drawn with a vertical dividing line.

If False, no dividing line is drawn in the column's header area.

Note

Setting this property to False does not prevent the user from resizing the column. Set the AllowSizing property to False to disable column resizing.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HeadingStyle Property

HeadingStyle Property

Returns the Style object that controls the appearance of column heading.

Syntax

[VB]

Public HeadingStyle As Style

[C#]

public Style HeadingStyle {get; set;}

[Delphi]

property HeadingStyle: Style;

Remarks

This property returns the Style object that controls the appearance of column headings within a list, column, or split. By default, this is the built-in Heading style.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Height Property

Height Property

Height of columns.

Syntax

[VB]

Public Height as Integer

[C#]

public int Height {get; set;}

[Delphi]

property Height: Integer;

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HighlightRowStyle Property

HighlightRowStyle Property

Returns the Style object that controls the appearance of the highlighted row.

Syntax

[VB]

Public HighlightRowStyle As Style

[C#]

public Style HighlightRowStyle {get; set;}

[Delphi]

property HighlightRowStyle: Style;

Remarks

This property sets or returns the Style object that controls the appearance of a highlighted row . By default, this is the built-in HighlightRow style.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HorizontalAlignment Property

HorizontalAlignment Property

Sets or returns a value that determines the horizontal alignment of the values in an object.

Syntax

[VB]

Public HorizontalAlignment As AlignHorzEnum

[C#]

public AlignHorzEnum HorizontalAlignment {get; set;}

[Delphi]

property HorizontalAlignment: AlignHorzEnum;

Remarks

The HorizontalAlignment property returns or sets a value that determines the horizontal alignment of the values in a list column or style object.

Member Name | Description
General | Sets cell text to be left-aligned and numbers to be right-aligned.
Near | Aligns cell text to the near side of the cell (left side in left-to-right mode).
Center | Aligns text in a cell to the center.
Far | Aligns cell text to the far side of the cell (right side in left-to-right mode).
Justify | Spreads text throughout cell.

For data cells, the setting General means that text will be left-aligned and numbers will be right-aligned. This setting is only useful in bound mode, where the list can query the data source to determine the data types of individual columns.

For column headers and footers, the setting General means that the alignment of the column's data cells should be used. Thus, if a column's data cells, headers, and footers all use general alignment, then the underlying data type determines the alignment for all aspects of the column's display.

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HorizontalScrollGroup Property

HorizontalScrollGroup Property

Synchronizes horizontal scrolling between splits.

Syntax

[VB]

Public HorizontalScrollGroup As Integer

[C#]

public int HorizontalScrollGroup {get; set;}

[Delphi]

property HorizontalScrollGroup: Integer;

Remarks

All splits with the same ScrollGroup setting will be synchronized when horizontal scrolling occurs within any one of them. Splits belonging to different groups can scroll independently, allowing different splits to display different parts of the database.

Note

Setting the TopIndex property for one split affects all other splits in the same group, keeping the group synchronized.

Newly created splits have a ScrollGroup value of 1.

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HScrollBar Property

HScrollBar Property

Returns the HBar object that controls the appearance of the horizontal scrollbar.

Syntax

[VB]

Public HScrollBar As HBar

[C#]

public HBar HScrollBar {get; }

[Delphi]

property HScrollBar: HBar;

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


InactiveStyle Property

InactiveStyle Property

Returns the InactiveStyle Style object.

Syntax

[VB]

Public InactiveStyle As Style

[C#]

public Style InactiveStyle {get; set;}

[Delphi]

property InactiveStyle: Style;

Remarks

This property returns the Style object that controls the appearance of column headings within a list or split when another object has focus.

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


IntegralHeight Property

IntegralHeight Property

Determines whether partial rows are displayed in a C1List or C1Combo control.

Syntax

[VB]

object.IntegralHeight = boolean

[C#]

public bool IntegralHeight {get; set;}

[Delphi]

property IntegralHeight: Boolean;

Remarks

If True, partial rows are not displayed, and the height of the control will be reduced to eliminate the last partial row if necessary.

If False, partial rows are displayed, and the control retains its design-time height.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Item Property (GridStyleCollection)

Item Property (GridStyleCollection)

Exposes a specified item from the collection.

Syntax

[VB]

Default Public ReadOnly Property Item(ByVal index As Integer) As C1.Win.C1List.Style

[C#]

public Style Item {get;}

[Delphi]

property Item(index: Integer): Style;

See Also

GridStyleCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Item Property (SplitCollection)

Item Property (SplitCollection)

Exposes a specified item from the collection.

Syntax

[VB]

Default Public Property Item(ByVal index As Integer) As C1.Win.C1List.Split

Default Public Property Item(ByVal row As Integer, ByVal col As Integer) As C1.Win.C1List.Split

Default Public ReadOnly Property Item(ByVal name As String) As C1.Win.C1List.Split

[C#]

public Split this[int index] {get; set;}

public Split this[int row, int col] {get; set;}

public Split this[string name] {get;}

[Delphi]

property Item(index: Integer): Split;

property Item(row: Integer, col: Integer): Split

property Item(name: string): Split

Note

This is the indexer for the collection.

See Also

SplitCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Item Property (ValueItemCollection)

Item Property (ValueItemCollection)

Exposes a specified item from the collection.

Syntax

[VB]

Default Public Property Item(ByVal index As Integer) As ValueItem

[C#]

public ValueItem Item {get; set;}

[Delphi]

property Item(index: Integer): ValueItem;

See Also

ValueItemCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ItemHeight Property

ItemHeight Property

Returns or sets the height of all list rows.

Syntax

[VB]

Public ItemHeight As Integer

[C#]

public int ItemHeight {get; set;}

[Delphi]

property ItemHeight: Integer;

Remarks

The default value depends upon the character height of the current font.

A setting of 0 causes the list to readjust its display so that each row occupies a single line of text in the current font. Therefore, the following statements will set the row height so that exactly two lines of text are shown in each row:

· Visual Basic

· C#

· Delphi

If the control's AllowRowSizing property is set to True and the SelectionMode property is set to CheckBox, then the user can adjust the ItemHeight property at run time by dragging the row divider between any pair of checkboxes.

Note

Increasing the ItemHeight property does not wrap cell text at column boundaries unless the column Style’s WrapText property is True.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Left Property

Left Property

Sets the width of the left border of a cell.

Syntax

[VB]

Public Left As Integer

[C#]

public int Left {get; set}

[Delphi]

property Left: Integer;

Remarks

One of the five properties of CellBorders. This property sets the width of the left cell border to the integer specified.

See Also

CellBorders Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


LeftCol Property

LeftCol Property

Returns or sets the zero-based index of the leftmost column in a list or split.

Syntax

[VB]

Public LeftCol As Integer

[C#]

public int LeftCol {get; set;}

[Delphi]

property LeftCol: Integer;

Remarks

For a C1List or C1Combo control, setting the LeftCol property causes the list to scroll so that the specified column becomes the leftmost column. If a list contains multiple splits, then the leftmost column changes in each split.

For a Split object, setting the LeftCol property causes the specified column to become the leftmost column for that split only.

Use the LeftCol property in code to scroll a list or split horizontally. Use the TopIndex property to determine the bookmark of the first visible row in a list or split.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ListCount Property

ListCount Property

Returns the total row number for the control.

Syntax

[VB]

Dim cnt As Integer

cnt = C1List1.ListCount

[C#]

public int ListCount {get;}

[Delphi]

property ListCount: Integer;

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MatchCol Property

MatchCol Property

Sets the search column when the MatchEntry property is not None.

Syntax

[VB]

object.MatchCol = value

[C#]

public MatchColEnum MatchCol {set;}

[Delphi]

property MatchCol: MatchColEnum;

Remarks

The MatchCol property returns or sets the method by which the list will display data.

Member Name | Description
ListField | When this property is set to ListField, the search column is the current ListField. If the ListField is not set, the search column will be the first column.
CurrentMousePos | When this property is set to CurrentMousePos, the search column is the column where the mouse cursor is active.
CurrentSelectedCol | When this property is set to CurrentSelectedCol, the search column is the current selected column. If there is more than one selected column, the search column is the leftmost selected column.
LeftVisibleCol | When this property is set to LeftVisibleCol, the search column is the leftmost visible column.
RightVisibleCol | When this property is set to RightVisibleCol, the search column is the rightmost visible column.
AllCols | When this property is set to AllCols, the search columns are all the visible columns.

See Also

C1List Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MatchCompare Property

MatchCompare Property

Sets or returns the comparing mode for a search when the MatchEntry property is not set to None.

Syntax

[VB]

object.MatchCompare = value

[C#]

public MatchCompareEnum MatchCompare {get; set}

[Delphi]

property MatchCompare: MatchCompareEnum;

Remarks

The MatchCompare property returns or sets the method by which the list will display data. The search modes can be used to compare strings, numbers and dates.

Member Name | Description
LessThan | Used to search for strings, numbers and dates that are less than the stated value.
LessThanOrEqual | Used to search for strings, numbers and dates that are less than or equal to the stated value.
Equal | Used to search for strings, numbers and dates that are equal to the stated value.
GreaterThanOrEqual | Used to search for strings, numbers and dates that are greater than or equal to the stated value.
GreaterThan | Used to search for strings, numbers and dates that are greater than the stated value.
PartiallyEqual | PartiallyEqual is the default mode, which is the same as the incremental search.
IncludeEqual | Used to match a string inside another string.

See Also

C1List Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MatchEntry Property

MatchEntry Property

Returns or sets a value indicating how a C1List control performs searches based on user input.

Syntax

[VB]

C1List.MatchEntry = value

[C#]

public MatchEntryEnum MatchEntry {get; set;}

[Delphi]

property MatchEntry: MatchEntryEnum;

Remarks

The MatchEntry property returns or sets the method by which the list will display data.

Member Name | Description
None | The default. The control does not perform any incremental searches.
Standard | The search argument is limited to one character, and the control attempts to find a match for the character entered using the first letter of entries in the list. Repeatedly typing the same letter cycles through all of the entries in the list beginning with that letter.
Extended | The control searches for an entry matching all characters entered. The search is performed incrementally as characters are typed. The search argument is cleared when the user presses Backspace or hesitates for a few seconds.

Note

The MatchCol property determines which column is searched.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MatchEntryTimeout Property

MatchEntryTimeout Property

Returns or sets a value indicating the timeout value, in milliseconds, for incremental searching when a C1Combo control's ComboStyle property is set to DropdownList, or when a C1List control's MatchEntry property is set to Extended.

Syntax

[VB]

object.MatchEntryTimeout = long

[C#]

public long MatchEntryTimeout {get; set;}

[Delphi]

property MatchEntryTimeout: Long;

Remarks

The search is performed incrementally as characters are typed. If there is no keystroke after this time value, the incremental search will be reset, allowing the user to begin a new search.

For the C1Combo control, this means that the text entry box is cleared after the timeout period has passed, and new characters may be entered in their place.

For the C1List control, this means that after the timeout period has passed, the next characters entered will start a new search through the list.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MinWidth Property

MinWidth Property

Sets or returns the minimum width that a column can be sized to when the list is resized.

Syntax

[VB]

Public MinWidth As Integer

[C#]

public int MinWidth {get; set;}

[Delphi]

property MinWidth: Integer;

Remarks

This property returns or sets the minimum width that a column can be sized to when the list is resized and the SpringMode property is True.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


NumberFormat Property

NumberFormat Property

Sets or returns a value indicating the format string for a list column.

Syntax

[VB]

Public NumberFormat As String

[C#]

public string NumberFormat {get; set;}

[Delphi]

property NumberFormat: string;

Remarks

By default, the NumberFormat property contains an empty string, and column data is unformatted.

For numeric data, the following predefined format names can be used:

General Number | Display number as is, with no thousand separators.
Currency | Display number with thousand separator, if appropriate; display two digits to the right of the decimal separator. Note that output is based on system locale settings.
Fixed | Display at least one digit to the left and two digits to the right of the decimal separator.
Standard | Display number with thousands separator, at least one digit to the left and two digits to the right of the decimal separator.
Percent | Display number multiplied by 100 with a percent sign (%) appended to the right; always display two digits to the right of the decimal separator.
Scientific | Use standard scientific notation.
Yes/No | Display No if number is 0; otherwise, display Yes.
True/False | Display False if number is 0; otherwise, display True.
On/Off | Display Off if number is 0; otherwise, display On.

For date and time data, the following predefined format names can be used:

General Date | Display a date and/or time. For real numbers, display a date and time (for example, 4/3/93 05:34 PM); if there is no fractional part, display only a date (for example, 4/3/93); if there is no integer part, display only a time (for example, 05:34 PM). Date display is determined by your system settings.
Long Date | Display a date according to your system's long date format.
Medium Date | Display a date using the medium date format appropriate for the language version of Visual Basic.
Short Date | Display a date using your system's short date format.
Long Time | Display a time using your system's long time format: includes hours, minutes, seconds.
Medium Time | Display a time in 12-hour format using hours and minutes and the AM/PM designator.
Short Time | Display a time using the 24-hour format (for example, 17:45).

For arbitrary data, the following predefined format names can be used:

Edit Mask | Formats the data for display as well as editing.
FormatText Event | Fire the FormatText event for the associated column. This option allows you to write your own formatting code for situations where Visual Basic's intrinsic formatting is unavailable or does not suit your needs.

The NumberFormat property also accepts user-defined format strings. See the Microsoft Visual Basic documentation (Format function) for details.

If the NumberFormat property is set to an invalid string, cell data are displayed as #ERR#.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OddRowStyle Property

OddRowStyle Property

Returns the OddRowStyle Style object.

Syntax

[VB]

Public OddRowStyle As Style

[C#]

public Style OddRowStyle {get; set;}

[Delphi]

property OddRowStyle: Style;

Remarks

This property sets or returns the Style object that controls the appearance of an odd-numbered row in a list or split where the AlternatingRows property is set to True. By default, this is the built-in OddRow style.

To change the appearance of even-numbered rows, set the EvenRowStyle property.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDraw Property

OwnerDraw Property

Specifies whether the OwnerDrawCell event will be fired.

Syntax

[VB]

Public OwnerDraw As Boolean

[C#]

public bool OwnerDraw {get; set;}

[Delphi]

property OwnerDraw: Boolean;

Remarks

If True, the OwnerDrawCell event will be fired as needed to display the contents of each cell in the associated column.

If False (the default), the OwnerDrawCell event will not be fired.

Set this value to True when you need to perform complex per-cell display operations that can only be done using the OwnerDrawCell event. For example, if you want to display a metafile within a cell, then you need to set OwnerDraw to True for the desired column and write code for the OwnerDrawCell event.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PartialRightColumn Property

PartialRightColumn Property

Determines whether the rightmost column of a control or split is clipped to the object's right edge when it is scrolled into view but cannot be displayed in its entirety.

Syntax

[VB]

object.PartialRightColumn = boolean

[C#]

public bool PartialRightColumn {get; set}

[Delphi]

property PartialRightColumn: Boolean;

Remarks

If True (the default), the rightmost column will be clipped if the control or split is not wide enough to accommodate the entire column.

If False, the rightmost column will not be clipped while other columns are visible. In this case, the rightmost column must be scrolled into view as the only visible column in the control or split.

If a control contains multiple splits, then setting its PartialRightColumn property has the same effect as setting the PartialRightColumn property of each split individually.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Presentation Property

Presentation Property

Determines how the members of a ValueItems collection are displayed.

Syntax

[VB]

Public Presentation As PresentationEnum

[C#]

public PresentationEnum Presentation {get; set;}

[Delphi]

property Presentation: PresentationEnum;

Remarks

This property determines how the members of a ValueItems collection are displayed within the associated column.

Member Name | Description
Normal | Value items are displayed as text or graphics depending upon the setting of the DisplayValue and Translate properties.
RadioButton | Value items are displayed as a group of radio buttons within the cell.
CheckBox | Value items are displayed as a check box within the current cell.

Use the ValueItems property to access the ValueItems collection for a C1DataColumn object.

Note

If you are using setting CheckBox with boolean data, you do not need to add any members to the ValueItems collection, as boolean values are handled automatically.

See Also

ValueItems Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RecordSelectorStyle Property

RecordSelectorStyle Property

Returns the RecordSelector Style object.

Syntax

[VB]

Public Property RecordSelectorStyle As C1.Win.C1List.Style

[C#]

public Style RecordSelectorStyle {get; set;}

[Delphi]

property RecordSelectorStyle: Style;

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Right Property

Right Property

Sets the width of the right border of a cell.

Syntax

[VB]

Public Right As Integer

[C#]

public int Right {get; set;}

[Delphi]

property Right: Integer;

Remarks

One of the five properties of CellBorders. This property sets the width of the right cell border to the integer specified.

See Also

CellBorders Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RightToLeft Property

RightToLeft Property

Provides an appearance and functionality familiar to Middle East or Latin users.

Syntax

[VB]

object.RightToLeft = Boolean

[C#]

public bool RightToLeft {get; set;}

[Delphi]

property RightToLeft: Boolean;

Remarks

When the RightToLeft property is set to True:

· Control columns begin at the right boundary of the List.

· Fixed columns are located on the right side of the Control.

· LeftCol identifies the rightmost visible column (the first column beyond
the leftmost fixed column).

· Cell values (control Text property) have right to left reading order.

When the RightToLeft property is set to False, the control behavior is the same as described in the standard documentation.

· For C1Combo, the edit box will be on the right side of the
dropdown button.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Row Property

Row Property

Specifies the current row.

Syntax

[VB]

Public Row As Integer

[C#]

public int Row {get; set;}

[Delphi]

property Row: Integer;

Remarks

This property specifies the zero-based index of the current row relative to the first displayed row. It may be set at run time to highlight a different cell within the current column.

The Row property accepts values ranging from 0 to VisibleRows - 1. An error occurs if you attempt to set it to an invalid row index.

If the current row is not visible, then this property returns -1.

For a C1List control, changing the Row property at run time does not affect selected rows.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowCount Property

RowCount Property

Returns how many vertical splits are in the collection.

Syntax

[VB]

Public ReadOnly Property RowCount As Integer

[C#]

public int RowCount {get;}

[Delphi]

property RowCount: Integer;

See Also

SplitCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowDivider Property

RowDivider Property

Determines the style of the border drawn between list rows.

Syntax

[VB]

Public RowDivider As GridLines

[C#]

public GridLines RowDivider {get; set;}

[Delphi]

property RowDivider: GridLines;

Remarks

The Style property of RowDivider does not control whether rows can be resized by dragging their border. Use the AllowRowSizing property to control this behavior.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowSubDividerColor Property

RowSubDividerColor Property

Returns or sets the color of a RowSubDivider.

Syntax

[VB]

Public RowSubDividerColor As Color

[C#]

public Color RowSubDividerColor {get; set;}

[Delphi]

property RowSubDividerColor: Color;

Remarks

This property controls the row subdivider color of the list. It is used when the DataView is set to DataViewEnum.MultipleLines.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowTracking Property

RowTracking Property

Controls whether rows are automatically highlighted as the mouse is moved over the C1List control.

Syntax

[VB]

Public Property RowTracking As Boolean

[C#]

public bool RowTracking {get; set;}

[Delphi]

property RowTracking: Boolean;

Remarks

If True (the default), individual rows are highlighted as the mouse moves over them.

If False, moving the mouse does not change the highlighted row.

Note

When RowTracking is True and the user highlights a different row by moving the mouse, the ItemChanged event will not fire.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollTips Property

ScrollTips Property

Determines whether the list displays a pop-up text window when the scrollbar thumb is dragged.

Syntax

[VB]

Public ScrollTips As Boolean

[C#]

public bool ScrollTips {get; set;}

[Delphi]

property ScrollTips: Boolean;

Remarks

The ScrollTips property determines whether the list displays a pop-up text window when the scrollbar thumb is dragged. By default, this property is set to False, and ScrollTips are not displayed.

If the ScrollTips property is set to True, the FetchScrollTips event will be fired whenever the list’s scrollbar thumb is dragged.

If you do not provide a handler for the FetchScrollTips event, tips will not be displayed.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollTrack Property

ScrollTrack Property

Determines whether the list constantly displays information as it scrolls.

Syntax

[VB]

Public ScrollTrack As Boolean

[C#]

public bool ScrollTrack {get; set;}

[Delphi]

property ScrollTrack: Boolean;

Remarks

If True (the default), moving the scrollbar thumb causes the list’s display to update with new data. If False, moving the scrollbar thumb does not change the display. If the ScrollTrack property is True, moving the scrollbar thumb causes the list to scroll.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedCols Property

SelectedCols Property

Returns the SelectedColumnCollection object.

Syntax

[VB]

Public SelectedCols As SelectedColumnCollection

[C#]

public SelectedColumnCollection SelectedCols {get;}

[Delphi]

property SelectedCols: SelectedColumnCollection;

Remarks

This property returns the SelectedColumnCollection object. The SelectedColumnCollection object is a collection of C1DataColumn objects.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedIndex Property

SelectedIndex Property

Returns or sets the bookmark identifying the selected item in a control.

Syntax

[VB]

object.SelectedIndex = variant

[C#]

public variant SelectedIndex {get; set;}

[Delphi]

property SelectedIndex: Variant;

Remarks

Use the value returned by the SelectedIndex property to determine the current row in a C1List or C1Combo control.

When you set the SelectedIndex property to a valid value in code, the row associated with that value becomes the current row, and the drop-down control adjusts its display to bring the new current row into view if necessary.

The SelectedIndex property is defined as a Variant to accommodate user-defined bookmarks in unbound mode.

Note

For the C1Combo control, the SelectedIndex and Bookmark properties are synonymous.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedIndices Property

SelectedIndices Property

Returns the SelectedRowCollection object.

Syntax

[VB]

Public SelectedIndices As SelectedRowCollection

[C#]

public SelectedRowCollection SelectedIndices {get}

[Delphi]

property SelectedIndices: SelectedRowCollection;

Remarks

The SelectedRowCollection object is a collection of the row bookmarks for the currently selected rows.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedStyle Property

SelectedStyle Property

Returns the Style object that controls the appearance of selected cells.

Syntax

[VB]

Public SelectedStyle As Style

[C#]

public Style SelectedStyle {get; set;}

[Delphi]

property SelectedStyle: Style;

Remarks

This property returns or sets the Style object that controls the appearance of selected rows and columns within a list or split. By default, this is the built-in Selected style.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedValue Property

SelectedValue Property

Gets or sets the value of the member property specified by the ValueMember property.

Syntax

[VB]

Public SelectedValue As Object

[C#]

public object SelectedValue {get; set;}

[Delphi]

property SelectedValue: Object;

Remarks

SelectedValue is bindable; the common usage is to bind it to a field in another DataSource.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectionMode Property

SelectionMode Property

Sets or returns the type of selection allowed in the list.

Syntax

[VB]

Public SelectionMode As SelectionModeEnum

[C#]

public SelectionModeEnum SelectionMode {get; set;}

[Delphi]

property SelectionMode: SelectionModeEnum;

Remarks

The SelectionMode property returns or sets the method by which the list will display data.

Member Name | Description
None | The user cannot select rows.
One | Only one item in the list can be selected.
MultiSimple | If the user clicks a row, that row is selected, and the SelectedIndex property returns a bookmark for that row. If more than one row is selected, the SelectedIndex property returns the bookmark of the most recently selected row, and the SelectedIndices collection contains the bookmarks for all selected rows. The user can also unselect a row.
MultiExtended | Pressing Shift and clicking the mouse or pressing Shift and one of the arrow keys (Up Arrow, Down Arrow, Left Arrow, or Right Arrow) extends the selection from the previously selected item to the current item. Pressing Ctrl and clicking the mouse selects or deselects an item in the list. Since selected rows do not have to be adjacent, the user can also operate the vertical scroll bar to bring other rows into view if desired.
Checkbox | The user can select or unselect rows by clicking checkboxes.

See Also

C1List Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Property

Split Property

Returns current split number.

Syntax

[VB]

object.Split = integer

[C#]

public int Split {get; set;}

[Delphi]

property Split: Integer;

Remarks

Read/Write at run time. Not available at design time.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Splits Property

Splits Property

Returns a collection of Split objects.

Syntax

[VB]

Public Splits As SplitCollection

[C#]

public SplitCollection Splits {get;}

[Delphi]

property Splits: SplitCollection;

Remarks

The split indexer accepts three types of values. First it accepts a single Integer and returns a horizontal split object:

· Visual Basic

· C#

· Delphi

Secondly, it accepts the name of the split as a String (if one was specified), and returns either the horizontal or vertical split specified:

· Visual Basic

· C#

· Delphi

Thirdly, in order to return splits from a split matrix, this property also accepts two integers delimited by a comma that define the split index in the split matrix. For instance to access the 1st split in the 3rd row, the indexer would look as follows:

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitSize Property

SplitSize Property

Returns or sets the size of a split.

Syntax

[VB]

Public SplitSize As Integer

[C#]

public int SplitSize {get; set}

[Delphi]

property SplitSize: Integer;

Remarks

The meaning of the value returned by this property is determined by the split's SplitSizeMode property setting.

If SplitSizeMode is set to the default value of Scalable, then the value returned by the SplitSize property is an integer indicating the relative size of the split with respect to other scalable splits.

If SplitSizeMode is set to Exact, then the value returned by the SplitSize property is a floating point number indicating the exact size of the split in terms of the coordinate system of the list's container.

If SplitSizeMode is set to NumberOfColumns, then the value returned by the SplitSize property is an integer indicating the number of columns displayed in the split.

Note

Note that when there is only one split (the list's default behavior), the split spans the entire width of the list, the SplitSizeMode property is always Scalable, and the SplitSize property is always 1. Setting either of these properties has no effect when there is only one split. If there are multiple splits, and you then remove all but one, the SplitSizeMode and SplitSize properties of the remaining split automatically revert to 0 and 1, respectively.

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitSizeMode Property

SplitSizeMode Property

Determines how the SplitSize property is used to determine the actual size of a split.

Syntax

[VB]

Public SplitSizeMode As SizeModeEnum

[C#]

public SizeModeEnum SplitSizeMode {get; set;}

[Delphi]

property SplitSizeMode: SizeModeEnum;

Remarks

The SplitSizeMode property returns or sets a value that determines the size of a split.

Member Name | Description
Scalable | The default. The value returned by the SplitSize property is an integer indicating the relative size of the split with respect to other scalable splits. For example, if a list contains 3 scalable splits with SplitSize properties equal to 1, 2, and 3, then the size of each split would be 1/6, 1/3, and 1/2 of the total list width, respectively.
Exact | The value returned by the SplitSize property is a floating point number indicating the exact size of the split in terms of the coordinate system of the list's container. This setting allows you to fix the size of the split so that it always has the same width, even if new splits are added or existing splits are removed.
NumberOfColumns | The value returned by the SplitSize property is an integer indicating the number of columns displayed in the split, and the split will adjust its width to display the number of full columns specified by the SplitSize property. For example, if SplitSize is set to 2, and the user scrolls the split horizontally, then the width of the split will change so that 2 full columns are displayed, regardless of how wide the columns are.

Note

Consider a list containing both scalable splits and splits with a fixed number of columns. If a split with a fixed number of columns is scrolled horizontally, the total width remaining for the scalable splits may change because list columns are generally of different widths. However, the ratios of the sizes of the scalable splits remain the same as specified by their SplitSize properties.

Note that when there is only one split (the list's default behavior), the split spans the entire width of the list, the SplitSizeMode property is always Scalable, and the SplitSize property is always 1. Setting either of these properties has no effect when there is only one split. If there are multiple splits, and you then remove all but one, the SplitSizeMode and SplitSize properties of the remaining split automatically revert to 0 and 1, respectively.

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SpringMode Property

SpringMode Property

Specifies whether the columns will resize when the list is resized.

Syntax

[VB]

Public SpringMode As Boolean

[C#]

public bool SpringMode {get; set;}

[Delphi]

property SpringMode: Boolean;

Remarks

When this property is set to True and the list is horizontally resized, the column widths for visible columns will expand and/or shrink proportionally.

When set to False (the default), column widths do not change as the list is horizontally resized.

Note

You can control the minimum width on a per column basis by using the MinWidth property of individual C1DataColumn objects.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SortIndicator Property

SortIndicator Property

Allows the user to set the sorting indicator by code.

Syntax

[VB]

Public Property SortIndicator As C1.Win.C1List.SortDirEnum

[C#]

public SortDirEnum SortIndicator {get; set;}

[Delphi]

property SortIndicator: C1.Win.C1List.SortDirEnum;

Remarks

This property determines how a column will be sorted.

Member Name | Description
ASC | The column will be sorted in the ascending order.
DESC | The column will be sorted in the descending order.
None | The column will not be sorted.

This property is useful when more than one column is sorted at one time using the ORDER BY condition of SQL language.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Style Property

Style Property

Returns or sets the normal Style object for the list.

Syntax

[VB]

Public Style As Style

[C#]

public Style Style {get; set;}

[Delphi]

property Style: Style;

Remarks

This property returns or sets the Style object that controls the normal appearance of a cell within a list, column, or split. By default, this is the built-in Normal style.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Style Property (GridLines)

Style Property (GridLines)

Returns or sets the line style for a set of grid lines.

Syntax

[VB]

Public Style As LineStyleEnum

[C#]

public LineStyleEnum Style {get; set;}

[Delphi]

property Style: LineStyleEnum;

Remarks

One of the two properties of Gridlines. This sets either the list’s column or row lines to the style specified by LineStyleEnum.

See Also

GridLines Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Styles Property

Styles Property

Returns a collection of named Style objects.

Syntax

[VB]

Public Styles As GridStyleCollection

[C#]

public GridStyleCollection Styles {get; set;}

[Delphi]

property Styles: GridStyleCollection;

Remarks

This property returns a collection of named Style objects. When a list is first created, it contains Nine built-in styles, which control the following display aspects:

Normal | Data cells in unselected, unhighlighted rows
Heading | Column headers
Footing | Column footers
Selected | Data cells in selected rows
Caption | List and split caption bars
HighlightRow | Data cells in highlighted rows
EvenRow | Data cells in even numbered rows
OddRow | Data cells in odd numbered rows
RecordSelector | Cells in the record selector column

Note

At design time, use the GridStyle property page to modify these built-in styles or create your own named styles.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Tag Property

Tag Property

Sets or returns an expression that stores any extra data needed for your program.

Syntax

[VB]

Public Tag As Object

[C#]

public object Tag {get; set;}

[Delphi]

property Tag: Object;

Remarks

This property returns or sets an expression that stores any extra data needed for your program. Unlike other properties, the value of the Tag property is not used by the control.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Text Property (C1DataColumn)

Text Property (C1DataColumn)

Sets or returns the formatted data value in a column for the current row.

Syntax

[VB]

Public Text As String

[C#]

public string Text {get; set;}

[Delphi]

property Text: string;

Remarks

When applied to a C1DataColumn object, this property returns or sets the formatted data value in a column for the current row.

The value returned by the Text property is derived from the underlying data value by applying the formatting as specified by the NumberFormat property of the C1DataColumn object.

When the Text property is set for a formatted column, the underlying data value cannot be derived, and the Text and Value properties will subsequently return the same result.

Use the Value property to access the underlying data value in a column for the current row.

See Also

C1DataColumn Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Top Property

Top Property

Sets the width of the top border of a cell.

Syntax

[VB]

Public Top As Integer

[C#]

public int Top {get; set;}

[Delphi]

property Top: Integer;

Remarks

One of the five properties of CellBorders. This property sets the width of the top cell border to the integer specified.

See Also

CellBorders Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


TopIndex Property

TopIndex Property

Returns or sets a value containing the bookmark for the first visible row in a list or split.

Syntax

[VB]

Public TopIndex As Integer

[C#]

public int TopIndex {get; set;}

[Delphi]

property TopIndex: Integer;

Remarks

For a C1List or C1Combo control, setting the TopIndex property causes the list to scroll so that the specified row becomes the topmost row. If a list contains multiple splits, then the topmost row or column changes in each split, even if the splits have different HorizontalScrollGroup or VerticalScrollGroup property settings.

For a Split object, setting the TopIndex property causes the specified row to become the topmost row for that split only.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Translate Property

Translate Property

Determines whether a column's underlying data values are displayed in a translated form.

Syntax

[VB]

Public Translate As Boolean

[C#]

public bool Translate {get; set;}

[Delphi]

property Translate: Boolean;

Remarks

This property determines whether a column's underlying data values are automatically displayed in an alternate form as specified by the ValueItem objects contained in a column's ValueItems collection.

If True, data values that match the Value property of a ValueItem are displayed using the corresponding DisplayValue setting. The DisplayValue property may contain either text or graphics.

If False (the default), no translation is performed.

Use the ValueItems property to access the ValueItems collection for a C1DataColumn object.

See Also

ValueItems Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Trimming Property

Trimming Property

Determines how the text gets trimmed if it exceeds the rectangle layout area.

Syntax

[VB]

Public Trimming As StringTrimming

[C#]

public StringTrimming Trimming {get; set}

[Delphi]

property Trimming: StringTrimming;

Remarks

Determines how a word gets trimmed if it exceeds the rectangle layout area. The StringTrimming enumeration object is located within .NET’s System.Drawing namespace.

Note

See Microsoft’s .NET documentation for more information.

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Validate Property

Validate Property

Determines whether values entered by the user must match one of the ValueItem objects contained in a column's ValueItems collection.

Syntax

[VB]

Public Validate As Boolean

[C#]

public bool Validate {get; set;}

[Delphi]

property Validate: Boolean;

Remarks

If True, the list automatically validates the user's input when the current cell is changed. If the cell contents do not match the DisplayValue setting of one of the ValueItem objects, then focus remains on the current cell and its prior contents are restored.

If False (the default), the list performs no validation.

Use the ValueItems property to access the ValueItems collection for a C1DataColumn object.

See Also

ValueItems Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Value Property (C1DataColumn)

Value Property (C1DataColumn)

Sets or returns the underlying data value in a column for the current row.

Syntax

[VB]

Public Value As Object

[C#]

public object Value {get; set;}

[Delphi]

property Value: Object;

Remarks

The Value property is useful for simulating data entry within a cell. When this property is set, the value displayed in the cell respects the setting of the column's NumberFormat property.

This property always returns a string variant, even if the data type of the underlying field is numeric.

Use the Text property to access the formatted data value in a column for the current row.

See Also

C1DataColumn Object

ValueItem Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Value Property (ValueItem)

Value Property (ValueItem)

Sets the underlying data value for a member of a ValueItems collection.

Syntax

[VB]

Public Value As String

[C#]

public string Value {get; set;}

[Delphi]

property Value: string;

Remarks

The DisplayValue property returns the translated data value for a value item.

Use the ValueItems property to access the ValueItemCollection for a C1DataColumn object.

See Also

C1DataColumn Object

ValueItem Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems Property

ValueItems Property

Returns a ValueItems object for a column.

Syntax

[VB]

Public ValueItems As ValueItems

[C#]

public ValueItems ValueItems {get;}

[Delphi]

property ValueItems: ValueItems;

Note

At design time, use the ValueItems object to set presentation properties for a column.

In the ActiveX versions, Valueitems was a collection. In .NET ValueItems is an object that has properties and also exposes a collection of Value/DisplayValue pairs.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueMember Property

ValueMember Property

Specifies the field name for binding purposes.

Syntax

[VB]

Public ValueMember As String

[C#]

public string ValueMember {get; set;}

[Delphi]

property ValueMember: string;

Example

· Visual Basic

· C#

· Delphi

Remarks

The default value is the empty string “ ”.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Values Property

Values Property

Returns a collection of DisplayValue/Value pairs.

Syntax

[VB]

Public Values As ValueItemCollection

[C#]

public ValueItemCollection Values {get;}

[Delphi]

property Values: ValueItemCollection;

Remarks

This property provides access to the DisplayValue and Value pairs that make up the ValueItems object. This collection can also be modified at design-time through the ValueItems collection editor. The ValueItems Collection Editor is available through the C1List Designer.

See Also

ValueItems Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VerticalAlignment Property

VerticalAlignment Property

Sets a value that determines the vertical alignment of data in an object.

Syntax

[VB]

Public VerticalAlignment As AlignVertEnum

[C#]

public AlignVertEnum VerticalAlignment {get; set;}

[Delphi]

property VerticalAlignment: AlignVertEnum;

Remarks

This property returns or sets a value that determines the vertical alignment of data when the style is applied to a data cell, header, footer, or caption bar.

Member Name | Description
Top | Aligns text in a cell to the top.
Center | Aligns text in a cell in the center.
Bottom | Aligns text in a cell to the bottom.

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VerticalScrollGroup Property

VerticalScrollGroup Property

Synchronizes vertical scrolling between splits.

Syntax

[VB]

Public VerticalScrollGroup As Integer

[C#]

public int VerticalScrollGroup {get; set;}

[Delphi]

property VerticalScrollGroup: Integer;

Remarks

All splits with the same ScrollGroup setting will be synchronized when vertical scrolling occurs within any one of them. Splits belonging to different groups can scroll independently, allowing different splits to display different parts of the database.

Note

Newly created splits have a ScrollGroup value of 1.

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Visible Property

Visible Property

Specifies whether a column in a list or split is currently visible.

Syntax

[VB]

Public Visible As Boolean

[C#]

public bool Visible {get; set;}

[Delphi]

property Visible: Boolean;

Remarks

This property returns a boolean indicating whether a column in a list or split is currently visible or capable of being scrolled into view.

If True, then the column has not been hidden in code or by the user.

If False, then the column is hidden and cannot be scrolled into view.

For columns created at design time, the default value of this property is True. For columns created in code at run time, the default value of this property is False.

Note

If a column has been scrolled out of view, its Visible property remains True.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VisibleCols Property

VisibleCols Property

Returns the number of visible columns in the current split.

Syntax

[VB]

Public VisibleCols As Integer

[C#]

public int VisibleCols {get;}

[Delphi]

property VisibleCols: Integer;

Remarks

The value returned includes both fully and partially displayed columns. You can use the Split property of the C1List control to determine the index of the current split.

For C1Combo controls, this property returns the number of visible columns in the entire control, since there can only be one split. The value returned includes both fully and partially displayed columns.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VisibleRows Property

VisibleRows Property

Returns the number of visible rows in the list.

Syntax

[VB]

Public VisibleRows As Integer

[C#]

public int VisibleRows {get; set;}

[Delphi]

property VisibleRows: Integer;

Remarks

The value returned includes both fully and partially displayed rows.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VScrollBar Property

VScrollBar Property

Sets or returns the VBar object that controls the appearance of the vertical scrollbar.

Syntax

[VB]

Public VScrollBar As VBar

[C#]

public VBar VScrollBar {get; set;}

[Delphi]

property VScrollBar: VBar;

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Width Property

Width Property

Sets or returns the width of a column.

Syntax

[VB]

Public Width As Integer

[C#]

public int Width {get; set;}

[Delphi]

property Width: Integer;

Remarks

This property returns or sets the width of a column in terms of the coordinate system of the list's container.

Use the Width property in conjunction with Left, ItemHeight, and RowTop to determine the size and placement of controls displayed on top of a list cell.

Note

The DefColWidth property controls the default width of new columns created at run time.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


WillChangeToIndex Property

WillChangeToIndex Property

Returns the bookmark identifying the will-be selected item in a control.

Syntax

[VB]

Public ReadOnly Property WillChangeToIndex As Integer

[C#]

public int WillChangeToIndex {get;}

[Delphi]

property WillChangeToIndex: Integer;

Remarks

This property is used in the SelChange, RowChange and ItemChanged events. When you handle these events, the SelectedIndex will be the old selected index, and the WillChangeToIndex will be the new selected index.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


WillChangeToText Property

WillChangeToText Property

Returns the string identifying the text for the item to be selected.

Syntax

[VB]

Public ReadOnly Property WillChangeToText As String

[C#]

public string WillChangeToText {get;}

[Delphi]

property WillChangeToText: string;

Remarks

This property will most likely be used during SelChange, RowChange etc. events, and it will give you the text of the new selected item. It is related to WillChangeToIndex, which refers to the new selected index.

The WillChangeToText property returns an empty string when the WillChangeToIndex property is set to -1.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


WillChangeToValue Property

WillChangeToValue Property

Returns the object identifying the value to be selected.

Syntax

[VB]

Public ReadOnly Property WillChangeToValue As Object

[C#]

public object WillChangeToValue {get;}

[Delphi]

property WillChangeToValue: Object;

Remarks

This property is added similarly to WillChangeToIndex and WillChangeToText.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


WrapText Property

WrapText Property

Sets or returns a value indicating whether an object wordwraps text at cell boundaries.

Syntax

[VB]

Public WrapText As Boolean

[C#]

public bool WrapText {get; set;}

[Delphi]

property WrapText: Boolean;

Remarks

If True, a line break occurs before words that would otherwise be partially displayed.

If False (the default), no line break occurs and text is clipped at the cell's right edge.

For Style objects, the value of the WrapText property is inherited from the parent style (if any) unless explicitly overridden.

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Method Reference

Add Method (GridStyleCollection)

Add Method (ValueItemCollection)

AddCellStyle Method

AddItem Method

AddItemTitles Method

AddRegexCellStyle Method

AutoSize Method

CellContaining Method

CellText Method

CellValue Method

ClearCellStyle Method

ClearFields Method

ClearItems Method

ClearRegexCellStyle Method

ClearSelCols Method

ClearSelected Method

ColContaining Method

ExportToDelimitedFile Method

Find Method

FindString Method

FindStringExact Method

FixColumn Method

FixedCols Method

GetDisplayText Method

GetItemText Method

GetSelected Method

HoldFields Method

IndexFromPoint Method

IndexOf Method (GridStyleCollection)

IndexOf Method (SplitCollection)

IndexOf Method (ValueItemCollection)

Insert Method (GridStyleCollection)

Insert Method (ValueItemCollection)

InsertHorizontalSplit Method

InsertItem Method

InsertVerticalSplit Method

PointAt Method

ReBind Method

Refetch Method

RefetchCell Method

Refresh Method (C1List)

Refresh Method (C1DataColumn)

RefreshCell Method

RemoveAt Method (GridStyleCollection)

RemoveHorizontalSplit Method

RemoveItem Method

RemoveVerticalSplit Method

Reset Method

ResetBackColor Method

ResetBackgroundImage Method

ResetBackgroundPictureDrawMode Method

ResetFont Method

ResetForeColor Method

ResetForegroundImage Method

ResetForeGroundPicturePosition Method

ResetHorizontalAlignment Method

ResetLocked Method

ResetTrimming Method

ResetVerticalAlignment Method

ResetWrapText Method

ResumeBinding Method

RowContaining Method

RowTop Method

ScrollCtl Method

SetAddItemData Method

SetSelected Method

Sort Method

SplitContaining Method

SuspendBinding Method

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Add Method (GridStyleCollection)

Add Method (GridStyleCollection)

Adds an item to the collection.

Syntax

[VB]

Public Function Add(ByVal gs As Style) As Integer

[C#]

public System.Int32 Add(Style gs)

[Delphi]

function Add(gs: Style): Integer;

Parameter | Description
gs | Style to be added.

See Also

GridStyleCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Add Method (ValueItemCollection)

Add Method (ValueItemCollection)

Adds an item to the collection.

Syntax

[VB]

Public Function Add(ByVal vi As ValueItem) As Integer

[C#]

public System.Int32 Add (ValueItem vi)

[Delphi]

property Add(vi: ValueItem): Integer;

Parameter | Description
vi | The ValueItem to be added.

See Also

ValueItemCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddCellStyle Method

AddCellStyle Method

Controls the font and color of cells within a list, column, or split according to value.

Syntax

[VB]

Public Sub AddCellStyle(ByVal condition As CellStyleFlag, ByVal style As Style)

[C#]

public void AddCellStyle (CellStyleFlag condition, Style style)

[Delphi]

procedure AddCellStyle(condition: CellStyleFlag, style: Style);

Parameter | Description
condition | Combination of one or more CellStyleFlag constants.
style | Style object that specifies font and color attributes.

Remarks

This method allows you to control the font and color of cells within a list, column, or split according to the status values (CellStyleFlag enumeration) specified by the condition argument:

Member Name | Description
Normal Cell | The cell satisfies none of the conditions.
CurrentCell | The cell is the current cell as specified by the Bookmark, Col, and Split properties. At any given time, only one cell can have this status.
SelectedRow | The cell is part of a row selected by the user or in code. The SelectedRowCollection contains a bookmark for each selected row.
AllCells | All Cells
MarqueeRow | The cell is part of a highlighted row marquee.

You can add some of the values together to specify multiple cell conditions. For example, a cell status value of 9 (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. You can also use a cell status value of 0 (CellStyleFlag.NormalCell) to refer to only those cells without any of the 2 basic cell conditions.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes Selected cells to be displayed in red:

· Visual Basic

· C#

· Delphi

Each time the AddCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a list, column, or split.

Note

If a cell condition already exists for a particular condition value, the new style setting replaces the existing one.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddItem Method

AddItem Method

Add a new item to the end in the AddItem mode.

Syntax

[VB]

C1List1.AddItem("Greg;Daryll;412-657-3412")

[C#]

public void AddItem (String newItem )

[Delphi]

procedure AddItem(newItem: string);

Parameter | Description
newItem | The item to be added. It is delimited by the AddItemSeparator.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddItemTitles Method

AddItemTitles Method

Sets the column titles in the AddItem mode.

Syntax

[VB]

void AddItemTitles(string titles)

[C#]

public void AddItemTitles ( System.String titles )

[Delphi]

procedure AddItemTitles(newItem: String);

Parameter | Description
titles | The titles to be set. It is delimited by the semicolon (;).

Example

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddRegexCellStyle Method

AddRegexCellStyle Method

Controls the font and color of cells within a list, column, or split according to their contents.

Syntax

[VB]

Public Sub AddRegexCellStyle(ByVal condition As C1.Win.C1List.CellStyleFlag, ByVal style As C1.Win.C1List.Style, ByVal regex As String)

[C#]

public void AddRegexCellStyle(CellStyleFlag condition, Style style, String regex)

[Delphi]

procedure AddRegexCellStyle(CellStyleFlag condition, Style style, String regex);

Parameter | Description
condition | Combination of one or more CellStyleFlag constants.
style | Style object that specifies font and color attributes.
regex | A regular expression string.

Remarks

This method allows you to control the font and color of cells within a list, column, or split according to their contents. The status values (CellStyleFlag enumeration) specified by the condition argument determine which cells are affected:

Member Name | Description
Normal Cell | The cell satisfies none of the conditions.
CurrentCell | The cell is the current cell as specified by the Bookmark, Col, and Split properties. At any given time, only one cell can have this status.
SelectedRow | The cell is part of a row selected by the user or in code. The SelectedRowCollection contains a bookmark for each selected row.
AllCells | All Cells
MarqueeRow | The cell is part of a highlighted row marquee.

You can add some of the values together to specify multiple cell conditions. For example, a cell status value of (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. You can also use a cell status value of (CellStyleFlag.NormalCell) to refer to only those cells without any of the four basic cell conditions. To designate that a cell condition should apply to all cells regardless of status, use a cell status value of CellStyleFlag.AllCells.

The regex argument is a regular expression string that describes the pattern matching to be performed on cell contents. The regular expressions supported by List are a subset of standard Unix regular expression syntax:

p* | Any pattern followed by an asterisk matches zero or more occurrences of that pattern. For example, ab*c matches ac, abc, and abbcy (partial match).
p+ | Any pattern followed by a plus sign matches one or more occurrences of that pattern. For example, ab+c matches abc and abbcy, but not ac.
[list] | A list of case-sensitive characters enclosed in brackets matches any one of those characters in the given position in the string. Character ranges can be used, as in [abcd], which is equivalent to [a-d]. Multiple ranges can also be used. For example, [A-Za-z0-9] matches any letter or digit. Bracketed patterns can also be combined with either the * or + operators. The pattern [A-Z]+ matches a sequence of one or more uppercase letters.
[^list] | If a list starts with a caret, it matches any character except those specified in the list.
. (period) | A period represents any single character.
^p | A caret at the beginning of a pattern forces a match to occur at the start of a cell. Otherwise, the pattern can match anywhere within a cell.
p$ | A dollar sign at the end of a pattern forces a match to occur at the end of a cell. Otherwise, the pattern can match anywhere within a cell.
\c | Any character preceded by a backslash represents itself, unless enclosed in brackets, in which case the backslash is interpreted literally.

Any other character represents itself and will be compared with respect to case.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes normal cells containing the letters "SQL" to be displayed in bold:

· Visual Basic

· C#

· Delphi

Each time the AddRegexCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a list, column, or split.

Note

If a cell condition already exists for a particular pair of condition and regex values, the new style setting replaces the existing one.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AutoSize Method

AutoSize Method

Adjusts the width of a column to accommodate the longest visible field within that column.

Syntax

[VB]

C1DisplayColumn.AutoSize ()

[C#]

public void AutoSize ( )

[Delphi]

procedure AutoSize;

Remarks

Calling this method in code has the same effect as the user double-clicking a column divider.

If the column is hidden or scrolled out of view, calling this method results in a trappable error.

The AllowSizing property must be set to True for columns to be resized by the user. However, you can use the AutoSize method when the column's AllowSizing property is False, just as you can set the column width when AllowSizing is False.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellContaining Method

CellContaining Method

Returns the cell position for a set of coordinates.

Syntax

[VB]

Public Function CellContaining(ByVal x As Integer, ByVal y As Integer, ByRef rowAt As Integer, ByRef colAt As Integer) As Boolean

[C#]

public System.Boolean CellContaining ( System.Int32 x , System.Int32 y , System.Int32 rowAt , System.Int32 colAt )

[Delphi]

function CellContaining(x: Integer; y: Integer; rowAt: Integer; colAt: Integer): Boolean;

Parameter | Description
x, y | Integers that define a coordinate pair in pixels.
rowindex | Integer that receives the zero-based index of the row beneath the specified Y coordinate.
colindex | Integer that receives the zero-based index of the column beneath the specified X coordinate.

Return Value

A boolean that indicates whether a data cell is beneath the specified coordinate pair.

Remarks

The CellContaining method combines the ColContaining and RowContaining methods into one call. If the coordinate pair specified by x and y points to a data cell, this method returns True, and the rowindex and colindex arguments receive zero-based indexes that identify the cell.

This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a list cell.

If the specified coordinate is outside of the list's data area, this method returns False. You can use the PointAt method to determine what kind of list element, if any, is beneath the specified coordinate.

Note

You must convert the x and y arguments to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellText Method

CellText Method

Returns a formatted string representation of the data in a column.

Syntax

[VB]

Public Function CellText(ByVal row As Integer) As String

[C#]

public string CellText ( System.Int32 row )

[Delphi]

function CellText(row: Integer;): string;

Parameter | Description
row | An integer representing a row in the control.

Return Value

A string containing the displayed column text for the specified row.

Remarks

The CellText method returns a formatted string representation of the data in a column for the row specified by the row argument. Using the CellText method is similar to accessing the Text property, except that you can select a specific row from which to retrieve the value.

The value returned by the CellText method is derived from the underlying data value by applying the formatting as specified by the NumberFormat property of the C1DataColumn object.

Using the CellText method to extract information from a cell doesn't affect the current selection.

Use the CellValue method to access the unformatted data value for the specified row.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellValue Method

CellValue Method

Returns the raw data value in a column for the specified row.

Syntax

[VB]

Public Function CellValue(ByVal row As Integer) As Object

[C#]

public System.Object CellValue ( System.Int32 row )

[Delphi]

function CellValue(row: Integer;): Object;

Parameter | Description
row | A long integer representing a row in the control.

Return Value

A variant containing the underlying data value for the specified row.

Remarks

The CellValue method returns the raw data value in a column for the row specified by the row argument. Using the CellValue method is similar to accessing the Value property, except that you can select a specific row from which to retrieve the value.

Using the CellValue method to extract information from a cell doesn't affect the current selection.

Use the CellText method to access the formatted data value for the specified row.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearCellStyle Method

ClearCellStyle Method

Removes a cell condition established with a previous call to the AddCellStyle method.

Syntax

[VB]

Public Sub ClearCellStyle(ByVal condition As C1.Win.C1List.CellStyleFlag)

[C#]

public void ClearCellStyle ( C1.Win.C1List.CellStyleFlag condition)

[Delphi]

procedure ClearCellStyle(condition: CellStyleFlag;);

Parameter | Description
condition | A combination of one or more CellStyleFlag constants.

Remarks

The ClearCellStyle method removes a cell condition established with a previous call to the AddCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If the condition argument is CellStyleFlag.AllCells, then all non-regex cell conditions are removed, regardless of status.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearFields Method

ClearFields Method

Restores the default list layout.

Syntax

[VB]

object.ClearFields ()

[C#]

public void ClearFields ( )

[Delphi]

procedure ClearFields;

Remarks

The ClearFields method restores the default list layout so that subsequent ReBind operations will automatically derive new column bindings from the (possibly changed) data source. You can cancel the list's automatic layout behavior by invoking the HoldFields method.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearItems Method

ClearItems Method

Clears all of the items in the AddItem mode.

Syntax

[VB]

Public Sub ClearItems()

[C#]

public void ClearItems ( )

[Delphi]

procedure ClearItems;

Example

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearRegexCellStyle Method

ClearRegexCellStyle Method

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

Syntax

[VB]

Public Sub ClearRegexCellStyle(ByVal condition As C1.Win.C1List.CellStyleFlag)

Public Sub ClearRegexCellStyle(ByVal condition As C1.Win.C1List.CellStyleFlag, ByVal regex As String)

[C#]

public void ClearRegexCellStyle ( C1.Win.C1List.CellStyleFlag condition, String regex )

public void ClearRegexCellStyle ( C1.Win.C1List.CellStyleFlag condition )

[Delphi]

procedure ClearRegexCellStyle(condition: CellStyleFlag; regex: string);

procedure ClearRegexCellStyle(condition: CellStyleFlag);

Parameter | Description
condition | A combination of one or more CellStyleFlag constants.
regex | A regular expression string.

Remarks

The ClearRegexCellStyle method removes a cell condition established with a previous call to the AddRegexCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If regex is omitted, then all cell conditions for any regular expression matching the condition argument are removed. If condition is CellStyleFlag.AllCells, then all regex cell conditions are removed, regardless of status or expression.

If regex is supplied, then the single cell condition matching both arguments is removed. However, if condition is CellStyleFlag.AllCells, then all cell conditions for the specified regular expression are removed, regardless of status.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearSelCols Method

ClearSelCols Method

The ClearSelCols method deselects all columns in a split. If no columns are selected, then this method does nothing.

Syntax

[VB]

object.ClearSelCols

[C#]

public void ClearSelCols ( )

[Delphi]

procedure ClearSelCols;

Return Value

None

Remarks

If a control contains multiple splits, then invoking its ClearSelCols method has the same effect as invoking the ClearSelCols method for the current split. The index of the current split is available through the control's Split property.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearSelected Method

ClearSelected Method

Clears all selected rows.

Syntax

[VB]

Public Sub ClearSelected()

[C#]

public void ClearSelected ( )

[Delphi]

procedure ClearSelected;

Example

· Visual Basic

· C#

· Delphi

Return Value

None

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColContaining Method

ColContaining Method

Returns the column index containing the specified coordinate.

Syntax

[VB]

Public Function ColContaining(ByVal x As Integer) As Integer

[C#]

public System.Int32 ColContaining ( System.Int32 x )

[Delphi]

function ColContaining(x: Integer): Integer;

Parameter | Description
x | Integer that defines a horizontal coordinate (X value) in pixels.

Return Value

An integer corresponding to the index of the column beneath the specified X coordinate.

Remarks

This value ranges from 0 to Columns.Count – 1.

This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a list column.

If x is outside of the list's data area, this method returns -1.

The ColContaining method returns the index value of the column indicated, not the visible column position. For example, if x falls within the first visible column, but two columns have been scrolled off the left side of the control, the ColContaining method returns 2, not 0 (assuming that the user did not move any columns previously).

Note

You must convert the x argument to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ExportToDelimitedFile Method

ExportToDelimitedFile Method

Exports the specified rows from the list to the specified file as delimited ASCII text.

Syntax

[VB]

Public Sub ExportToDelimitedFile(ByVal outPath As String, ByVal selector As C1.Win.C1List.RowSelectorEnum)

Public Sub ExportToDelimitedFile(ByVal outPath As String, ByVal selector As C1.Win.C1List.RowSelectorEnum, ByVal delim As String)

Public Sub ExportToDelimitedFile(ByVal outPath As String, ByVal selector As C1.Win.C1List.RowSelectorEnum, ByVal delim As String, ByVal prefix As String)

Public Sub ExportToDelimitedFile(ByVal outPath As String, ByVal selector As C1.Win.C1List.RowSelectorEnum, ByVal delim As String, ByVal prefix As String, ByVal suffix As String)

Public Sub ExportToDelimitedFile(ByVal outPath As String, ByVal selector As C1.Win.C1List.RowSelectorEnum, ByVal delim As String, ByVal prefix As String, ByVal suffix As String, ByVal headers As Boolean)

[C#]

C1List.ExportToDelimitedFile (String outPath, RowSelectorEnum selector)

C1List.ExportToDelimitedFile (String outPath, RowSelectorEnum selector, String delim)

C1List.ExportToDelimitedFile (String outPath, RowSelectorEnum selector, String delim, String prefix)

C1List.ExportToDelimitedFile (String outPath, RowSelectorEnum selector, String delim, String prefix, String suffix)

C1List.ExportToDelimitedFile (String outPath, RowSelectorEnum selector, String delim, String prefix, String suffix, Boolean columnheader)

[Delphi]

procedure ExportToDelimitedFile(outPath: string, selector: RowSelectorEnum);

procedure ExportToDelimitedFile(outPath: string, selector: RowSelectorEnum; delim: string);

procedure ExportToDelimitedFile(outPath: string, selector: RowSelectorEnum; delim: string; prefix: string);

procedure ExportToDelimitedFile(outPath: string, selector: RowSelectorEnum; delim: string; prefix: string; suffix: string);

procedure ExportToDelimitedFile(outPath: string, selector: RowSelectorEnum; delim: string; prefix: string; suffix: string; columnheader: Boolean);

Parameter | Description
outPath | Specifies the file to which list rows are exported.
delim | Specifies an optional delimiter string used to separate fields.
selector | Specifies an optional value that specifies the rows to be exported.
prefix | Specifies an optional string used with suffix to surround each value.
suffix | Specifies an optional string used with prefix to surround each value.
columnheader | Specifies whether the columns headers will be written to the file on the first line.

Remarks

The ExportToDelimitedFile method exports the specified rows from the list to the specified file as delimited ASCII text, where each row (record) occupies its own line. Fields are delimited by the delim string (the default delim is empty). Field values can also be placed between a prefix string and suffix string.

The selector argument determines the rows to be exported. It can be one of the following constant values:

Member Name | Description
AllRows | All available rows are exported. If the selector argument is omitted, this value is assumed.
SelectedRows | Only selected rows are exported. The list's SelectedRowCollection contains a bookmark for each selected row.
CurrentRow | Only the current row is exported.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Find Method

Find Method

Searches a string in a specific column. If found, returns the row bookmark; otherwise returns –1.

Syntax

[VB]

Public Function Find(ByVal searchStr As String, ByVal searchMode As C1.Win.C1List.MatchCompareEnum, ByVal includeStart As Boolean, ByVal startBmk As Integer) As Integer

Public Function Find(ByVal searchStr As String, ByVal searchMode As C1.Win.C1List.MatchCompareEnum, ByVal includeStart As Boolean, ByVal startBmk As Integer, ByVal searchCol As Integer) As Integer

Public Function Find(ByVal searchStr As String, ByVal searchMode As C1.Win.C1List.MatchCompareEnum, ByVal includeStart As Boolean, ByVal startBmk As Integer, ByVal searchField As String) As Integer

[C#]

public System.Int32 Find ( System.String searchStr , C1.Win.C1List.MatchCompareEnum searchMode , System.Boolean includeStart , System.Int32 startBmk )

public System.Int32 Find ( System.String searchStr , C1.Win.C1List.MatchCompareEnum searchMode , System.Boolean includeStart , System.Int32 startBmk , System.String searchField )

public System.Int32 Find ( System.String searchStr , C1.Win.C1List.MatchCompareEnum searchMode , System.Boolean includeStart , System.Int32 startBmk , System.Int32 searchCol )

[Delphi]

function Find(searchStr:
string; searchMode: MatchCompareEnum; includeStart: Boolean;
startBmk: Integer): Integer;

function Find(searchStr:
string; searchMode: MatchCompareEnum; includeStart: Boolean;
startBmk: Integer; searchCol: string): Integer;

function Find(searchStr:
string; searchMode: MatchCompareEnum; includeStart: Boolean;
startBmk: Integer; searchField: string): Integer;

Example

If find the record, highlight the row.

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FindString Method

FindString Method

Find the first row index such that the cell text starts with string s in the given column.

Syntax

[VB]

Public Function FindString(ByVal s As String) As Integer

Public Function FindString(ByVal s As String, ByVal startIndex As Integer) As Integer

Public Function FindString(ByVal s As String, ByVal startIndex As Integer, ByVal col As Integer) As Integer

Public Function FindString(ByVal s As String, ByVal startIndex As Integer, ByVal field As String) As Integer

[C#]

public System.Int32 FindString ( System.String s )

public System.Int32 FindString ( System.String s , System.Int32 startIndex )

public System.Int32 FindString ( System.String s , System.Int32 startIndex , System.Int32 col )

public System.Int32 FindString ( System.String s , System.Int32 startIndex , System.String field )

[Delphi]

function FindString(s: string): Integer;

function FindString(s: string; startIndex: Integer): Integer;

function FindString(s: string; startIndex: Integer; col: Integer): Integer;

function FindString(s: string; startIndex: Integer; col: Integer; field: string): Integer;

Parameter | Description
s | The string to be searched.
startIndex | The row index where the search will start.
col | The field (column) index.
field | The field from which you are searching.

Remarks

If the startIndex is not given, then the search will start at the row index 0. If the column index or the field name is not given, then the DisplayMember is assumed.

See Also

C1List Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FindStringExact Method

FindStringExact Method

Find the first row index such that the cell is the same with string s in the given column.

Syntax

[VB]

Public Function FindStringExact(ByVal s As String) As Integer

Public Function FindStringExact(ByVal s As String, ByVal startIndex As Integer) As Integer

Public Function FindStringExact(ByVal s As String, ByVal startIndex As Integer, ByVal col As Integer) As Integer

Public Function FindStringExact(ByVal s As String, ByVal startIndex As Integer, ByVal field As String) As Integer

[C#]

public System.Int32 FindStringExact ( System.String s )

public System.Int32 FindStringExact ( System.String s , System.Int32 startIndex , System.Int32 col )

public System.Int32 FindStringExact ( System.String s , System.Int32 startIndex )

public System.Int32 FindStringExact ( System.String s , System.Int32 startIndex , System.String field )

[Delphi]

function FindStringExact(s: string): Integer;

function FindStringExact(s: string; startIndex: Integer): Integer;

function FindStringExact(s: string; startIndex: Integer; col: Integer): Integer;

function FindStringExact(s: string; startIndex: Integer; col: Integer; field: string): Integer;

Parameter | Description
s | The string to be searched.
startIndex | The row index where the search will start.
col | The field (column) index.
field | The field from which you are searching.

Return Value

The row index of the first match.

Remarks

If the startIndex is not given, then the search will start at the row index 0. If the column index or the field name is not given, then the DisplayMember is assumed.

See Also

C1List Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FixColumn Method

FixColumn Method

Fixes the column to keep it from scrolling or resizing when v is True, and unfixes the column when v is False.

Syntax

[VB]

Public Sub FixColumn(ByVal v As Boolean)

Public Sub FixColumn(ByVal v As Boolean, ByVal pos As Integer)

[C#]

public void FixColumn ( System.Boolean v )

public void FixColumn ( System.Boolean v , System.Int32 pos )

[Delphi]

procedure FixColumn(v: Boolean);

procedure FixColumn(v: Boolean; pos: Integer);

Example

Fix the Country column and put it in the leftmost position:

· Visual Basic

· C#

· Delphi

Unfix the column and put it in the third position:

· Visual Basic

· C#

· Delphi

Return Value

None

Note

The fixed columns will be put on the left side of the list.

If v is True and pos is less than 0, then the column will be put in column position 0. If pos is greater than the current fixed column number r, then the column will be put into column position r.

If v is False and pos is less than the current fixed column number r, then the column will be put into column position r. If pos is greater than the maximum column number t - 1, then the column will be put into column position (t - 1).

Method void FixColumn(bool v): if v is True, the column is fixed and moved to the start position 0. If v is False, the column is unfixed and moved to the last position, Maximum column number - 1.

See Also

C1DisplayColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FixedCols Method

FixedCols Method

Returns the fixed column number for that split.

Syntax

[VB]

Public Function FixedCols() As Integer

[C#]

public System.Int32 FixedCols ()

[Delphi]

function FixedCols: Integer;

Example

· Visual Basic

· C#

· Delphi

Return Value

An integer corresponding to the fixed column number.

See Also

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GetDisplayText Method

GetDisplayText Method

Gets the display text for the specified row and column.

Syntax

[VB]

Public Function GetDisplayText(ByVal rowIndex As Integer, ByVal colIndex As Integer) As String

[C#]

public System.String GetDisplayText ( System.Int32 rowIndex; System.Int32 colIndex )

[Delphi]

function GetDisplayText(rowIndex: Integer; colIndex: Integer): string;

Parameter | Description
rowIndex | The row index.
colIndex | The column index from the C1DisplayColumn collection of the control.

Return Value

Returns a string which identifies the cell text.

See Also

C1List Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GetItemText Method

GetItemText Method

Gets the cell text for any cell.

Syntax

[VB]

Public Function GetItemText(ByVal rowIndex As Integer, ByVal colIndex As Integer) As String

Public Function GetItemText(ByVal rowIndex As Integer, ByVal colName As String) As String

[C#]

public System.String GetItemText ( System.Int32 rowIndex , System.Int32 colIndex )

public System.String GetItemText ( System.Int32 rowIndex , System.String colName )

[Delphi]

function GetItemText(rowIndex: Integer; colIndex: Integer): string;

function GetItemText(rowIndex: Integer; colName: Integer): string;

Parameter | Description
rowIndex | The row index.
colName | The column name.
colIndex | The column index.

Remarks

This method will get the text for any cell directly, instead of using the Column object.

Return Value

Returns a string which identifies the cell text.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GetSelected Method

GetSelected Method

Checks whether the given row is selected.

Syntax

[VB]

Public Function GetSelected(ByVal index As Integer) As Boolean

[C#]

public System.Boolean GetSelected ( System.Int32 index )

[Delphi]

function GetSelected(index: Integer): Boolean;

Parameter | Description
index | The zero-based integer that identifies the row number of the control.

Remarks

If it returns True, then the row is selected. Otherwise, it is not selected.

See Also

C1List Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HoldFields Method

HoldFields Method

Holds the current column/field layout.

Syntax

[VB]

Public Sub HoldFields()

[C#]

public void HoldFields ()

[Delphi]

procedure HoldFields;

Remarks

The HoldFields method sets the current column/field layout as the customized layout so that subsequent ReBind operations will use the current layout for display. You can resume the list's automatic layout behavior by invoking the ClearFields method.

The HoldFields method is especially useful in the unbound modes when you have specified the column layout in code and would like to keep it intact after a ReBind operation.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


IndexFromPoint Method

IndexFromPoint Method

Returns the row index for a given point.

Syntax

[VB]

Public Function IndexFromPoint(ByVal p As System.Drawing.Point) As Integer

[C#]

public System.Int32 IndexFromPoint ( System.Drawing.Point p )

[Delphi]

function IndexFromPoint(p: System.Drawing.Point): Integer;

Parameter | Description
p | The given point.

Remarks

If the point is not on any row, then it will return –1. Otherwise it will return the row index.

See Also

C1List Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


IndexOf Method (GridStyleCollection)

IndexOf Method (GridStyleCollection)

Gets the index of the specified item in the collection.

Syntax

[VB]

Public Function IndexOf(ByVal gs As Style) As Integer

[C#]

public System.Int32 IndexOf(Style gs)

[Delphi]

function IndexOf(gs: Style): Integer;

Parameter | Description
gs | Gets the index of the specified style.

See Also

GridStyleCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


IndexOf Method (SplitCollection)

IndexOf Method (SplitCollection)

Gets the index of the specified item in the collection.

Syntax

[VB]

SplitCollection.IndexOf (ByVal v As C1.Win.C1List.ListBase.View) As Integer

[C#]

public System.Int32 IndexOf ( C1.Win.C1List.ListBase.View v)

[Delphi]

function IndexOf(v: C1.Win.C1List.ListBase.View): Integer;

Parameter | Description
v | Gets the index of the specified view in the collection.

See Also

SplitCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


IndexOf Method (ValueItemCollection)

IndexOf Method (ValueItemCollection)

Gets the index of the specified item in the collection.

Syntax

[VB]

Public Function IndexOf(ByVal vi As ValueItem) As Integer

[C#]

public System.Int32 IndexOf (ValueItem vi)

[Delphi]

function IndexOf(vi: ValueItem): Integer;

Parameter | Description
vi | Gets the index of the specified ValueItem.

See Also

ValueItemCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Insert Method (GridStyleCollection)

Insert Method (GridStyleCollection)

Inserts the specified item into the collection.

Syntax

[VB]

Public Sub Insert(ByVal index As Integer, ByVal gs As C1.Win.C1List.Style)

[C#]

public void Insert (System.Int32 index, Style gs)

[Delphi]

procedure Insert(index: Integer; gs: Style): Integer;

Parameter | Description
gs | An integer

See Also

GridStyleCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Insert Method (ValueItemCollection)

Insert Method (ValueItemCollection)

Inserts the specified item into the collection.

Syntax

[VB]

Public Sub Insert (ByVal index As Integer, ByVal vi As ValueItem) As Integer

[C#]

public void Insert ( System.Int32 index , ValueItem vi )

[Delphi]

procedure Insert(index: Integer; vi: ValueItem): Integer;

Parameter | Description
index | An integer
vi | The ValueItem to be inserted.

See Also

ValueItemCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


InsertHorizontalSplit Method

InsertHorizontalSplit Method

Inserts a horizontal split at the specified index.

Syntax

[VB]

Public Sub InsertHorizontalSplit(ByVal idx As Integer)

[C#]

public void InsertHorizontalSplit ( System.Int32 idx )

[Delphi]

procedure InsertHorizontalSplit(idx: Integer);

Parameter | Description
idx | A zero-based integer that identifies the position of the new split.

Remarks

By default the list has one horizontal split.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


InsertItem Method

InsertItem Method

Inserts a new item at the index position in the AddItem mode.

Syntax

[VB]

Public Sub InsertItem(ByVal newItem As String, ByVal index As Integer)

[C#]

public void InsertItem ( System.String newItem , System.Int32 index )

[Delphi]

procedure InsertItem(newItem: string; index: Integer);

Example

Insert the third row:

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


InsertVerticalSplit Method

InsertVerticalSplit Method

Inserts a vertical split at the specified index.

Syntax

[VB]

Public Sub InsertVerticalSplit(ByVal idx As Integer)

[C#]

public void InsertVerticalSplit ( System.Int32 idx )

[Delphi]

procedure InsertVerticalSplit(idx: Integer);

Parameter | Description
idx | A zero-based integer that identifies the position of the new split.

Remarks

By default the list has one vertical split.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PointAt Method

PointAt Method

Returns one of the PointAtEnum constants, which indicates the kind of list element beneath the specified coordinate pair.

Syntax

[VB]

Public Function PointAt(ByVal x As Integer, ByVal y As Integer) As C1.Win.C1List.PointAtEnum

[C#]

public C1.Win.C1List.PointAtEnum PointAt ( System.Int32 x , System.Int32 y )

[Delphi]

function PointAt(x: Integer; y: Integer);

Parameter | Description
x, y | Singles that define a coordinate pair in pixels.

Return Value

PointAtEnum constants:

Member Name | Description
NotInList | Coordinates are not in list area.
AtCaption | Coordinates are in caption area.
AtSplitHeader | Coordinates are in a split’s header.
AtSplitSizeBox | Coordinates are in a splits resizing box.
AtRowSelect | Coordinates are in a row selector.
AtRowSize | Coordinates are in a row resizing box.
AtColumnHeader | Coordinates are in a column’s header.
AtColumnFooter | Coordinates are in a column’s footer.
AtColumnSize | Coordinates are in a column’s resizing box.
AtDataArea | Coordinates are in the control’s data area.
AtGroupArea | Coordinates are in the control’s GroupBy area.
AtGroupHeader | Coordinates are in the control’s GroupBy header.

Remarks

The PointAt method returns one of the constants in the preceding list, which indicates the kind of control element beneath the specified coordinate pair.

This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a list element.

Note

You must convert the x and y arguments to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ReBind Method

ReBind Method

Re-establishes the connection with the bound data source.

Syntax

[VB]

Public Sub Rebind()

[C#]

public void Rebind ( )

[Delphi]

procedure Rebind;

Remarks

This method re-establishes the connection with the bound data source, causing the control to perform the same operations that occur when you set the DataSource property at design time.

If you have not modified the list columns at design time, then executing the ReBind method will reset the columns, headings, and other properties based on the current data source.

However, if you have altered the columns in any way at design time (even if you leave the DataMember properties blank), then the list will assume that you wish to maintain the modified list layout and will not automatically reset the columns.

Note

To force the list to reset the column bindings even if the columns were modified at design time, invoke the ClearFields method immediately before ReBind. Conversely, to cancel the list's automatic layout response and force the list to use the current column/field layout, invoke the HoldFields method immediately before ReBind.

The HoldFields method is especially useful in the unbound modes when you have specified the column layout in code and would like to keep it intact after a ReBind operation.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Refetch Method

Refetch Method

Repopulates the cells of the specified column from a data source.

Syntax

[VB]

Public Sub Refetch()

[C#]

public void Refetch ( )

[Delphi]

procedure Refetch;

Remarks

This property also repaints the column's visible cells, firing all events necessary for redisplay.

By default, the list retrieves data automatically as needed. It fetches rows in blocks of ten, and only gathers data for visible columns. However, in some cases, you can improve performance by fetching only the data for a single (changed) column. The Refetch method is provided for this purpose.

Note

The Refetch method does not force the data source control to refresh its own data from the underlying database. You must use data control methods or options to accomplish this.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RefetchCell Method

RefetchCell Method

Repopulates the specified cell from a data source control.

Syntax

[VB]

Public Sub RefetchCell()

Public Sub RefetchCell(ByVal row As Integer)

[C#]

public void RefetchCell ( )

public void RefetchCell ( System.Int32 row )

[Delphi]

procedure RefetchCell;

procedure RefetchCell(row: Integer);

Parameter | Description
row | An optional variant that specifies the row containing the cell to refetch. If not specified, the current row is assumed. If specified, it must be a valid bookmark.

Remarks

The RefetchCell method repopulates the specified cell from a data source control and/or unbound events. It also repaints the cell, firing all events necessary for redisplay.

By default, the list retrieves data automatically as needed. It fetches rows in blocks of ten, and only gathers data for visible columns. However, in some cases, you can improve performance by fetching only the data for a single (changed) cell. The RefetchCell method is provided for this purpose.

Note

The RefetchCell method does not force the data source control to refresh its own data from the underlying database. You must use data control methods or options to accomplish this.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Refresh Method (C1List)

Refresh Method (C1List)

Discards all data and repopulates all cells from a data source.

Syntax

[VB]

Public Overridable Sub Refresh()

[C#]

public virtual void Refresh ()

[Delphi]

procedure Refresh;

Remarks

The Refresh method repaints the entire list. You can use this method to force the list to be repainted and hence cause the appropriate events to fire.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Refresh Method (C1DataColumn)

Refresh Method (C1DataColumn)

Discards all data and repopulates all cells from a data source.

Syntax

[VB]

Public Sub Refresh()

[C#]

public void Refresh ( )

[Delphi]

procedure Refresh;

Remarks

For a C1DataColumn object, the Refresh method repaints the entire column. Normally, the list repaints automatically as needed. However, if you have written handlers for the Paint or OwnerDrawCell events, you can use this method to force a column to be repainted and hence cause the appropriate events to fire.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RefreshCell Method

RefreshCell Method

Repaints the specified cell.

Syntax

[VB]

Public Sub RefreshCell()

Public Sub RefreshCell(ByVal row As Integer)

[C#]

public void RefreshCell ( )

public void RefreshCell ( System.Int32 row )

[Delphi]

procedure RefreshCell;

procedure RefreshCell(row: Integer);

Parameter | Description
row | An optional variant that specifies the row containing the cell to refresh. If not specified, the current row is assumed. If specified, it must be a valid bookmark.

Remarks

Normally, the list repaints automatically as needed. However, if you have written handlers for the Paint or OwnerDrawCell events, you can use this method to force a cell to be repainted and hence cause the appropriate events to fire.

Note

The RefreshCell method does not refetch data from a data source control and/or unbound events.

See Also

C1DataColumn Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RemoveAt Method (GridStyleCollection)

RemoveAt Method (GridStyleCollection)

Removes the specified item from the collection.

Syntax

[VB]

Public Sub RemoveAt(ByVal index As Integer)

[C#]

public void RemoveAt (System.Int32 index)

[Delphi]

procedure RemoveAt(index: Integer: Style): Integer;

Parameter | Description
index | The item to be removed.

See Also

GridStyleCollection Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RemoveHorizontalSplit Method

RemoveHorizontalSplit Method

Removes a horizontal split at the specified index.

Syntax

[VB]

Public Sub RemoveHorizontalSplit(ByVal idx As Integer)

[C#]

public void RemoveHorizontalSplit ( System.Int32 idx )

[Delphi]

procedure RemoveHorizontalSplit(idx: Integer);

Parameter | Description
idx | A zero-based integer that identifies the position of the split to be removed.

Remarks

By default the list has one horizontal split.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RemoveItem Method

RemoveItem Method

Removes the item at the given position in the AddItem mode.

Syntax

[VB]

Public Sub RemoveItem(ByVal index As Integer)

[C#]

public void RemoveItem ( System.Int32 index )

[Delphi]

procedure RemoveItem(idx: Integer);

Example

Remove the second row:

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RemoveVerticalSplit Method

RemoveVerticalSplit Method

Removes a vertical split at the specified index.

Syntax

[VB]

Public Sub RemoveVerticalSplit(ByVal idx As Integer)

[C#]

public void RemoveVerticalSplit ( System.Int32 idx )

[Delphi]

procedure RemoveVerticalSplit(idx: Integer);

Parameter | Description
idx | A zero-based integer that identifies the position of the split to be removed.

Remarks

By default the list has one vertical split.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Reset Method

Reset Method

Resets the entire object to it’s initial state.

Syntax

[VB]

Public Sub Reset()

[C#]

Style.Reset ()

[Delphi]

procedure Reset;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetBackColor Method

ResetBackColor Method

Resets the BackColor property to its default value.

Syntax

[VB]

Public Sub ResetBackColor()

[C#]

Style.ResetBackColor ()

[Delphi]

procedure ResetBackColor;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetBackgroundImage Method

ResetBackgroundImage Method

Resets the BackgroundImage property to its default value.

Syntax

[VB]

Public Sub ResetBackgroundImage()

[C#]

Style.ResetBackgroundImage ()

[Delphi]

procedure ResetBackgroundImage;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetBackgroundPictureDrawMode Method

ResetBackgroundPictureDrawMode Method

Resets the BackgroundPictureDrawMode property to its default value.

Syntax

[VB]

Public Sub ResetBackgroundPictureDrawMode()

[C#]

Style.ResetBackgroundPictureDrawMode ()

[Delphi]

procedure ResetBackgroundPictureDrawMode;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetFont Method

ResetFont Method

Resets the Font property to its default value.

Syntax

[VB]

Public Sub ResetFont()

[C#]

Style.ResetFont ()

[Delphi]

procedure ResetFont;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetForeColor Method

ResetForeColor Method

Resets the ForeColor property to its default value.

Syntax

[VB]

Public Sub ResetForeColor()

[C#]

Style.ResetForeColor ()

[Delphi]

procedure ResetForeColor;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetForegroundImage Method

ResetForegroundImage Method

Resets the ForegroundImage property to its default value.

Syntax

[VB]

Public Sub ResetForegroundImage()

[C#]

Style.ResetForegroundImage ()

[Delphi]

procedure ResetForegroundImage;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetForeGroundPicturePosition Method

ResetForeGroundPicturePosition Method

Resets the ForeGroundPicturePosition property to its default value.

Syntax

[VB]

Public Sub ResetForeGroundPicturePosition()

[C#]

Style.ResetForeGroundPicturePosition ()

[Delphi]

procedure ResetForeGroundPicturePosition;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetHorizontalAlignment Method

ResetHorizontalAlignment Method

Resets the HorizontalAlignment property to its default value.

Syntax

[VB]

Public Sub ResetHorizontalAlignment()

[C#]

Style.ResetHorizontalAlignment ()

[Delphi]

procedure ResetHorizontalAlignment;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetLocked Method

ResetLocked Method

Resets the Locked property to its default value.

Syntax

[VB]

Public Sub ResetLocked()

[C#]

Style.ResetLocked ()

[Delphi]

procedure ResetLocked;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetTrimming Method

ResetTrimming Method

Resets the Trimming property to its default value.

Syntax

[VB]

Public Sub ResetTrimming()

[C#]

Style.ResetTrimming ()

[Delphi]

procedure ResetTrimming;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetVerticalAlignment Method

ResetVerticalAlignment Method

Resets the VerticalAlignment property to its default value.

Syntax

[VB]

Public Sub ResetVerticalAlignment()

[C#]

Style.ResetVerticalAlignment ()

[Delphi]

procedure ResetVerticalAlignment;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResetWrapText Method

ResetWrapText Method

Resets the WrapText property to its default value.

Syntax

[VB]

Public Sub ResetWrapText()

[C#]

Style.ResetWrapText ()

[Delphi]

procedure ResetWrapText;

See Also

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResumeBinding Method

ResumeBinding Method

Resumes data binding notification from the datasource.

Syntax

[VB]

Public Sub ResumeBinding()

[C#]

object.ResumeBinding ()

[Delphi]

procedure ResumeBinding;

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowContaining Method

RowContaining Method

Returns the zero-based index of the display row containing the specified coordinate.

Syntax

[VB]

Public Function RowContaining(ByVal y As Integer) As Integer

[C#]

public System.Int32 RowContaining ( System.Int32 y )

[Delphi]

function RowContaining(y: Integer): Integer;

Parameter | Description
y | A single that defines a vertical coordinate (Y value) in pixels.

Return Value

An integer corresponding to the display row beneath the specified Y coordinate.

Remarks

The RowContaining method returns the zero-based index of the display row containing the specified coordinate. This value ranges from 0 to VisibleRows - 1.

If y is outside of the list's data area, this method returns -1.

Note

You must convert the y argument to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowTop Method

RowTop Method

Returns the Y coordinate of the top of a visible row.

Syntax

[VB]

Public Function RowTop(ByVal row As Integer) As Integer

[C#]

public System.Int32 RowTop ( System.Int32 row )

[Delphi]

function RowTop(row: Integer): Integer;

Parameter | Description
row | An integer denoting a displayed row.

Return Value

A single corresponding to the Y position of the specified display row, based on the coordinate system of the list's container.

Remarks

The RowTop method returns the Y coordinate of the top of a visible row relative to the top of the list, as given by the list's Top property.

Allowable values for the rownumber argument range from 0 to VisibleRows - 1.

Use the RowTop method in conjunction with ItemHeight, Left, and Width to determine the size and placement of controls displayed on top of a list cell.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollCtl Method

ScrollCtl Method

Scrolls the list data area by the specified number of rows and columns.

Syntax

[VB]

Public Sub ScrollCtl(ByVal cols As Integer, ByVal rows As Integer)

[C#]

public void ScrollCtl ( System.Int32 cols , System.Int32 rows )

[Delphi]

procedure ScrollCtl(cols: Integer; rows: Integer);

Parameter | Description
cols | A long integer denoting the number of columns to scroll and the direction in which to scroll them.
rows | A long integer denoting the number of rows to scroll and the direction in which to scroll them.

Remarks

Positive offsets scroll right and down. Negative offsets scroll left and up. Column offsets that are out of range cause a trappable error. Row offsets that are out of range scroll to the beginning or end of the database.

The same effect can be achieved by setting the LeftCol and TopIndex properties, but these must be set independently.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SetAddItemData Method

SetAddItemData Method

Updates the cell data for the AddItem mode.

Syntax

[VB]

Public Sub SetAddItemData(ByVal row As Integer, ByVal col As Integer, ByVal data As String)

[C#]

public void SetAddItemData ( System.Int32 row , System.Int32 col , System.String data)

[Delphi]

procedure SetAddItemData(row: Integer; col: Integer; data: string);

Parameter | Description
row | The zero-based row number.
col | The zero-based column number.
data | The new data for the cell.

Example

· Visual Basic

· C#

· Delphi

The statement above will update the second row and add the first column data to "New String."

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SetSelected Method

SetSelected Method

Selects or unselects a row from the code.

Syntax

[VB]

Public Sub SetSelected(ByVal index As Integer, ByVal value As Boolean)

[C#]

public void SetSelected ( System.Int32 index , System.Boolean value )

[Delphi]

procedure SetSelected(index: Integer; value: Boolean);

Parameter | Description
Index | The zero-based integer that identifies the row number of the control.
Value | The boolean value indicates the status of the selection.

Remarks

SetSelected(index, True) will select the row if it is not selected. SetSelected(index, False) will unselect the row if it is selected.

See Also

C1List Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Sort Method

Sort Method

Sort a specified column for the control.

Syntax

[VB]

Public Sub Sort(ByVal col As Integer, ByVal dir As C1.Win.C1List.SortDirEnum)

Public Sub Sort(ByVal colName As String, ByVal dir As C1.Win.C1List.SortDirEnum)

[C#]

public void Sort ( System.Int32 col , C1.Win.C1List.SortDirEnum dir )

public void Sort ( System.String colName , C1.Win.C1List.SortDirEnum dir )

[Delphi]

procedure Sort(col: Integer; dir: SortDirEnum);

procedure Sort(colName: string; dir: SortDirEnum);

Member Name | Description
col | The column number identifying the column to sort.
colName | The column name identifying the column to sort.
dir | The sort direction.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitContaining Method

SplitContaining Method

Returns the Index value of the split containing the specified coordinate pair.

Syntax

[VB]

Public Function SplitContaining(ByVal x As Integer, ByVal y As Integer) As Integer

[C#]

public System.Int32 SplitContaining ( System.Int32 x , System.Int32 y )

[Delphi]

function SplitContaining(x: Integer; y: Integer): Integer;

Parameter | Description
x, y | Singles that define a coordinate pair in pixels.

Return Value

An integer corresponding to the index of the split beneath the specified coordinate pair.

Remarks

The returned value ranges from 0 to Split.Count – 1.

This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a list column.

If either argument is outside of the list's data area, this method returns -1.

Note

You must convert the x and y arguments to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SuspendBinding Method

SuspendBinding Method

Temporary suspension of data binding notifications from the datasource.

Syntax

[VB]

Public Sub SuspendBinding()

[C#]

public void SuspendBinding ()

[Delphi]

procedure SuspendBinding;

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Event Reference

AfterSort Event

ColFootClick Event

ColHeadClick Event

ColMove Event

ColResize Event

DataSourceChanged Event

DisplayMemberChanged Event

Error Event

FetchCellStyle Event

FetchCellTips Event

FetchRowStyle Event

FetchScrollTips Event

FormatText Event

LayoutReady Event

LeftColChange Event

OnScroll Event

OwnerDrawCell Event

RowChange Event

RowResize Event

SelChange Event

SelectedValueChanged Event

TopIndexChange Event

UnboundColumnFetch Event

ValueMemberChanged Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AfterSort Event

AfterSort Event

Fires after a column is sorted by clicking the column header.

Syntax

[VB]

Public Event AfterSort(ByVal sender As Object, ByVal e As C1.Win.C1List.FilterEventArgs) As C1.Win.C1List.FilterEventHandler

[C#]

public event C1.Win.C1List.FilterEventHandler AfterSort

[Delphi]

property AfterSort: FilterEventHandler;

Event Data

The event handler receives an argument of type FilterEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Condition | The condition that can be used to sort or filter the data source.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColFootClick Event

ColFootClick Event

Fires when the footer of the control is clicked.

Syntax

[VB]

Public Event ColFootClick(ByVal sender As Object, ByVal e As C1.Win.C1List.ColEventArgs) As C1.Win.C1List.ColEventHandler

[C#]

public event C1.Win.C1List.ColEventHandler ColFootClick

[Delphi]

property ColFootClick: ColEventHandler;

Event Data

The event handler receives an argument of type ColEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
ColIndex | The current column index.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColHeadClick Event

ColHeadClick Event

Fires when the headers of the control is clicked.

Syntax

[VB]

Public Event ColHeadClick(ByVal sender As Object, ByVal e As C1.Win.C1List.ColEventArgs) As C1.Win.C1List.ColEventHandler

[C#]

public event C1.Win.C1List.ColEventHandler ColHeadClick

[Delphi]

property ColHeadClick: ColEventHandler;

Event Data

The event handler receives an argument of type ColEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
ColIndex | The current column index.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMove Event

ColMove Event

Fires when the user has finished moving the selected columns.

Syntax

[VB]

Public Event ColMove As ColMoveEventHandler

[C#]

public event C1.Win.C1List.ColMoveEventHandler ColMove

[Delphi]

property ColMove: ColMoveEventHandler;

Event Data

The event handler receives an argument of type ColMoveEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Position | An integer that specifies the target location of the selected columns.
Cancel | A boolean that may be set to True to prohibit movement.

Remarks

The ColMove event occurs when the user has finished moving the selected columns. Your event procedure can either accept the movement or cancel it altogether.

The Position argument ranges from 0, which denotes the left edge, to the total number of columns, which denotes the right edge.

If you set the Cancel argument to True, no movement occurs. Selected columns always remain selected, regardless of the Cancel setting.

Note

This event is only fired when the user moves the selected columns to a new location.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResize Event

ColResize Event

Fires after the user has finished resizing a column.

Syntax

[VB]

Public Event ColResize As ColResizeEventHandler

[C#]

public event C1.Win.C1List.ColResizeEventHandler ColResize

[Delphi]

property ColResize: ColResizeEventHandler;

Event Data

The event handler receives an argument of type ColResizeEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
ColIndex | An integer that identifies the column that was resized.
Cancel | A boolean that may be set to True to undo resizing.

Remarks

The ColResize event occurs after the user has finished resizing a column, but before columns to the right are repositioned. Your event procedure can accept the change, alter the degree of change, or cancel the change completely.

If you set the Cancel argument to True, the previous column width is restored and no repainting occurs. To alter the degree of change, set the Width property of the C1DataColumn object specified by the ColIndex argument to the desired value.

It is not necessary to execute the Refresh method within this event procedure. Doing so causes the list to be repainted even if the Cancel argument is True.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataSourceChanged Event

DataSourceChanged Event

Fires when a bound data source is changed or requeried.

Syntax

[VB]

Public Event DataSourceChanged As EventHandler

[C#]

public event System.EventHandler DataSourceChanged

[Delphi]

property DataSourceChanged: EventHandler;

Event Data

No arguments

Remarks

This event also fires when a bound list control is first loaded.

The DataSourceChanged event fires before the list is filled with data. Therefore, you can use this event to initialize the list according to information obtained from the data source, if necessary.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DisplayMemberChanged Event

DisplayMemberChanged Event

Occurs when the DisplayMember property changes.

Syntax

[VB]

Public Event DisplayMemberChanged As EventHandler

[C#]

public event System.EventHandler DisplayMemberChanged

[Delphi]

property DisplayMemberChanged: EventHandler;

Event Data

The event handler receives an argument of type EventArgs containing data related to this event.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Error Event

Error Event

Fires when a data access error occurs.

Syntax

[VB]

Public Event Error As ErrorEventHandler

[C#]

public event C1.Win.C1List.ErrorEventHandler Error

[Delphi]

property Error: ErrorEventHandler;

Event Data

The event handler receives an argument of type ErrorEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Exception | The exception thrown by the operating system.
Handled | Indicates whether the user handled the error.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyle Event

FetchCellStyle Event

Fires when the list is about to display cell data in a column whose FetchStyle property is set to True.

Syntax

[VB]

Public Event FetchCellStyle As FetchCellStyleEventHandler

[C#]

public event C1.Win.C1List.FetchCellStyleEventHandler FetchCellStyle

[Delphi]

property FetchCellStyle: FetchCellStyleEventHandler;

Event Data

The event handler receives an argument of type FetchCellStyleEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Condition | The sum of one or more CellStyleFlag constants describing the disposition of the cell being displayed.
Split | An integer that identifies the split containing the cell being displayed. This argument is omitted for C1Combo controls.
Row | An integer that identifies the row containing the cell being displayed.
Col | An integer that identifies the column containing the cell being displayed.
CellStyle | A Style object used to override the font and color characteristics of the cell being displayed.

Remarks

The FetchCellStyle event occurs when the list is about to display cell data in a column whose FetchStyle property is set to True. By setting one or more properties of the Style object passed in the CellStyle parameter, your application can change the appearance of individual cells.

You can also set the ForegroundImage property of the CellStyle parameter to display distinct bitmaps on a per-cell basis.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTips Event

FetchCellTips Event

Fires when the control has focus and the cursor is idle for a small amount of time (defined by the CellTipsDelay property) over a data cell, column header, column footer, split header or control caption bar.

Syntax

[VB]

Public Event FetchCellTips As FetchCellTipsEventHandler

[C#]

public event C1.Win.C1List.FetchCellTipsEventHandler FetchCellTips

[Delphi]

property FetchCellStyle: FetchCellTipsEventHandler;

Event Data

The event handler receives an argument of type FetchCellTipsEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
SplitIndex | The zero-based index of the split the cursor is over.
ColIndex | An integer that identifies the column the cursor is over. This is either a zero-based column index or a CellTipEnum value.
Row | An integer that identifies the row the cursor is over. This is either a zero-based row index or a CellTipEnum value.
CellTip | Contains the text to be displayed in the popup text box.
FullyDisplayed | A boolean that is True if the CellTips will fit entirely within the boundaries of the cell.
TipStyle | A Style object used to override the font and color characteristics of the cell tip text.

Remarks

This event will not fire if the cursor is over the scroll bars.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyle Event

FetchRowStyle Event

Fires whenever the list is about to display a row of data and the FetchRowStyles property is True.

Syntax

[VB]

Public Event FetchRowStyle As FetchRowStyleEventHandler

[C#]

public event C1.Win.C1List.FetchRowStyleEventHandler FetchRowStyle

[Delphi]

property FetchRowStyle: FetchRowStyleEventHandler;

Event Data

The event handler receives an argument of type FetchRowStyleEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Split | The zero-based index of the split for which formatting information is being requested. This argument is omitted for C1Combo controls.
Row | An integer that uniquely identifies the row to be displayed.
CellStyle | A Style object used to convey font and color information to the list.

Remarks

The FetchRowStyle event is fired whenever the list is about to display a row of data, but only if the FetchRowStyles property is True for the list or one of its splits.

Use the FetchRowStyle event to control formatting on a per-row basis, as it is much more efficient than coding the FetchCellStyle event to apply the same formatting to all columns.

Note

A common application of row-based formatting is to present rows in alternating colors to enhance their readability. Although you could use the FetchRowStyle event to achieve this effect, the AlternatingRows property is easier to use, as it requires no coding.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTips Event

FetchScrollTips Event

Fires whenever the list has focus and the scrollbar thumb is moved using the mouse.

Syntax

[VB]

Public Event FetchScrollTips As FetchScrollTipsEventHandler

[C#]

public event C1.Win.C1List.FetchScrollTipsEventHandler FetchScrollTips

[Delphi]

property FetchScrollTips: FetchScrollTipsEventHandler;

Event Data

The event handler receives an argument of type FetchScrollTipsEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
SplitIndex | The zero-based index of the split that the scrollbar is associated with. This argument is omitted for C1Combo controls.
Row | An integer that uniquely identifies the topmost list row.
ScrollBar | A ScrollBarEnum constant that identifies the scrollbar that was moved.
ScrollTip | The text to be displayed in the pop-up text box.
TipStyle | A Style object used to override the font and color characteristics of the scroll tip text.

Remarks

If the ScrollTips property is True, the FetchScrollTips event will be fired whenever the list has focus and the scrollbar thumb is moved using the mouse.

By setting the properties of the TipStyle object, you can control the background color, text color, and font of the pop-up text box. By default, the TipStyle object uses the system ToolTip colors and the font attributes of the current split.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatText Event

FormatText Event

Fires when the list is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.

Syntax

[VB]

Public Event FormatText As FormatTextEventHandler

[C#]

public event C1.Win.C1List.FormatTextEventHandler FormatText

[Delphi]

property FormatText: FormatTextEventHandler;

Event Data

The event handler receives an argument of type FormatTextEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
ColIndex | An integer that identifies the column being displayed.
Value | A string containing the underlying data value.
Row | An integer that uniquely identifies the row from which the underlying data value was obtained.

Remarks

The Value argument contains the underlying data value and also serves as a placeholder for the formatted data to be displayed.

This event allows you to provide your own text formatting for cases where Visual Basic's intrinsic formatting is either unavailable or does not suit your needs.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


LayoutReady Event

LayoutReady Event

Fires when asynchronous downloading of a control layout file has been completed.

Syntax

[VB]

Public Event LayoutReady As EventHandler

[C#]

public event System.EventHandler LayoutReady

[Delphi]

property LayoutReady: EventHandler;

Event Data

No arguments

See Also

C1List Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


LeftColChange Event

LeftColChange Event

Fires when the first visible column of a list or split is changed.

Syntax

[VB]

Public Event LeftColChange As SplitEventHandler

[C#]

public event C1.Win.C1List.SplitEventHandler LeftColChange

[Delphi]

property LeftColChange: SplitEventHandler;

Event Data

The event handler receives an argument of type SplitEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
SplitIndex | The zero-based index of the split in which the column change occurred. This argument is omitted for C1Combo controls.

Remarks

The LeftColChange event occurs when the first visible column of a list or split is changed. This event is triggered under several circumstances:

· When the list is first displayed.

· When the user scrolls through the list with the horizontal scroll bar or navigation keys.

· When the LeftCol property is changed in code to a different value.

· When the Visible property of the current left column is set to False.

· When the Width property of the current left column is set to 0.

· When the user resizes the current left column so that it is no longer visible.

· When the user moves the current left column or moves another column into its place.

When multiple cell change events are sent, the order will be TopIndexChange, LeftColChange, and RowChange.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OnScroll Event

OnScroll Event

Fires when the user scrolls the list horizontally or vertically using the scroll bars.

Syntax

[VB]

Public Event OnScroll As CancelEventHandler

[C#]

public event System.ComponentModel.CancelEventHandler OnScroll

[Delphi]

property OnScroll: CancelEventHandler;

Event Data

The event handler receives an argument of type CancelEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Cancel | A boolean that may be set to True to prevent the scroll operation from occurring.

Remarks

This event is fired before the list is repainted to display the results of the scroll operation. If you set the Cancel argument to True, the scroll operation fails and no repainting occurs.

It is not necessary to execute the Refresh method within this event procedure. Doing so causes the list to be repainted even if the Cancel argument is True.

You can use this event to perform calculations or to manipulate controls that must be coordinated with ongoing changes in the list's scroll bars.

Note

Within this event procedure, the values of the TopIndex and LeftCol properties are not updated to reflect the pending scroll operation. You cannot determine the orientation or magnitude of the pending scroll operation by examining these properties.

Avoid using a MsgBox statement or function in this event.

This event only fires when the user operates the scroll bars; it will not fire in response to keyboard navigation, data control notifications, or code.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCell Event

OwnerDrawCell Event

Fires just before the cell is to be painted.

Syntax

[VB]

Public Event OwnerDrawCell As OwnerDrawCellEventHandler

[C#]

public event C1.Win.C1List.OwnerDrawCellEventHandler OwnerDrawCell

[Delphi]

property OwnerDrawCell: OwnerDrawCellEventHandler;

Event Data

The event handler receives an argument of type OwnerDrawCellEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
CellRect | The cell rectangle that needs drawn.
Row | The row index of the cell that needs drawn.
Split | The split index of the cell that needs drawn.
Col | The column index of the cell that needs drawn.
Graphics | The GDI+ graphics object to render on.
Handled | Boolean which is set to True if event performed OwnerDraw.
Text | The Displaying Text for this cell.

Remarks

The OwnerDrawCell event occurs just before the cell specified by the Row, Col, and Split arguments is to be painted. This event is only fired for columns in which the OwnerDraw property is set to True.

You can use this event to customize the appearance of individual cells by drawing directly to the list's device context using standard Windows GDI calls.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowChange Event

RowChange Event

Fires when the user changes a row in the list.

Syntax

[VB]

Public Event RowChange As EventHandler

[C#]

public event System.EventHandler RowChange

[Delphi]

property RowChange: EventHandler;

Event Data

No arguments

Remarks

This event is triggered under several circumstances:

· When a dropdown is first displayed.

· When the user moves the current row by clicking on another row or using the navigation keys.

· During incremental searching.

The current row position is provided by the Bookmark property.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowResize Event

RowResize Event

Fires when the user has finished resizing a list row.

Syntax

[VB]

Public Event RowResize As CancelEventHandler

[C#]

public event System.ComponentModel.CancelEventHandler RowResize

[Delphi]

property RowResize: CancelEventHandler;

Event Data

The event handler receives an argument of type CancelEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Cancel | A boolean that may be set to True to undo resizing.

Remarks

The RowResize event occurs when the user has finished resizing a list row. Your event procedure can accept the change, alter the degree of change, or cancel the change completely.

The C1List control's ItemHeight property determines the height of all rows in the control.

If you set the Cancel argument to True, the previous row height is restored and no repainting occurs. To alter the degree of change, set the ItemHeight property to the desired value.

It is not necessary to execute the Refresh method within this event procedure. Doing so causes the list to be repainted even if the Cancel argument is True.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelChange Event

SelChange Event

Fires when the user selects a different range of rows or columns.

Syntax

[VB]

Public Event SelChange As CancelEventHandler

[C#]

public event System.ComponentModel.CancelEventHandler SelChange

[Delphi]

property SelChange: CancelEventHandler;

Event Data

The event handler receives an argument of type CancelEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Cancel | A boolean that may be set to True to undo the new selection.

Remarks

The SelChange event occurs when the user selects a different range of rows or columns. This event is triggered under several circumstances:

· When the user selects a single row by clicking anywhere within the row.

· When the user adds a row to the list of selected rows by clicking anywhere within the row while holding down the Ctrl key.

· When the user selects a single column by clicking its header.

· When the user changes the range of selected columns by dragging to an adjacent column within the header row.

· When the user extends the range of selected columns by holding down the Shift key and clicking an unselected column header.

The current range of selected columns is provided by the SelectedIndices and SelectedCols properties. The bookmarks of the selected rows are available in the SelectedRowCollection. Within this event procedure, these properties and collections reflect the user's pending selection(s).

If your event procedure sets the Cancel argument to True, the previous row and column selections (if any) are restored, and the aforementioned properties revert to their previous values.

This event is only triggered by user interaction with the list. It cannot be triggered by code.

Note

When the user selects a column, any row selections are cleared. Similarly, when the user selects a row, any column selections are cleared.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedValueChanged Event

SelectedValueChanged Event

Occurs when the SelectedValue property changes.

Syntax

[VB]

Public Event SelectedValueChanged As EventHandler

[C#]

public event System.EventHandler SelectedValueChanged

[Delphi]

property SelectedValueChanged: EventHandler;

Event Data

The event handler receives an argument of type EventArgs containing data related to this event.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


TopIndexChange Event

TopIndexChange Event

Fires when the TopIndex property changes.

Syntax

[VB]

Public Event TopIndexChange As SplitEventHandler

[C#]

public event C1.Win.C1List.SplitEventHandler TopIndexChange

[Delphi]

property TopIndexChange: SplitEventHandler;

Event Data

The event handler receives an argument of type SplitEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
SplitIndex | The zero-based index of the split in which the row change occurred. This argument is omitted for C1Combo controls.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetch Event

UnboundColumnFetch Event

Fires when the control needs to display the value of a cell in an unbound column.

Syntax

[VB]

Public Event UnboundColumnFetch As UnboundColumnFetchEventHandler

[C#]

public event C1.Win.C1List.UnboundColumnFetchEventHandler UnboundColumnFetch

[Delphi]

property UnboundColumnFetch: UnboundColumnFetchEventHandler;

Event Data

The event handler receives an argument of type UnboundColumnFetchEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Row | An integer that that identifies the row being requested.
Col | An integer that identifies the column being requested.
Value | A String used to transfer unbound column data to the list.

Remarks

The UnboundColumnFetch event is fired when a bound needs to display the value of a cell in an unbound column as specified by the Row and Col arguments. For a bound list, any column with an empty DataMember property and a non-empty Caption property is considered an unbound column.

To return an unbound value to the list, simply set the Value argument to the desired result. If you do not assign a value, the cell will remain blank.

Use this event to implement calculated fields based on other columns or to display local data alongside remote bound data.

Your application is responsible for storing data entered into an unbound column by the user. If an unbound column is used to display a calculated result based on other columns, then you do not need to store the unbound values since they can always be calculated "on the fly" using either the C1DataColumn object's Text property or data access objects.

Note

During the execution of this event, row movement is not permitted.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueMemberChanged Event

ValueMemberChanged Event

Occurs when the ValueMember property changes.

Syntax

[VB]

Public Event ValueMemberChanged As EventHandler

[C#]

public event System.EventHandler ValueMemberChanged

[Delphi]

property ValueMemberChanged: EventHandler;

Event Data

The event handler receives an argument of type EventArgs containing data related to this event.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Event Handler Reference

ColEventHandler Delegate

ColMoveEventHandler Delegate

ColResizeEventHandler Delegate

ErrorEventHandler Delegate

EventHandler Delegate

FetchCellStyleEventHandler Delegate

FetchCellTipsEventHandler Delegate

FetchRowStyleEventHandler Delegate

FetchScrollTipsEventHandler Delegate

FilterEventHandler Delegate

FormatTextEventHandler Delegate

OwnerDrawCellEventHandler Delegate

RowColChangeEventHandler Delegate

SplitEventHandler Delegate

UnboundColumnFetchEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColEventHandler Delegate

ColEventHandler Delegate

Syntax

[VB]

Public Delegate Sub ColEventHandler (object sender, ColEventArgs e)

[C#]

public sealed delegate ColEventHandler : System.MulticastDelegate

[Delphi]

type ColEventHandler = procedure(sender: System.Object; e: ColEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A ColEventArgs object that contains the event data.

See Also

ColFootClick Event

ColHeadClick Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventHandler Delegate

ColMoveEventHandler Delegate

Syntax

[VB]

Public Delegate Sub ColMoveEventHandler (object sender, ColMoveEventArgs e)

[C#]

public sealed delegate ColMoveEventHandler : System.MulticastDelegate

[Delphi]

type ColMoveEventHandler = procedure(sender: System.Object; e: ColMoveEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A ColMoveEventArgs object that contains the event data.

See Also

ColMove Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventHandler Delegate

ColResizeEventHandler Delegate

Syntax

[VB]

Public Delegate Sub ColResizeEventHandler (object sender, ColResizeEventArgs e)

[C#]

public sealed delegate ColResizeEventHandler : System.MulticastDelegate

[Delphi]

type ColResizeEventHandler = procedure(sender: System.Object; e: ColResizeEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A ColResizeEventArgs object that contains the event data.

See Also

ColResize Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ErrorEventHandler Delegate

ErrorEventHandler Delegate

Syntax

[VB]

Public Delegate Sub ErrorEventHandler (object sender, ErrorEventArgs e)

[C#]

public sealed delegate ErrorEventHandler : System.MulticastDelegate

[Delphi]

type ErrorEventHandler = procedure(sender: System.Object; e: ErrorEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A ErrorEventArgs object that contains the event data.

See Also

Error Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


EventHandler Delegate

EventHandler Delegate

See Also

See Microsoft .NET Documentation.

See Also

DataSourceChanged Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventHandler Delegate

FetchCellStyleEventHandler Delegate

Syntax

[VB]

Public Delegate Sub FetchCellStyleEventHandler (object sender, FetchCellStyleEventArgs e)

[C#]

public sealed delegate FetchCellStyleEventHandler : System.MulticastDelegate

[Delphi]

type FetchCellStyleEventHandler = procedure(sender: System.Object; e: FetchCellStyleEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FetchCellStyleEventArgs object that contains the event data.

See Also

FetchCellStyle Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventHandler Delegate

FetchCellTipsEventHandler Delegate

Syntax

[VB]

Public Delegate Sub FetchCellTipsEventHandler (object sender, FetchCellTipsEventArgs e)

[C#]

public sealed delegate FetchCellTipsEventHandler : System.MulticastDelegate

[Delphi]

type FetchCellTipsEventHandler = procedure(sender: System.Object; e: FetchCellTipsEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FetchCellTipsEventArgs object that contains the event data.

See Also

FetchCellTips Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventHandler Delegate

FetchRowStyleEventHandler Delegate

Syntax

[VB]

Public Delegate Sub FetchRowStyleEventHandler (object sender, FetchRowStyleEventArgs e)

[C#]

public sealed delegate FetchRowStyleEventHandler : System.MulticastDelegate

[Delphi]

type FetchRowStyleEventHandler = procedure(sender: System.Object; e: FetchRowStyleEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FetchRowStyleEventArgs object that contains the event data.

See Also

FetchRowStyle Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventHandler Delegate

FetchScrollTipsEventHandler Delegate

Syntax

[VB]

Public Delegate Sub FetchScrollTipsEventHandler (object sender, FetchScrollTipsEventArgs e)

[C#]

public sealed delegate FetchScrollTipsEventHandler : System.MulticastDelegate

[Delphi]

type FetchScrollTipsEventHandler = procedure(sender: System.Object; e: FetchScrollTipsEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FetchScrollTipsEventArgs object that contains the event data.

See Also

FetchScrollTips Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FilterEventHandler Delegate

FilterEventHandler Delegate

Syntax

[VB]

Public Delegate Sub FilterEventHandler (object sender, FilterEventArgs e)

[C#]

public sealed delegate Filter EventHandler : System.MulticastDelegate

[Delphi]

type Filter EventHandler = procedure(sender: System.Object; e: FilterEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FilterEventArgs object that contains the event data.

See Also

AfterSort Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventHandler Delegate

FormatTextEventHandler Delegate

Syntax

[VB]

Public Delegate Sub FormatTextEventHandler (object sender, FormatTextEventArgs e)

[C#]

public sealed delegate FormatTextEventHandler : System.MulticastDelegate

[Delphi]

type FormatTextEventHandler = procedure(sender: System.Object; e: FormatTextEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FormatTextEventArgs object that contains the event data.

See Also

FormatText Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventHandler Delegate

OwnerDrawCellEventHandler Delegate

Syntax

[VB]

Public Delegate Sub OwnerDrawCellEventHandler (object sender, OwnerDrawCellEventArgs e)

[C#]

public sealed delegate OwnerDrawCellEventHandler : System.MulticastDelegate

[Delphi]

type OwnerDrawCellEventHandler = procedure(sender: System.Object; e: OwnerDrawCellEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | An OwnerDrawCellEventArgs object that contains the event data.

See Also

OwnerDrawCell Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowColChangeEventHandler Delegate

RowColChangeEventHandler Delegate

Syntax

[VB]

Public Delegate Sub RowColChangeEventHandler (object sender, RowColChangeEventArgs e)

[C#]

public sealed delegate RowColChangeEventHandler : System.MulticastDelegate

[Delphi]

type RowColChangeEventHandler = procedure(sender: System.Object; e: RowColChangeEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A RowColChangeEventArgs object that contains the event data.

See Also

RowChange Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitEventHandler Delegate

SplitEventHandler Delegate

Syntax

[VB]

Public Delegate Sub SplitEventHandler (object sender, SplitEventArgs e)

[C#]

public sealed delegate SplitEventHandler : System.MulticastDelegate

[Delphi]

type SplitEventHandler = procedure(sender: System.Object; e: SplitEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A SplitEventArgs object that contains the event data.

See Also

TopIndexChange Event

LeftColChange Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventHandler Delegate

UnboundColumnFetchEventHandler Delegate

Syntax

[VB]

Public Delegate Sub UnboundColumnFetchEventHandler (object sender, UnboundColumnFetchEventArgs e)

[C#]

public sealed delegate UnboundColumnFetchEventHandler : System.MulticastDelegate

[Delphi]

type UnboundColumnFetchEventHandler = procedure(sender: System.Object; e: UnboundColumnFetchEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | An UnboundColumnFetchEventArgs object that contains the event data.

See Also

UnboundColumnFetch Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Event Argument Reference

CancelEventArgs Argument

ColEventArgs Argument

ColMoveEventArgs Argument

ColResizeEventArgs Argument

FetchCellStyleEventArgs Argument

FetchCellTipsEventArgs Argument

FetchRowStyleEventArgs Argument

FetchScrollTipsEventArgs Argument

FilterEventArgs Argument

FormatTextEventArgs Argument

OwnerDrawCellEventArgs Argument

RowColChangeEventArgs Argument

SplitEventArgs Argument

UnboundColumnFetchEventArgs Argument

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CancelEventArgs Argument

CancelEventArgs Argument

Syntax

[VB]

Public Class CancelEventArgs

[C#]

public class CancelEventArgs

[Delphi]

type CancelEventArgs: class(EventArgs);

Members

Public Boolean Cancel

Member | Description
Cancel | A boolean that may be set to True to prevent the executing of a task.

See Also

CancelEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColEventArgs Argument

ColEventArgs Argument

Syntax

[VB]

Public Class ColEventArgs

[C#]

public class ColEventArgs : System.EventArgs

[Delphi]

type ColEventArgs: class(EventArgs);

Members

Public Readonly Integer ColIndex

Member | Description
ColIndex | An integer that identifies the column that an action is to be executed upon.

See Also

ColEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventArgs Argument

ColMoveEventArgs Argument

Syntax

[VB]

Public Class ColMoveEventArgs

[C#]

public class ColMoveEventArgs : System.EventArgs

[Delphi]

type ColMoveEventArgs: class(EventArgs);

Members

Public Readonly Integer Position

Public Readonly Integer ColIndex

Public Boolean Cancel

Member | Description
Position | An integer that specifies the target location of the selected columns.
ColIndex | An integer that specifies the current location of the selected column.
Cancel | A boolean that may be set to True to prohibit movement.

See Also

ColMoveEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventArgs Argument

ColResizeEventArgs Argument

Syntax

[VB]

Public Class ColResizeEventArgs

[C#]

public class ColResizeEventArgs : System.EventArgs

[Delphi]

type ColResizeEventArgs: class(EventArgs);

Members

Public Readonly Integer ColIndex

Public Boolean Cancel

Member | Description
ColIndex | An integer that identifies the column that was resized.
Cancel | A boolean that may be set to True to undo resizing.

See Also

ColResizeEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs Argument

FetchCellStyleEventArgs Argument

Syntax

[VB]

Public Class FetchCellStyleEventArgs

[C#]

public class FetchCellStyleEventArgs : System.EventArgs

[Delphi]

type FetchCellStyleEventArgs: class(EventArgs);

Members

Public Readonly CellStyleFlag Condition

Public Readonly Integer Split

Public Readonly Integer Row

Public Readonly Integer Col

Public Readonly Style CellStyle

Member | Description
Condition | The sum of one or more CellStyleFlag constants describing the disposition of the cell being displayed.
Split | An integer that identifies the split containing the cell being displayed. This argument is omitted for C1Combo controls.
Row | An integer that identifies the row containing the cell being displayed.
Col | An integer that identifies the column containing the cell being displayed.
CellStyle | A Style object used to override the font and color characteristics of the cell being displayed.

See Also

FetchCellStyleEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs Argument

FetchCellTipsEventArgs Argument

Syntax

[VB]

Public Class FetchCellTipsEventArgs

[C#]

public class FetchCellTipsEventArgs : System.EventArgs

[Delphi]

type FetchCellTipsEventArgs: class(EventArgs);

Members

Public Readonly Integer SplitIndex

Public Readonly Integer ColIndex

Public Readonly Integer Row

Public String CellTip

Public Readonly Boolean FullyDisplayed

Public Readonly Style TipStyle

Member | Description
SplitIndex | The zero-based index of the split the cursor is over.
ColIndex | An integer that identifies the column the cursor is over. This is either a zero-based column index or a (negative) CellTipEnum value.
RowIndex | An integer that identifies the row the cursor is over. This is either a zero-based row index or a (negative) CellTipEnum value.
CellTip | The text to be displayed in the pop-up text box.
FullyDisplayed | A boolean that is True if CellTip will fit entirely within the boundaries of the cell.
TipStyle | Style object used to override the font and color characteristics of the cell tip text.

See Also

FetchCellTipsEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventArgs Argument

FetchRowStyleEventArgs Argument

Syntax

[VB]

Public Class FetchRowStyleEventArgs

[C#]

public class FetchRowStyleEventArgs : System.EventArgs

[Delphi]

type FetchRowStyleEventArgs: class(EventArgs);

Members

Public Readonly Integer Split

Public Readonly Integer Row

Public Readonly Style CellStyle

Member | Description
Split | The zero-based index of the split for which formatting information is being requested. This argument is omitted for C1Combo controls.
Row | An integer that uniquely identifies the row to be displayed.
CellStyle | A Style object used to convey font and color information to the list.

See Also

FetchRowStyleEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs Argument

FetchScrollTipsEventArgs Argument

Syntax

[VB]

Public Class FetchScrollTipsEventArgs

[C#]

public class FetchScrollTipsEventArgs : System.EventArgs

[Delphi]

type FetchScrollTipsEventArgs: class(EventArgs);

Members

Public Readonly Integer SplitIndex

Public Readonly Integer ColIndex

Public Readonly Integer Row

Public Readonly ScrollBarEnum ScrollBar

Public String ScrollTip

Public Readonly Style TipStyle

Member | Description
SplitIndex | The zero-based index of the split that the scrollbar is associated with. This argument is omitted for C1Combo controls.
ColIndex | An integer that identifies the current column.
Row | An integer that uniquely identifies the topmost list row.
ScrollBar | A ScrollBarEnum constant that identifies the scrollbar that was moved.
ScrollTip | The text to be displayed in the pop-up text box.
TipStyle | A Style object used to override the font and color characteristics of the scroll tip text.

See Also

FetchScrollTipsEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FilterEventArgs Argument

FilterEventArgs Argument

Syntax

[VB]

Public Class FilterEventArgs

[C#]

public class FilterEventArgs: System.EventArgs

[Delphi]

type FilterEventArgs: class(EventArgs);

Members

Public Readonly String Condition

Member | Description
Condition | The condition that can be used to sort or filter the data source.

See Also

FilterEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventArgs Argument

FormatTextEventArgs Argument

Syntax

[VB]

Public Class FormatTextEventArgs

[C#]

public class FormatTextEventArgs : System.EventArgs

[Delphi]

type FormatTextEventArgs: class(EventArgs);

Members

Public Readonly Integer ColIndex

Public Readonly Integer Row

Public String Value

Member | Description
ColIndex | An integer that identifies the column being displayed.
Row | An integer that uniquely identifies the row from which the underlying data value was obtained.
Value | A string containing the underlying data value.

See Also

FormatTextEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs Argument

OwnerDrawCellEventArgs Argument

Syntax

[VB]

Public Class OwnerDrawEventArgs

[C#]

public class OwnerDrawCellEventArgs : System.EventArgs

[Delphi]

type OwnerDrawCellEventArgs: class(EventArgs);

Members

Public Readonly Rectangle CellRect

Public Readonly Integer Row, Split, Col

Public Readonly Graphics Graphics

Public Readonly String Text

Public Boolean Handled

Member | Description
CellRect | The cell rectangle that needs drawn.
Row | The row index of the cell that needs drawn.
Split | The split index of the cell that needs drawn.
Col | The column index of the cell that needs drawn.
Graphics | The GDI+ graphics object to render on.
Handled | Boolean which is set to True if event performed OwnerDraw.
Text | The displaying string for the cell.

See Also

OwnerDrawCellEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowColChangeEventArgs Argument

RowColChangeEventArgs Argument

Syntax

[VB]

Public class RowColChangeEventArgs

[C#]

public class RowColChangeEventArgs : System.EventArgs

[Delphi]

type RowColChangeEventArgs: class(EventArgs);

Members

Public Readonly Integer LastRow

Public Readonly Integer LastCol

Members | Description
LastRow | Bookmark that identifies the former current row.
LastCol | An integer that identifies the former current column.

See Also

RowColChangeEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitEventArgs Argument

SplitEventArgs Argument

Syntax

[VB]

Public Class SplitEventArgs

[C#]

public class SplitEventArgs : System.EventArgs

[Delphi]

type SplitEventArgs: class(EventArgs);

Members

Public Readonly Integer SplitIndex

Member | Description
SplitIndex | The zero-based index of the split which an action is to be executed upon.

See Also

SplitEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventArgs Argument

UnboundColumnFetchEventArgs Argument

Syntax

[VB]

Public Class UnboundColumnFetchEventArgs

[C#]

public class UnboundColumnFetchEventArgs : System.EventArgs

[Delphi]

type UnboundColumnFetchEventArgs: class(EventArgs);

Members

Public Readonly Integer Row

Public Readonly Integer Col

Public String Value

Member | Description
Row | An integer that that identifies the row being requested.
Col | An integer that identifies the column being requested.
Value | A string used to transfer unbound column data to the list.

See Also

UnboundColumnFetchEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1List Enumeration Reference

AlignHorzEnum Enumeration

AlignVertEnum Enumeration

BackgroundPictureDrawModeEnum Enumeration

BorderTypeEnum Enumeration

CellStyleFlag Enumeration

CellTipEnum Enumeration

DataModeEnum Enumeration

DataViewEnum Enumeration

FlatModeEnum Enumeration

ForeGroundPicturePositionEnum Enumeration

LineStyleEnum Enumeration

MatchColEnum Enumeration

MatchCompareEnum Enumeration

MatchEntryEnum Enumeration

PointAtEnum Enumeration

PresentationEnum Enumeration

RowSizingEnum Enumeration

ScrollBarEnum Enumeration

ScrollBarStyleEnum Enumeration

SelectionModeEnum Enumeration

SizeModeEnum Enumeration

SortDirEnum Enumeration

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AlignHorzEnum Enumeration

AlignHorzEnum Enumeration

Specifies the Horizontal Alignment in a cell.

Syntax

[VB]

Public Enum AlignHorzEnum

[C#]

public sealed enum AlignHorzEnum : System.Enum

[Delphi]

type AlignHorzEnum = (General, Near, Center, Far, Justify);

Remarks

Use the members of this enumeration to set the value of the HorizontalAlignment property in the C1List class.

Member Name | Description
General | Sets cell text to be left-aligned and numbers to be right-aligned.
Near | Aligns cell text to the near side of the cell (left side in left-to-right mode).
Center | Aligns text in a cell to the center.
Far | Aligns cell text to the far side of the cell (right side in left-to-right mode).
Justify | Spreads text throughout cell.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AlignVertEnum Enumeration

AlignVertEnum Enumeration

Specifies the Vertical Alignment in a cell.

Syntax

[VB]

Public Enum AlignVertEnum

[C#]

public sealed enum AlignVertEnum : System.Enum

[Delphi]

type AlignVertEnum = (Top, Center, Bottom);

Remarks

Use the members of this enumeration to set the value of the VerticalAlignment property in the C1List class.

Member Name | Description
Top | Aligns text in a cell to the top.
Center | Aligns text in a cell in the center.
Bottom | Aligns text in a cell to the bottom.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BackgroundPictureDrawModeEnum Enumeration

BackgroundPictureDrawModeEnum Enumeration

Syntax

[VB]

Public Enum BackgroundPictureDrawModeEnum

[C#]

public sealed enum BackgroundPictureDrawModeEnum : System.Enum

[Delphi]

type BackgroundPictureDrawModeEnum = (Center, Tile, Stretch);

Remarks

Use the members of this enumeration to set the value of the BackgroundPictureDrawMode property in the C1List class.

Member Name | Description
Center | Aligns Background picture to the center of the cell.
Tile | Tiles Background picture in cell.
Stretch | Stretches background picture to fit cell.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BorderTypeEnum Enumeration

BorderTypeEnum Enumeration

Syntax

[VB]

Public Enum BorderTypeEnum

[C#]

public sealed enum BorderTypeEnum : System.Enum

[Delphi]

type BorderTypeEnum = (None, Flat, Raised, Inset, Groove, Fillet, RaisedBevel, InsetBevel);

Remarks

Use the members of this enumeration to set the value of the BorderStyle property in the C1List class.

Member Name | Description
None | No cell borders are used when the cell is painted.
Flat | No Visual Effects are used when the cell is painted.
Raised | The control paints the cell border as 3D raised.
Inset | The control paints the cell border as 3D inset.
Groove | The control paints a line around the inside of the border.
Fillet | The control paints a fillet type border.
RaisedBevel | The control paints the cell border as 3D raised with bevel.
InsetBevel | The control paints the cell border as 3D inset with bevel.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellStyleFlag Enumeration

CellStyleFlag Enumeration

Syntax

[VB]

Public Enum CellStyleFlag

[C#]

public sealed enum CellStyleFlag : System.Enum

[Delphi]

type CellStyleFlag = (NormalCell, CurrentCell, SelectedRow, AllCells);

Remarks

Use the members of this enumeration to set one of the values of the AddCellStyle or AddRegExCellStyle methods in the C1List class.

This enum has the [Flags] attribute and can be combined.

Member Name | Description
NormalCell | The cell satisfies none of the conditions.
CurrentCell | The cell is the current cell as specified by the Bookmark, Col, and Split properties. At any given time, only one cell can have this status.
SelectedRow | The cell is part of a row selected by the user or in code. The SelectedRowCollection contains a bookmark for each selected row.
AllCells | All Cells
MarqueeRow | The cell is part of a highlighted row marquee.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellTipEnum Enumeration

CellTipEnum Enumeration

Syntax

[VB]

Public Enum CellTipEnum

[C#]

public sealed enum CellTipEnum : System.Enum

[Delphi]

type CellTipEnum = (NoCellTips, Anchored, Floating);

Remarks

Use the members of this enumeration to set the value of the CellTips property in the C1List class.

Member Name | Description
NoCellTips | No cell tips will be applied.
Anchored | Celltip will be anchored to the cell.
Floating | Celltip will be floating near the cell.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataModeEnum Enumeration

DataModeEnum Enumeration

Syntax

[VB]

Public Enum DataModeEnum

[C#]

public sealed enum DataModeEnum : System.Enum

[Delphi]

type DataModeEnum = (Normal, AddItem);

Remarks

Use the members of this enumeration to access the return value of the DataMode property in the C1List class.

Member Name | Description
Normal | The control displays data available from its bound DataSource.
AddItem | The list portion of the control is populated with data via the AddItem method. The first item added starts at zero. When in AddItem mode, the DataSource and DataMember properties are ignored.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataViewEnum Enumeration

DataViewEnum Enumeration

Syntax

[VB]

Public Enum DataViewEnum

[C#]

public sealed enum DataViewEnum : System.Enum

[Delphi]

type DataViewEnum = (Normal, MultipleLines);

Remarks

Use the members of this enumeration to set the value of the DataView property in the C1List class.

Member Name | Description
Normal | The list will only display flat files and will not support a hierarchical view. If the data source is a hierarchical dataset, the list will only display data from the master table.
MultipleLines | The list will display all the fields in the current list area with multiple lines.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FlatModeEnum Enumeration

FlatModeEnum Enumeration

Syntax

[VB]

Public Enum FlatModeEnum

[C#]

public sealed enum FlatModeEnum : System.Enum

[Delphi]

type FlatModeEnum = (Flat, PopUp, Standard);

Remarks

Use the members of this enumeration to set the value of the FlatStyle property in the C1List class.

Member Name | Description
Flat | Takes away all three-dimensional features of the list and gives it a plain flat appearance.
PopUp | Looks similar to the Flat FlatStyle, but when the user drags the cursor over a column heading or record selector, they become three-dimensional and appear to pop up.
Standard | The default. The Standard FlatStyle gives the list’s column headers and record selectors an inset three-dimensional look.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ForeGroundPicturePositionEnum Enumeration

ForeGroundPicturePositionEnum Enumeration

Syntax

[VB]

Public Enum ForeGroundPicturePositionEnum

[C#]

public sealed enum ForeGroundPicturePositionEnum : System.Enum

[Delphi]

type ForeGroundPicturePositionEnum = (Near, Far, LeftOfText, RightOfText, TopOfText, BottomOfText, PictureOnly, TextOnly);

Remarks

Use the members of this enumeration to set the value of the ForegroundPicturePosition property in the C1List class.

Member Name | Description
Near | Positions Foreground picture on the near side of the cell.
Far | Positions Foreground picture on the far side of the cell.
LeftOfText | Positions Foreground picture to the left of the cell text.
RightOfText | Positions Foreground picture to the right of the cell text.
TopOfText | Positions Foreground picture on top of the cell text.
BottomOfText | Positions Foreground picture below the cell text.
PictureOnly | Foreground picture is only included.
TextOnly | Text is only included.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


LineStyleEnum Enumeration

LineStyleEnum Enumeration

Syntax

[VB]

Public Enum LineStyleEnum

[C#]

public sealed enum LineStyleEnum : System.Enum

[Delphi]

type LineStyleEnum = (None, Single, Double, Raised, Inset);

Remarks

This enumeration is used to set the line style for row and column divider.

Member Name | Description
None | No line style
Single | Single line
Double | Double line
Raised | Line with 3D raised appearance
Inset | Line with 3D inset appearance
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MatchColEnum Enumeration

MatchColEnum Enumeration

Syntax

[VB]

Public Enum MatchColEnum

[C#]

public sealed enum MatchColEnum : System.Enum

[Delphi]

type MatchColEnum = (ListField, CurrentMousePos, CurrentSelectedCol, LeftVisibleCol, RightVisibleCol, AllCols);

Remarks

Use the members of this enumeration to access the return value of the MatchCol property in the C1List class.

Member Name | Description
ListField | When this property is set to ListField, the search column is the current ListField. If the ListField is not set, the search column will be the first column.
CurrentMousePos | When this property is set to CurrentMousePosition, the search column is the column where the mouse cursor is active.
CurrentSelectedCol | When this property is set to CurrentSelectedCol, the search column is the current selected column. If there is more than one selected column, the search column is the leftmost selected column.
LeftVisibleCol | When this property is set to LeftVisibleCol, the search column is the leftmost visible column.
RightVisibleCol | When this property is set to RightVisibleCol, the search column is the rightmost visible column.
AllCols | When this property is set to AllCols, the search columns are all the visible columns.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MatchCompareEnum Enumeration

MatchCompareEnum Enumeration

Syntax

[VB]

Public Enum MatchCompareEnum

[C#]

public sealed enum MatchCompareEnum : System.Enum

[Delphi]

type MatchCompareEnum = (LessThan, LessThanOrEqual, Equal, GreaterThanOrEqual, GreaterThan, PartiallyEqual, IncludeEqual);

Remarks

Use the members of this enumeration to access the return value of the MatchCompare property in the C1List class.

Member Name | Description
LessThan | Used to search for strings, numbers and dates that are less than the stated value.
LessThanOrEqual | Used to search for strings, numbers and dates that are less than or equal to the stated value.
Equal | Used to search for strings, numbers and dates that are equal to the stated value.
GreaterThanOrEqual | Used to search for strings, numbers and dates that are greater than or equal to the stated value.
GreaterThan | Used to search for strings, numbers and dates that are greater than the stated value.
PartiallyEqual | The PartiallyEqual is the default mode, which is the same as incremental search
IncludeEqual | Used to match a string inside another string.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MatchEntryEnum Enumeration

MatchEntryEnum Enumeration

Syntax

[VB]

Public Enum MatchEntryEnum

[C#]

public sealed enum MatchEntryEnum : System.Enum

[Delphi]

type MatchEntryEnum = (None, Standard, Extended);

Remarks

Use the members of this enumeration to access the return value of the MatchEntry property in the C1List class.

Member Name | Description
None | The default. The control does not perform any incremental searches.
Standard | The search argument is limited to one character, and the control attempts to find a match for the character entered using the first letter of entries in the list. Repeatedly typing the same letter cycles through all of the entries in the list beginning with that letter.
Extended | The control searches for an entry matching all characters entered. The search is performed incrementally as characters are typed. This behavior is almost identical to that of a C1Combo control except that the search argument is cleared when a C1List control gains focus, or when the user presses Backspace or hesitates for a few seconds.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PointAtEnum Enumeration

PointAtEnum Enumeration

Syntax

[VB]

Public Enum PointAtEnum

[C#]

public sealed enum PointAtEnum : System.Enum

[Delphi]

type PointAtEnum = (NotInList, AtCaption, AtSplitHeader, AtSplitSizeBox, AtRowSelect, AtRowSize, AtColumnHeader, AtColumnFooter, AtColumnSize, AtDataArea, AtGroupArea, AtGroupHeader);

Remarks

Use the members of this enumeration to access the return value of the PointAt method in the C1List class.

Member Name | Description
NotInList | Coordinates are not in list area.
AtCaption | Coordinates are in caption area.
AtSplitHeader | Coordinates are in a split’s header.
AtSplitSizeBox | Coordinates are in a splits resizing box.
AtRowSelect | Coordinates are in a row selector.
AtRowSize | Coordinates are in a row resizing box.
AtColumnHeader | Coordinates are in a column’s header.
AtColumnFooter | Coordinates are in a column’s footer.
AtColumnSize | Coordinates are in a column’s resizing box.
AtDataArea | Coordinates are in the control’s data area.
AtGroupArea | Coordinates are in the control’s GroupBy area.
AtGroupHeader | Coordinates are in the control’s GroupBy header.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PresentationEnum Enumeration

PresentationEnum Enumeration

Syntax

[VB]

Public Enum PresentationEnum

[C#]

public sealed enum PresentationEnum : System.Enum

[Delphi]

type PresentationEnum = (Normal, RadioButton, CheckBox);

Remarks

Use the members of this enumeration to set the value of the Presentation property in the C1List class.

Member Name | Description
Normal | Value items are displayed as text or graphics depending upon the setting of the DisplayValue and Translate properties.
RadioButton | Value items are displayed as a group of radio buttons within the cell.
CheckBox | Value items are displayed as a check box within the current cell.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowSizingEnum Enumeration

RowSizingEnum Enumeration

Syntax

[VB]

Public Enum RowSizingEnum

[C#]

public sealed enum RowSizingEnum : System.Enum

[Delphi]

type RowSizingEnum = (None, AllRows, IndividualRows);

Remarks

Use the members of this enumeration to set the value of the AllowRowSizing property in the C1List class.

Member Name | Description
None | No sizing will be allowed.
AllRows | All rows will be sized as a group.
IndividualRows | Rows can be resized independently.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollBarEnum Enumeration

ScrollBarEnum Enumeration

Syntax

[VB]

Public Enum ScrollBarEnum

[C#]

public sealed enum ScrollBarEnum : System.Enum

[Delphi]

type ScrollBarEnum = (Horizontal, Vertical);

Remarks

This enumeration identifies which scrollbar is being scrolled for the FetchScrollTips event.

Member Name | Description
Horizontal | The Horizontal ScrollBar is being scrolled.
Vertical | The Vertical ScrollBar is being scrolled.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollBarStyleEnum Enumeration

ScrollBarStyleEnum Enumeration

Syntax

[VB]

Public Enum ScrollBarStyleEnum

[C#]

public sealed enum ScrollBarStyleEnum : System.Enum

[Delphi]

type ScrollBarStyleEnum = (None, Always, Automatic);

Remarks

Use the members of this enumeration to set the style of the HBar and VBar object.

Member Name | Description
None | No Scroll Bars
Always | ScrollBars always visible
Automatic | Horizontal and/or vertical scroll bars are displayed only if the object's contents extend beyond its borders.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectionModeEnum Enumeration

SelectionModeEnum Enumeration

Syntax

[VB]

Public Enum SelectionModeEnum

[C#]

public sealed enum SelectionModeEnum : System.Enum

[Delphi]

type SelectionModeEnum = (None, One, MultiSimple, MultiExtended, Checkbox);

Remarks

Use the members of this enumeration to set the value of the SelectionMode property.

Member Name | Description
None | The user cannot select rows.
One | Only one item in the list can be selected.
MultiSimple | If the user clicks a row, that row is selected, and the SelectedIndex property returns a bookmark for that row. If more than one row is selected, the SelectedIndex property returns the bookmark of the most recently selected row, and the SelectedIndices collection contains the bookmarks for all selected rows. The user can also unselect a row.
MultiExtended | Pressing Shift and clicking the mouse or pressing Shift and one of the arrow keys (Up Arrow, Down Arrow, Left Arrow, or Right Arrow) extends the selection from the previously selected item to the current item. Pressing Ctrl and clicking the mouse selects or deselects an item in the list. Since selected rows do not have to be adjacent, the user can also operate the vertical scroll bar to bring other rows into view if desired.
Checkbox | The user can select or unselect rows by clicking checkboxes.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SizeModeEnum Enumeration

SizeModeEnum Enumeration

Syntax

[VB]

Public Enum SizeModeEnum

[C#]

public sealed enum SizeModeEnum : System.Enum

[Delphi]

type SizeModeEnum = (Exact, NumberOfColumns, Scalable);

Remarks

Use the members of this enumeration to set the value of the SplitSizeMode property.

Member Name | Description
Exact | The value returned is a floating point number indicating the exact size of the split in terms of the coordinate system of the list's container.
NumberOfColumns | The value returned is an integer indicating the number of columns displayed in the split.
Scalable | The value returned by the property is an integer indicating the relative size of the split with respect to other scalable splits.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SortDirEnum Enumeration

SortDirEnum Enumeration

Syntax

[VB]

Public Enum SortDirEnum

[C#]

public sealed enum SortDirEnum : System.Enum

[Delphi]

type SortDirEnum = (ASC, DESC, None);

Remarks

Use the members of this enumeration to set the value of the Sort method or SortIndicator property.

Member Name | Description
ASC | The column will be sorted in the ascending order.
DESC | The column will be sorted in the descending order.
None | The column will not be sorted.

Example

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Reference

All C1Combo Members

C1Combo Property Reference

C1Combo Method Reference

C1Combo Event Reference

C1Combo Event Handler Reference

C1Combo Event Argument Reference

C1Combo Enumeration Reference

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


All C1Combo Members

C1Combo Public Properties

C1Combo Public Methods

C1Combo Public Events

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Public Properties

AddItemCols | Sets or returns the column number for the AddItem mode.
AddItemSeparator | Determines the separator string for columns.
AllowColMove | Enables/disables interactive column movement.
AllowColSelect | Specifies if the user has the ability to select columns in the list.
AllowDrag | Sets or returns the flag indicating if text can be taken from the editor by drag and drop.
AllowDrop | Sets or returns the flag indicating if text can be moved to the editor by drag and drop.
AllowHorizontalSplit | Specifies if a user is allowed to create horizontal splits.
AllowRowSizing | This property is now obsolete.
AllowSort | Sets or returns whether or not column sort is allowed.
AllowVerticalSplit | Specifies if a user is allowed to create vertical splits.
AlternatingRows | Determines if a list or split displays odd-numbered rows in one style and even-numbered rows in.
AutoCompletion | Determines whether matching incremental search values are automatically copied to the text portion of a combo during editing.
AutoDropDown | Determines whether the control automatically opens when the user types a character into a cell.
AutoSelect | Determines whether the combo sets its index to the current position of the datasource when it is first filled with data.
AutoSize | When this property is set to True (default), the height of the edit box will be set to the current font height. When this property is set to False, the edit height becomes adjustable.
BackColor | Controls the background color of an object.
BackgroundImage | Specifies the background picture
Bookmark | Returns or sets the bookmark identifying the current row in the list.
BorderStyle | Sets or returns the border style for the control.
ButtonWidth | Gets the width for the combo button.
Caption | Returns or sets the caption to the list.
CaptionHeight | Sets or returns the height of the list caption area.
CaptionStyle | Sets or returns the Style object that controls the appearance of the caption area.
CaptionVisible | Sets or returns the flag indicating if list’s caption is visible.
CellTips | Determines whether the list displays a pop-up text window when the cursor is idle.
CellTipsDelay | Determines the amount of time before the cell tip window is displayed.
CellTipsWidth | Returns or sets the width of the cell tip window.
CharacterCasing | Indicates if all characters should be unchanged, converted to uppercase, or converted to lowercase.
Col | Returns or sets the column position of the current cell.
ColumnCaptionHeight | Sets or returns the height of the column headers.
ColumnFooterHeight | Sets or returns the height of the column footers.
ColumnFooters | Specifies whether footers are displayed.
ColumnHeaders | Specifies whether headers are displayed.
Columns | Returns a collection of C1DataColumn objects.
ColumnWidth | Sets or returns the column width for each column in the control.
ComboStyle | Sets or returns a value indicating the display type and behavior of the control
DataBindings | Gets the data bindings for the control.
DataMember | Sets the name of the dropdown column used to update the associated list column.
DataMode | Specifies the normal or additem mode.
DataSource | Specifies the data source object used to bind the control to.
DeadAreaBackColor | Controls the background color of the dead area object.
DefColWidth | Specifies column width for auto-created columns.
DisplayMember | Sets or returns the RowSource field used for incremental search.
DragMode | Returns or sets the value that indicates whether the combo box or the programmer handles a drag operation.
DrawMode | Returns or sets the value that indicates whether the combo box or the programmer handles a draw operation.
DropDownHeight | Gets the height of the dropdown list.
DropdownPosition | Sets or returns a value that determines the position of the dropdown portion of a C1Combo control.
DropdownWidth | Sets or returns a value that determines the width of the dropdown portion of a C1Combo control.
DropMode | Returns or sets a value that indicates how the combo box handles drop operations.
DroppedDown | Gets or sets a value indicating whether the combo box is displaying its drop-down portion.
EditorBackColor | Sets or returns the background color of an object’s editing window.
EditorFont | Sets or returns the font associated with the text box portion of a C1Combo control.
EditorForeColor | Sets or returns the foreground color of an object’s editing.
EditorHeight | Sets or returns the height for the edit portion of the combo box.
EmptyRows | Returns or sets a value that determines how the list displays rows below the last data row.
Enabled | Enables or disables user interaction.
EvenRowStyle | Sets or returns the Style object that controls the appearance of an even-numbered row.
ExtendRightColumn | Sets whether the last column will extend to fill the dead area of the list
FetchRowStyles | Specifies whether the FetchRowStyle event will be fired.
FlatStyle | Controls the 3D look of the dropdown button and dropdown list's header and buttons.
Font | Specifies the font object for a Style.
FooterStyle | Returns the Style object that controls the appearance of column footers.
ForeColor | Specifies the foreground color of an object
GapHeight | Sets or returns the length between the edit portion and the dropdown portion of the combo box.
HeadingStyle | Returns the Style object that controls the appearance of the column heading.
HighlightRowStyle | Returns the Style object that controls the appearance of the highlighted row.
HScrollBar | Returns the HBar object that controls the appearance of the horizontal scrollbar.
ItemHeight | Returns or sets the height of all list rows.
KeepForeColor | Determines whether the fore color of the text box remains unchanged when the combo box is disabled.
LeftCol | Returns or sets the zero-based index of the leftmost column in a list or split.
LimitToList | Determines if the NotInList event fires when an incremental search value is not found.
ListCount | Returns the total row number for the control.
MatchEntry | Returns or sets a value indicating how a C1Combo control performs searches based on user input.
MatchEntryTimeout | Sets or returns the incremental search timeout value.
MaxDropDownItems | Controls the maximum number of items to be displayed in the built-in combo box.
MaxLength | Gets or sets the maximum number of characters allowed in the editable portion of a combo box.
MouseCursor | Determines the style of the mouse cursor when it is over list portion of the control.
OddRowStyle | Returns the OddRowStyle Style object.
PartialRightColumn | True if rightmost column can be clipped to edge of split.
PreferredHeight | Gets the preferred height of the combo box.
ReadOnly | Controls whether the text in the control can be changed or not.
RightToLeft | Indicates whether the control should draw right-to-left for RTL languages.
Row | Specifies the current row.
RowDivider | Determines the style of the border drawn between list rows.
RowSubDividerColor | Returns or sets the color of a RowSubDivider.
RowTracking | True if rows are highlighted as the mouse moves over them.
ScrollTips | Determines whether the list displays a pop-up text window when the scrollbar thumb is dragged.
ScrollTrack | Determines whether the list constantly displays information as it scrolls.
SelectedCols | Returns the SelectedColumnCollection object.
SelectedIndex | Sets or returns the bookmark of the currently selected item.
SelectedStyle | Returns the SelectedStyle Style object.
SelectedText | Sets or returns the string containing the currently selected text within the combo box’s editing window.
SelectedValue | Gets or sets the value of the member property specified by the ValueMember property.
SelectionLength | Sets or returns the number of characters selected within the editing window.
SelectionStart | Sets or returns the starting point of the text selection within the editing window.
Split | Sets or returns current split number.
Splits | Returns a Collection of Split objects.
Style | Returns or sets the Style object.
Styles | Returns a collection of named Style objects.
SuperBack | Controls the BackSpace behavior when AutoCompletion and LimitToList are set to true.
Text | Contains the text displayed in the editor.
TextAlign | Determines how the text will be aligned within the editor.
TopIndex | Returns or sets a value containing the bookmark for the first visible row in a list or split.
ValueMember | Specifies the field name for binding purposes.
Visible | Determines if the current cell is visible within the displayed area of the list.
VisibleCols | Returns the number of visible columns in the current split.
VisibleRows | Returns the number of visible rows in the list.
VScrollBar | Sets or returns the VBar object that controls the appearance of the vertical scrollbar.
WillChangeToIndex | Returns the bookmark identifying the will-be selected item in a control.
WillChangeToText | Returns the string identifying the text for the item to be selected.
WillChangeToValue | Returns the object identifying the value to be selected.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Public Methods

AddCellStyle | Controls the font and color of cells within a list, column, or split according to value.
AddItem | Add a new item to the end in the AddItem mode.
AddItemTitles | Sets the column titles in the AddItem mode.
AddRegexCellStyle | Controls the font and color of cells within a list, column, or split according to their contents.
CaptureImage | Returns an image of the control in a format that you can assign to the Picture property of a Visual Basic form or control, or the PaintPicture method of the Printer object.
CellContaining | Returns the cell position for a set of coordinates.
ClearCellStyle | Removes a cell condition established with a previous call to the AddCellStyle method.
ClearFields | Restores the default list layout.
ClearItems | Clear all of the items in the AddItem mode.
ClearSelCols | Deselects all selected columns in the current split.
ClearSelected | Clears a selection.
CloseCombo | Closes the dropdown list of the combo.
ColContaining | Returns the ColIndex value of the list column containing the specified coordinate.
FindString | Find the first row index such that the cell text starts with string s in the given column.
FindStringExact | Find the first row index such that the cell is the same with string s in the given column.
GetItemText | Gets the cell text for any cell.
HoldFields | Sets the current column/field layout as the customized layout.
InsertHorizontalSplit | Inserts a horizontal split at the specified index.
InsertItem | Inserts a new item at the index position in the AddItem mode.
InsertVerticalSplit | Inserts a vertical split at the specified index.
OpenCombo | Drops down the list of the combo.
PointAt | Returns one of the PointAtEnum constants, which indicates the kind of list element beneath the specified coordinate pair.
Rebind | Re-establishes the connection with the bound data source.
Refresh | Discards all data and repopulates all cells from a data source.
RemoveHorizontalSplit | Removes a horizontal split at the specified index.
RemoveItem | Remove the item at the given position in the AddItem mode.
RemoveVerticalSplit | Removes a vertical split at the specified index.
ResumeBinding | Resumes data binding notification from the datasource.
RowContaining | Returns the zero-based index of the display row containing the specified coordinate.
RowTop | Returns the Y coordinate of the top of a visible row.
ScrollCtl | Scrolls the list horizontally and vertically in a single operation.
Select | Selects specified text in a combo box’s text box.
SelectAll | Selects all of the text in a combo box’s text box.
SetAddItemData | Updates the cell data from the AddItem mode.
Sort | Sort a specified column for the control.
SplitContaining | Returns the Index value of the split containing the specified coordinate pair.
SuspendBinding | Temporary suspension of data binding notifications from the datasource.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Public Events

AfterSort | Fires after a column is sorted by clicking the column header.
BeforeOpen | Fires before the list is dropped down.
BorderStyleChanged | Fires when BorderStyle property is changed.
Change | Fires when the text is changed by selecting, typing or setting the Text property.
Click | Fires when the user clicks inside the list.
Close | Fires when the user closes the list portion of the control by clicking the dropdown button or by pressing ALT + Down Arrow while the control is open.
ColFootClick | Fires when the footer of the control is clicked.
ColHeadClick | Fires when the headers of the control is clicked.
ColMove | Fires when the user has finished moving the selected columns.
ColResize | Fires after the user has finished resizing a column.
ComboStyleChanged | Fires when the user changes the ComboStyle property.
DataSourceChanged | Fires when a bound data source is changed or requeried.
DisplayMemberChanged | Occurs when the DisplayMember property changes.
DoubleClick | Fires when the user presses then releases a mouse button twice in rapid succession over the control.
DragDrop | Fires when a C1Combo control is the target component of a drag/drop operation and its DragMode property is set to 1 – Manual.
DragEnter | Occurs when an object is dragged into the control's bounds DragMode property is set to 1 – Manual.
DragOver | Fires when a combo control is the target component of a drag/drop operation and its DragMode is set to 1 - Manual.
DrawItem | Fires when any cell is required to be redrawn and DrawMode is set to Normal.
Error | The Error event occurs only as the result of a data access error that takes place when no Visual Basic code is being executed.
FetchCellStyle | Fires when the list is about to display cell data in a column whose FetchStyle property is set to True.
FetchCellTips | Fires when the control has focus and the cursor is idle for a small amount of time (defined by the CellTipsDelay property) over a data cell, column header, column footer, split header or control caption bar.
FetchRowStyle | Fires whenever the list is about to display a row of data and the FetchRowStyles property is True.
FetchScrollTips | Fires whenever the combo box has focus and the scrollbar thumb is moved using the mouse.
FormatText | Fires when the list is about to display cell data in a column whose NumberFormat property is set.
ItemChanged | Fires when the contents of the text box portion of a combo box and the current row in the list portion change simultaneously.
KeyDown | Fires when the user presses a key.
KeyPress | Fires when the user presses and releases specific keys.
KeyUp | Fires when the user releases a key.
LeftColChange | Fires when the first visible column of a list or split is changed.
Mismatch | Fires when the user enters a value in the text portion of a combo box that is not found in the list portion.
MouseDown | Use a MouseDown or MouseUp event procedure to specify actions that will occur when a given mouse button is pressed or released.
MouseEnter | Fires when the mouse pointer enters the control.
MouseHover | Occurs when the mouse pointer hovers over the control.
MouseLeave | Occurs when the mouse pointer leaves the control.
MouseMove | The MouseMove event is generated continually as the mouse pointer moves across the control. This event is primarily useful for implementing drag-and-drop behavior on a per-column basis.
MouseUp | Use a MouseDown or MouseUp event procedure to specify actions that will occur when a given mouse button is pressed or released.
NotInList | Fires when the user enters a value in the text portion of a combo box that is not found in the list portion.
Open | Fires when the user opens the list portion of the control by clicking the dropdown button or by pressing Alt + Down Arrow while the control is closed.
Paint | Fires when the control repaints itself (that is, whenever it receives a WM_PAINT message).
RowChange | Fires when the user changes a row in the dropdown.
RowResize | Fires when the user has finished resizing a list row.
Scroll | Fires when the user scrolls the control horizontally or vertically using the scroll bars.
SelChange | Fires when the user selects a different range of rows or columns.
SelectedValueChanged | Occurs when the SelectedValue property changes.
TopIndexChange | Fires when the first displayed row of a control or split is changed.
UnboundColumnFetch | Fires when a bound needs to display the value of a cell in an unbound column.
ValueMemberChanged | Occurs when the ValueMember property changes.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Property Reference

AddItemCols Property (C1Combo)

AddItemSeparator Property (C1Combo)

AllowColMove Property (C1Combo)

AllowColSelect Property (C1Combo)

AllowDrag Property

AllowDrop Property

AllowHorizontalSplit Property (C1Combo)

AllowRowSizing Property (C1Combo)

AllowSort Property (C1Combo)

AllowVerticalSplit Property (C1Combo)

AlternatingRows Property (C1Combo)

AutoCompletion Property

AutoDropDown Property

AutoSelect Property

AutoSize Property

BackColor Property (C1Combo)

BackgroundImage Property (C1Combo)

Bookmark Property (C1Combo)

BorderStyle Property (C1Combo)

ButtonWidth Property

Caption Property (C1Combo)

CaptionHeight Property (C1Combo)

CaptionStyle Property (C1Combo)

CaptionVisible Property

CellTips Property (C1Combo)

CellTipsDelay Property (C1Combo)

CellTipsWidth Property (C1Combo)

CharacterCasing Property

Col Property (C1Combo)

ColumnCaptionHeight Property (C1Combo)

ColumnFooterHeight Property (C1Combo)

ColumnFooters Property (C1Combo)

ColumnHeaders Property (C1Combo)

Columns Property (C1Combo)

ColumnWidth Property (C1Combo)

ComboStyle Property

DataBindings Property

DataMember Property (C1Combo)

DataMode Property (C1Combo)

DataSource Property (C1Combo)

DeadAreaBackColor Property (C1Combo)

DefColWidth Property (C1Combo)

DisplayMember Property (C1Combo)

DragMode Property

DrawMode Property

DropDownHeight Property

DropMode Property

DropdownPosition Property

DropdownWidth Property

DroppedDown Property

EditorBackColor Property

EditorFont Property

EditorForeColor Property

EditorHeight Property

EmptyRows Property (C1Combo)

Enabled Property (C1Combo)

EvenRowStyle Property (C1Combo)

ExtendRightColumn Property (C1Combo)

FetchRowStyles Property (C1Combo)

FlatStyle Property (C1Combo)

Font Property (C1Combo)

FooterStyle Property (C1Combo)

ForeColor Property (C1Combo)

GapHeight Property

HeadingStyle Property (C1Combo)

HighlightRowStyle Property (C1Combo)

HScrollBar Property (C1Combo)

IntegralHeight Property (C1Combo)

ItemHeight Property (C1Combo)

KeepForeColor Property

LeftCol Property (C1Combo)

LimitToList Property

ListCount Property (C1Combo)

MatchEntry Property (C1Combo)

MatchEntryTimeout Property (C1Combo)

MaxDropDownItems Property

MaxLength Property

MouseCursor Property

OddRowStyle Property (C1Combo)

PartialRightColumn Property (C1Combo)

PreferredHeight Property

ReadOnly Property (C1Combo)

RightToLeft Property (C1Combo)

Row Property (C1Combo)

RowDivider Property (C1Combo)

RowSubDividerColor Property (C1Combo)

RowTracking Property (C1Combo)

ScrollTips Property (C1Combo)

ScrollTrack Property (C1Combo)

SelectedCols Property (C1Combo)

SelectedIndex Property (C1Combo)

SelectedStyle Property (C1Combo)

SelectedText Property

SelectedValue Property (C1Combo)

SelectionLength Property

SelectionStart Property

Split Property (C1Combo)

Splits Property (C1Combo)

Style Property (C1Combo)

Styles Property (C1Combo)

SuperBack Property

Text Property (C1Combo)

TextAlign Property

TopIndex Property (C1Combo)

ValueMember Property (C1Combo)

VisibleCols Property (C1Combo)

VisibleRows Property (C1Combo)

VScrollBar Property (C1Combo)

WillChangeToIndex Property (C1Combo)

WillChangeToText Property (C1Combo)

WillChangeToValue Property (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddItemCols Property (C1Combo)

AddItemCols Property (C1Combo)

Sets or returns the column number for the AddItem mode.

Syntax

[VB]

Public Property AddItemCols As Integer

[C#]

public int AddItemCols {get; set;}

[Delphi]

property AddItemCols: Integer;

Remarks

You can set the AddItemCols explicitly, or if it is not set (in that case, the AddItemCols is 0), when you call AddItem or AddItemTitles, the control will set the AddItemCols for you.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddItemSeparator Property (C1Combo)

AddItemSeparator Property (C1Combo)

Determines the separation string for columns when using the AddItem method in AddItem mode.

Syntax

[VB]

Public Property AddItemSeparator As Char

[C#]

public string AddItemSeparator {get; set;}

[Delphi]

property AddItemSeparator: Char;

Default Value

This property takes ; as the default value.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowColMove Property (C1Combo)

AllowColMove Property (C1Combo)

Specifies if the user has the ability to move columns in the list.

Syntax

[VB]

Public AllowColMove As Boolean

[C#]

public bool AllowColMove {get; set;}

[Delphi]

property AllowColMove: Boolean;

Remarks

If True (the default), the user can move columns.

If False, the user cannot move columns.

Use the AllowColMove property to control whether the user can move columns by dragging the column header to the desired location. Any change in column order causes a ColMove event.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowColSelect Property (C1Combo)

AllowColSelect Property (C1Combo)

Specifies if the user has the ability to select columns in the list.

Syntax

[VB]

Public AllowColSelect As Boolean

[C#]

public bool AllowColSelect {get; set;}

[Delphi]

property AllowColSelect: Boolean;

Remarks

If True, the user can select columns.

If False (the default), the user cannot select columns.

Use the AllowColSelect property to control whether the user can select columns by clicking within the column header area. Setting this property to False suppresses highlighting when the user clicks a column header, which is useful for applications that respond to the ColHeadClick event.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowDrag Property

AllowDrag Property

Sets or returns the flag indicating if text can be taken from the editor by drag and drop.

Syntax

[VB]

Public AllowDrag As Boolean

[C#]

public bool AllowDrag {get; set;}

[Delphi]

property AllowDrag: Boolean;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowDrop Property

AllowDrop Property

Sets or returns the flag indicating if text can be moved to the editor by drag and drop.

Syntax

[VB]

Public AllowDrop As Boolean

[C#]

public bool AllowDrop {get; set;}

[Delphi]

property AllowDrop: Boolean;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowHorizontalSplit Property (C1Combo)

AllowHorizontalSplit Property (C1Combo)

Specifies if a user is allowed to create horizontal splits.

Syntax

[VB]

Public AllowHorizontalSplit As Boolean

[C#]

public bool AllowHorizontalSplit {get; set;}

[Delphi]

property AllowHorizontalSplit: Boolean;

Remarks

If True, then the user is able to split the current list into multiple horizontal splits at run-time.

If False, then the user is prevented from splitting the list horizontally.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowRowSizing Property (C1Combo)

AllowRowSizing Property (C1Combo)

NOTE: This property is now obsolete.

Specifies if a user is allowed to resize the rows in the list.

Syntax

[VB]

Public AllowRowSizing As Boolean

[C#]

public bool AllowRowSizing {get}

[Delphi]

property AllowRowSizing: Boolean;

Remarks

If the AllowRowSizing property is True, the mouse pointer turns into a double-headed arrow when positioned over the row divider between any pair of record selectors in the list. The user can interactively resize the rows by dragging the mouse while the double-headed arrow cursor is showing. Any change in row size causes a RowResize event to fire.

If the AllowRowSizing property is False, the user cannot interactively resize rows.

All rows of the C1List control are always the same height, which is determined by the ItemHeight property.

The default value of the property is True.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowSort Property (C1Combo)

AllowSort Property (C1Combo)

Sets or returns whether or not column sort is allowed.

Syntax

[VB]

Public AllowSort As Boolean

[C#]

public bool AllowSort {get; set;}

[Delphi]

property AllowSort: Boolean;

Remarks

If False, the list will fire the AfterSort event. The AfterSort event allows the application to sort the data.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AllowVerticalSplit Property (C1Combo)

AllowVerticalSplit Property (C1Combo)

Specifies if a user is allowed to create vertical splits.

Syntax

[VB]

Public AllowVerticalSplit As Boolean

[C#]

public bool AllowVerticalSplit {get; set;}

[Delphi]

property AllowVerticalSplit: Boolean;

Remarks

If True, then the user is able to create multiple vertical splits in the list.

If False, then the user is restricted from creating vertical splits.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AlternatingRows Property (C1Combo)

AlternatingRows Property (C1Combo)

Determines if a list or split displays odd-numbered rows in one style and even-numbered rows in another.

Syntax

[VB]

Public AlternatingRows As Boolean

[C#]

public bool AlternatingRows {get; set;}

[Delphi]

property AlternatingRows: Boolean;

Remarks

If True, the OddRowStyle and EvenRowStyle properties control the appearance of rows within the specified object.

If False (the default), the Style property controls the display of rows within the specified object.

At design time, you can change the colors and fonts used to render odd (even) rows by modifying the built-in OddRow (EvenRow) style using the Styles property page.

At run time, you can change the colors and fonts used to render odd (even) rows by modifying the Style object returned by the OddRowStyle (EvenRowStyle) property.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AutoCompletion Property

AutoCompletion Property

Determines whether matching incremental search values are automatically copied to the text portion of a combo during editing.

Syntax

[VB]

Public AutoCompletion As Boolean

[C#]

public bool AutoCompletion {get; set;}

[Delphi]

property AutoCompletion: Boolean;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AutoDropDown Property

AutoDropDown Property

Determines whether the control automatically opens when the user types a character into a cell.

Syntax

[VB]

Public AutoDropDown As Boolean

[C#]

public bool AutoDropDown {get; set;}

[Delphi]

property AutoDropDown: Boolean;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AutoSelect Property

AutoSelect Property

Determines whether the combo sets its index to the current position of the datasource when it is first filled with data.

Syntax

[VB]

Public Property AutoSelect As Boolean

[C#]

public bool AutoSelect {get; set;}

[Delphi]

property AutoSelect: Boolean;

Remarks

When AutoSelect is set to False (default), the SelChange and RowChange events will not fire when the data is first populated, because the SelectedIndex remains -1.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AutoSize Property

AutoSize Property

When this property is set to True (default), the height of the edit box will be set to the current font height. When this property is set to False, the edit height becomes adjustable.

Syntax

[VB]

Public AutoSize As Boolean

[C#]

public bool AutoSize {get; set;}

[Delphi]

property AutoSize: Boolean;

Remarks

The EditorHeight property is directly related to this property. If AutoSize is True, you cannot set the EditorHeight.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BackColor Property (C1Combo)

BackColor Property (C1Combo)

Controls the background color of a list portion of an object.

Syntax

[VB]

Public BackColor As Color

[C#]

public Color BackColor {get; set;}

[Delphi]

property BackColor: Color;

Remarks

Colors may be specified as RGB values or system default colors.

The background color of a list, column, or split is determined by its Style property setting. For these objects, the BackColor property is a shortcut to the BackColor member of the Style property.

For Style objects, the value of the BackColor property is inherited from the parent style (if any) unless explicitly overridden.

NOTE: Changing this property will not affect the NormalStyle.BackColor property.

See Also

C1Combo Object

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BackgroundImage Property (C1Combo)

BackgroundImage Property (C1Combo)

Sets or returns the background bitmap of a style object.

Syntax

[VB]

Public BackgroundImage As Image

[C#]

public Image BackgroundImage {get; set;}

[Delphi]

property BackgroundImage: Image;

Remarks

If a style has no background bitmap, then this property returns a null.

You can assign a bitmap to the BackgroundImage property in code at run time:

· Visual Basic

· C#

· Delphi

Note

Use the BackgroundPictureDrawMode property to control how the background bitmap is displayed when the style is applied to an object.

See Also

C1List Object

C1Combo Object

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Bookmark Property (C1Combo)

Bookmark Property (C1Combo)

Returns or sets the bookmark identifying the current row in the list.

Syntax

[VB]

Public Property Bookmark As Integer

[C#]

public int Bookmark {get; set;}

[Delphi]

property Bookmark: Integer;

Remarks

Use the value returned by the Bookmark property to save a reference to the current row that remains valid even after another row becomes current.

When you set the Bookmark property to a valid value in code, the row associated with that value becomes the current row, and the list adjusts its display to bring the new current row into view if necessary.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BorderStyle Property (C1Combo)

BorderStyle Property (C1Combo)

Returns or sets whether the control has a border.

Syntax

[VB]

Public BorderStyle As System.Windows.Forms.BorderStyle

[C#]

public System.Windows.Forms.BorderStyle BorderStyle {get; set;}

[Delphi]

property BorderStyle: System.Windows.Forms.BorderStyle;

Remarks

This property determines whether a C1List control has a border.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ButtonWidth Property

ButtonWidth Property

Gets the width for the combo button.

Syntax

[VB]

Public ReadOnly Property ButtonWidth As Integer

[C#]

public int ButtonWidth {get;}

[Delphi]

property ButtonWidth: Integer;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Caption Property (C1Combo)

Caption Property (C1Combo)

Returns or sets the caption to the list.

Syntax

[VB]

Public Caption As System.String

[C#]

public string Caption {get; set;}

[Delphi]

property Caption: string;

Remarks

For a C1List control, this property determines the text displayed in the caption bar at the top of the list.

Setting the Caption property to an empty string for a C1List control hides its caption bar.

For a C1DataColumn object, this property determines the text displayed in the object's heading area.

Setting the Caption property to an empty string for a C1DataColumn object clears the text in the column's heading area but does not hide the heading. Column captions are only displayed if the list's ColumnHeaders property is set to True.

Setting the Caption property to an empty string for a Split object hides the heading area, even if other splits have non-empty captions.

See Also

C1List Object

C1Combo Object

C1DataColumn Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CaptionHeight Property (C1Combo)

CaptionHeight Property (C1Combo)

Sets or returns the height of the list caption area.

Syntax

[VB]

Public CaptionHeight As Integer

[C#]

public int CaptionHeight {get; set;}

[Delphi]

property CaptionHeight: Integer;

Remarks

This property requires that the Caption property of the list has a value.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CaptionStyle Property (C1Combo)

CaptionStyle Property (C1Combo)

Sets or returns the Style object that controls the appearance of the caption area.

Syntax

[VB]

Public CaptionStyle As Style

[C#]

public Style CaptionStyle {get; set;}

[Delphi]

property CaptionStyle: Style;

Remarks

This property sets or returns the Style object that controls the appearance of a List control's caption bar or a Split object's heading area. By default, this is the built-in Caption style.

The value of the Caption property is not affected by changes to the CaptionStyle property.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CaptionVisible Property

CaptionVisible Property

Determines if the list’s caption is visible.

Syntax

[VB]

Public CaptionVisible As Boolean

[C#]

public bool CaptionVisible {get; set;}

[Delphi]

property CaptionVisible: Boolean;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellTips Property (C1Combo)

CellTips Property (C1Combo)

Determines whether the list displays a pop-up text window when the cursor is idle.

Syntax

[VB]

Public CellTips as CellTipEnum

[C#]

public CellTipEnum CellTips {get; set;}

[Delphi]

property CellTips: CellTipEnum;

Remarks

The CellTips property determines whether the list displays a pop-up text window when the cursor is idle. By default, this property is set to NoCellTips, and cell tips are not displayed.

Member Name | Description
NoCellTips | No cell tips will be applied.
Anchored | Celltip will be anchored to the cell.
Floating | Celltip will be floating near the cell.

If the CellTips property is set to either Anchored or Floating, the FetchCellTips event will be fired whenever the list has focus and the cursor is idle over a list cell, record selector, column header, split header, or list caption. The event will not fire if the cursor is over the scroll bars.

The setting Anchored aligns the cell tip window with either the left or right edge of the cell. The left edge is favored, but the right edge will be used if necessary in order to display as much text as possible.

The setting Floating displays the cell tip window below the cursor, if possible.

If you do not provide a handler for the FetchCellTips event, and the cursor is over a list cell, the default behavior is to display a text box containing the cell's contents (up to 256 characters). This enables the user to peruse the contents of a cell even if it is not big enough to be displayed in its entirety. You can also program the FetchCellTips event to override the default cell text display in order to provide users with context-sensitive help.

Note

Use the CellTipsDelay property to control the amount of idle time that must elapse before the cell tip window is displayed.

Use the CellTipsWidth property to control the width of the cell tip window.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellTipsDelay Property (C1Combo)

CellTipsDelay Property (C1Combo)

Determines the amount of time before the cell tip window is displayed.

Syntax

[VB]

Public CellTipsDelay As Integer

[C#]

public int CellTipsDelay {get; set;}

[Delphi]

property CellTipsDelay: Integer;

Remarks

The CellTipsDelay property controls the amount of idle time, in milliseconds, that must elapse before the cell tip window is displayed. By default, this property is set to 1000 (one second).

Setting this property to zero does not disable cell tips, but restores the default value of 1000. To disable cell tips, set the CellTips property to NoCellTips.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellTipsWidth Property (C1Combo)

CellTipsWidth Property (C1Combo)

Returns or sets the width of the cell tip window.

Syntax

[VB]

Public CellTipsWidth As Integer

[C#]

public int CellTipsWidth {get; set;}

[Delphi]

property CellTipsWidth: Integer;

Remarks

The CellTipsWidth property returns or sets the width of the cell tip window in terms of the coordinate system of the list's container.

By default, this property is set to zero, which causes the cell tip window to grow or shrink to accommodate the cell tip text. You can override this behavior and give the cell tip window a fixed width by specifying a non-zero value for this property.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CharacterCasing Property

CharacterCasing Property

Indicates if all characters should be unchanged, converted to uppercase, or converted to lowercase.

Syntax

[VB]

Public Property CharacterCasing As System.Windows.Forms.CharacterCasing

[C#]

public System.Windows.Forms.CharacterCasing CharacterCasing {get; set;}

[Delphi]

property CharacterCasing: System.Windows.Forms.CharacterCasing;

Example

· Visual Basic

· C#

· Delphi

When the code is executed, it will convert all characters in the editor portion to lower case.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Col Property (C1Combo)

Col Property (C1Combo)

Returns or sets the column position of the current cell.

Syntax

[VB]

Public Col As Integer

[C#]

public int Col {get; set;}

[Delphi]

property Col: Integer;

Remarks

This property specifies the zero-based index of the current cell's column position. It may be set at run time to highlight a different cell within the current row. If the column is visible, the caret or marquee will be moved to the selected column. If the column is not visible, the list will scroll to make it visible as a result of setting this property.

Setting the Col property at run time does not affect selected columns.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnCaptionHeight Property (C1Combo)

ColumnCaptionHeight Property (C1Combo)

Sets or returns the height of the column headers.

Syntax

[VB]

Public Property ColumnCaptionHeight As Integer

[C#]

public int ColumnCaptionHeight {get; set;}

[Delphi]

property ColumnCaptionHeight: Integer;

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnFooterHeight Property (C1Combo)

ColumnFooterHeight Property (C1Combo)

Sets or returns the height of the column footers.

Syntax

[VB]

Public Property ColumnFooterHeight As Integer

[C#]

public int ColumnFooterHeight {get; set;}

[Delphi]

property ColumnFooterHeight: Integer;

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnFooters Property (C1Combo)

ColumnFooters Property (C1Combo)

Specifies whether footers are displayed.

Syntax

[VB]

Public ColumnFooters As Boolean

[C#]

public bool ColumnFooters {get; set;}

[Delphi]

property ColumnFooters: Boolean;

Remarks

If True, the control's column footers are displayed.

If False (the default), the control's column footers are not displayed.

Use the FooterText property to set the footing text of an individual column.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnHeaders Property (C1Combo)

ColumnHeaders Property (C1Combo)

Specifies whether headers are displayed.

Syntax

[VB]

Public ColumnHeaders As Boolean

[C#]

public bool ColumnHeaders {get; set;}

[Delphi]

property ColumnHeaders: Boolean;

Remarks

If True (the default), the control's column headers are displayed.

If False, the control's column headers are not displayed.

Use the Caption property to set the heading text of an individual Column.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Columns Property (C1Combo)

Columns Property (C1Combo)

Returns a collection of C1DataColumn objects.

Syntax

[VB]

Public Columns As C1DataColumnCollection

[C#]

public C1DataColumnCollection Columns {get;}

[Delphi]

property Columns: C1DataColumnCollection;

Remarks

This property returns a collection of C1DataColumn objects for a list or dropdown control.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnWidth Property (C1Combo)

ColumnWidth Property (C1Combo)

Sets or returns the column width for each column in the control.

Syntax

[VB]

Public ColumnWidth As Integer

[C#]

public int ColumnWidth {get; set;}

[Delphi]

property ColumnWidth: Integer;

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ComboStyle Property

ComboStyle Property

Returns a value indicating the display type and behavior of the control.

Syntax

[VB]

Public Property ComboStyle As ComboStyleEnum

[C#]

public ComboStyleEnum ComboStyle {get;}

[Delphi]

property ComboStyle: ComboStyleEnum;

Remarks

Member Name | Description
DropdownCombo (0) | Includes a text box and a dropdown list. The user can select from the list or type in the text box.
SimpleCombo (1) | Includes a text box and a list which is always displayed. The user can select from the list or type in the box. The size of a simple combo box includes both the text and list portions.. To display more of the list, resize the control at design time or increase its Height property at run time.
DropdownList (2) | Includes a text box and dropdown list as in setting 0 – Dropdown Combo. However, this style disallows text entry and permits selection only from the dropdown list.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataBindings Property

DataBindings Property

Gets the data bindings for the control.

Syntax

[VB]

Public Property DataBindings As System.Windows.Form.Binding

[C#]

public System.Windows.Form.Binding DataBindings {get;}

[Delphi]

property DataBindings: System.Windows.Form.Binding;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataMember Property (C1Combo)

DataMember Property (C1Combo)

Returns or sets the name of the data member used to populate the control.

Syntax

[VB]

Public Property DataMember As String

[C#]

public string DataMember {get; set;}

[Delphi]

property DataMember: string;

Remarks

Typically, a data member represents a database table or query.

A bound DataSource can expose multiple sets of data that consumers can bind to. Each set of data is called a data member, and is identified by a unique string.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataMode Property (C1Combo)

DataMode Property (C1Combo)

Specifies the normal or additem mode.

Syntax

[VB]

Public Property DataMode As C1.Win.C1List.DataModeEnum

[C#]

public DataModeEnum DataMode {get; set}

[Delphi]

property DataMode: DataModeEnum;

Remarks

Member Name | Description
Normal | The control displays data available from its bound DataSource.
AddItem | The list portion of the control is populated with data via the AddItem method. The first item added starts at zero. Any event that uses a bookmark will use the zero-based index of the control. When in AddItem mode, the DataSource and DataMember properties are ignored.

Note

The DataMode property can only be set from the Design time, but it can be returned from the run time.

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataSource Property (C1Combo)

DataSource Property (C1Combo)

Specifies the data source object used to bind the control to.

Syntax

[VB]

Public DataSource As Object

[C#]

public object DataSource {get; set;}

[Delphi]

property DataSource: Object;

Remarks

The DataSource property specifies the data control used to bind a C1List or C1Combo control to a database.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DeadAreaBackColor Property (C1Combo)

DeadAreaBackColor Property (C1Combo)

Controls the background color of the dead area object.

Syntax

[VB]

Public DeadAreaBackColor As Color

[C#]

public Color DeadAreaBackColor {get; set;}

[Delphi]

property DeadAreaBackColor: Color;

Remarks

Colors may be specified as RGB values or system default colors.

Setting this property will affect the appearance of the "dead area" of underpopulated controls, such as the area to the right of the last column, the area below the last data row, and the Outlook Grouping area.

Note

If the EmptyRows property is True, the empty data rows it creates are not considered part of the "dead area" and will not be displayed in the DeadAreaBackColor. If you wish for the area occupied by the empty rows to be shown in the DeadAreaBackColor, you should first set the EmptyRows property to False.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DefColWidth Property (C1Combo)

DefColWidth Property (C1Combo)

Specifies column width for auto-created columns.

Syntax

[VB]

Public DefColWidth As Integer

[C#]

public int DefColWidth {get; set;}

[Delphi]

property DefColWidth: Integer;

Remarks

This property returns or sets the default width for all list columns in terms of the coordinate system of the list's container.

For bound lists, the DefColWidth property is respected under the following circumstances:

· When the list's layout is initialized at run time.

· When a new column is created at run time.

If you set the DefColWidth property to 0, the list automatically sizes all columns based on either the width of the column heading or the display width of the underlying field, whichever is larger. For example, to set the default column width to the width of the first column:

· Visual Basic

· C#

· Delphi

Note

Setting the DefColWidth property at run time does not affect existing columns, only those that are subsequently created in code.

In bound mode, some data sources do not provide text field widths when requested by the list. Therefore, if DefColWidth is 0, the actual column widths may not be what you expect since the list must supply a default width.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DisplayMember Property (C1Combo)

DisplayMember Property (C1Combo)

Returns or sets the name of the column used for an incremental search within a C1List or C1Combo control.

Syntax

[VB]

object.DisplayMember = string

[C#]

public string DisplayMember {get; set;}

[Delphi]

property DisplayMember: string;

Remarks

If the DisplayMember property is not specified, the first column in the control will be used for both incremental search and the selection value.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DragMode Property

DragMode Property

Returns or sets the value that indicates whether the combo box or the programmer handles a drag operation.

Syntax

[VB]

Public DragMode As DragModeEnum

[C#]

public DragModeEnum DragMode {get; set;}

[Delphi]

property DragMode: DragModeEnum

Remarks

Member Name | Description
Automatic | The combo box handles the drag operation.
Manual | The programmer can manually handle the drag operation.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DrawMode Property

DrawMode Property

Returns or sets the value that indicates whether the combo box or the programmer handles a draw operation.

Syntax

[VB]

Public DrawMode As System.Windows.Forms.DrawMode

[C#]

public System.Windows.Forms.DrawMode DrawMode {get; set;}

[Delphi]

property DrawMode: System.Windows.Forms.DrawMode;

Remarks

If DrawMode is set to Normal, all of the items in the control are drawn by the operating system and are of the same size. If DrawMode is set to OwnerDrawVariable or OwnerDrawFixed, all of the items are drawn manually in the DrawItemEventHandler.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropDownHeight Property

DropDownHeight Property

Gets the height of the dropdown list.

Syntax

[VB]

Public Overridable ReadOnly Property DropDownHeight As Integer

[C#]

public int DropDownHeight {get;}

[Delphi]

property DropDownHeight: Integer;

Remarks

The height of the dropdown list is determined by the number of visible list items. Please see the MaxDropDownItems Property for details. If there is no item in the dropdown list, the height will be 100 pixel by default.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropMode Property

DropMode Property

Returns or sets a value that indicates how the combo box handles drop operations.

Syntax

[VB]

Public DropMode As DropModeEnum

[C#]

public DropModeEnum DropMode {get; set;}

[Delphi]

property DropMode: DropModeEnum;

Remarks

Member Name | Description
Automatic | The combo box handles the drop operation.
Manual | The programmer can manually handle the drop operation.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropdownPosition Property

DropdownPosition Property

Sets or returns a value that determines the position of the dropdown portion of a C1Combo control.

Syntax

[VB]

Public DropdownPosition As DropdownPositionEnum

[C#]

public DropdownPositionEnum DropdownPosition {get; set;}

[Delphi]

property DropdownPosition: DropdownPositionEnum;

Remarks

Member Name | Description
Default (0) | The dropdown list will open to the right and down.
RightDown (1) | The dropdown list will open to the right and down.
RightUp (2) | The dropdown list will open to the right and up.
LeftDown (3) | The dropdown list will open to the left and down.
LeftUp (4) | The dropdown list will open to the left and up.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropdownWidth Property

DropdownWidth Property

Sets or returns a value that determines the width of the dropdown portion of a C1Combo control.

Syntax

[VB]

Public DropdownWidth As Integer

[C#]

public int DropdownWidth {get; set;}

[Delphi]

property DropdownWidth: Integer;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DroppedDown Property

DroppedDown Property

Gets or sets a value indicating whether the combo box is displaying its drop-down portion.

Syntax

[VB]

Public DroppedDown As Boolean

[C#]

public bool DroppedDown {get; set;}

[Delphi]

property DroppedDown: Boolean;

Remarks

The default is False. True if the drop-down portion is displayed. Set at runtime.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


EditorBackColor Property

EditorBackColor Property

Sets or returns the background color of an object’s editing window

Syntax

[VB]

Public EditorBackColor As Color

[C#]

public Color EditorBackColor {get; set;}

[Delphi]

property EditorBackColor: Color;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


EditorFont Property

EditorFont Property

Sets or returns the font associated with the text box portion of a C1Combo control.

Syntax

[VB]

Public EditorFont As Font

[C#]

public Font EditorFont {get; set;}

[Delphi]

property EditorFont: Font;

Remarks

By default, EditorFont inherits its value from the control's Font property.

If a change to the EditorFont property results in a change in height, then the height of the text box portion is resized proportionally to reflect the new character height.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


EditorForeColor Property

EditorForeColor Property

Sets or returns the foreground color of an object’s editing window.

Syntax

[VB]

Public EditorForeColor As Color

[C#]

public Color EditorForeColor {get; set;}

[Delphi]

property EditorForeColor: Color;

Remarks

Colors may be specified as RGB values or system default colors.

By default, the Edit or ForeColor property inherits its value from the ForeColor property, which is initially set to the system Window Text color as determined by your Control Panel settings.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


EditorHeight Property

EditorHeight Property

Sets or returns the height for the edit portion of the combo box.

Syntax

[VB]

Public EditorHeight As Integer

[C#]

public int EditorHeight {get; set;}

[Delphi]

property EditorHeight: Integer;

Remarks

Setting the value of this property is allowed only if AutoSize has a False value.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


EmptyRows Property (C1Combo)

EmptyRows Property (C1Combo)

Returns or sets a value that determines how the list displays rows below the last data row.

Syntax

[VB]

Public EmptyRows As Boolean

[C#]

public bool EmptyRows {get; set;}

[Delphi]

property EmptyRows: Boolean;

Remarks

If all of the records in the data source do not fill up the entire list, setting EmptyRows to True will fill the unpopulated list area with empty data rows. If EmptyRows is False (the default), then the unpopulated list area will be blank and will be filled with the system 3D Objects color (or the system Button Face color) as determined by your Control Panel settings.

Note

The RowDivider property applies to data rows and empty rows alike. You cannot suppress row dividers for just the empty rows when EmptyRows is True.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Enabled Property (C1Combo)

Enabled Property (C1Combo)

Returns or sets a value that determines whether a control can respond to user-generated events.

Syntax

[VB]

object.Enabled = boolean

[C#]

public bool Enabled {get; set;}

[Delphi]

property Enabled: Boolean;

Remarks

If True (the default), the user can give focus to the control and manipulate it with the keyboard or mouse.

If False, the user cannot manipulate the control directly.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


EvenRowStyle Property (C1Combo)

EvenRowStyle Property (C1Combo)

Sets or returns the Style object that controls the appearance of an even-numbered row.

Syntax

[VB]

Public EvenRowStyle As Style

[C#]

public Style EvenRowStyle {get; set;}

[Delphi]

property EvenRowStyle: Style;

Remarks

This property sets or returns the Style object that controls the appearance of an even-numbered row in a list or split where the AlternatingRows property is set to True. By default, this is the built-in EvenRow style.

To change the appearance of odd-numbered rows, set the OddRowStyle property.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ExtendRightColumn Property (C1Combo)

ExtendRightColumn Property (C1Combo)

Sets whether the last column will extend to fill the dead area of the list.

Syntax

[VB]

Public ExtendRightColumn As Boolean

[C#]

public bool ExtendRightColumn {get; set;}

[Delphi]

property ExtendRightColumn: Boolean;

Remarks

If the columns in the list don’t take up all of the space available, then there is an area which is exposed. This area is called the dead area and has a default back color of gray. This property sets whether this area is to be filled with the last column of the list.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyles Property (C1Combo)

FetchRowStyles Property (C1Combo)

Specifies whether the FetchRowStyle event will be fired.

Syntax

[VB]

Public FetchRowStyles As Boolean

[C#]

public bool FetchRowStyles {get; set;}

[Delphi]

property FetchRowStyles: Boolean;

Remarks

If True, the FetchRowStyle event will be fired whenever the list is about to display a row of data.

If False (the default), the FetchRowStyle event is not fired.

Set this value to True when you need to perform complex per-row formatting operations that can only be done using the FetchRowStyle event. For example, if you want to apply fonts and/or colors to all rows that satisfy certain criteria, then you need to set the FetchRowStyles property to True and write code for the FetchRowStyle event.

Note

To display every other row in a different color or font, you can simply set the AlternatingRows property to True.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FlatStyle Property (C1Combo)

FlatStyle Property (C1Combo)

Controls the 3D look of the dropdown button and dropdown list's header and buttons

Syntax

[VB]

Public Property FlatStyle As C1.Win.C1List.FlatModeEnum

[C#]

public FlatModeEnum FlatStyle {get; set;}

[Delphi]

property FlatStyle: FlatModeEnum;

Remarks

The FlatStyle property determines the appearance of the dropdown list.

Member Name | Description
Flat | Takes away all three-dimensional features of the list and gives it a plain flat appearance.
PopUp | Looks similar to the Flat FlatStyle, but when the user drags the cursor over a column heading or record selector, they become three-dimensional and appear to pop up.
Standard | The default. The Standard FlatStyle gives the list’s column headers and record selectors an inset three-dimensional look.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Font Property (C1Combo)

Font Property (C1Combo)

Sets the font object associated with a style.

Syntax

[VB]

Public Font As Font

[C#]

public Font Font {get; set;}

[Delphi]

property Font: Font;

Remarks

For Style objects, the value of the Font property is inherited from the parent style (if any) unless explicitly overridden.

See Also

C1List Object

C1Combo Object

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FooterStyle Property (C1Combo)

FooterStyle Property (C1Combo)

Returns the Style object that controls the appearance of column footers.

Syntax

[VB]

Public FooterStyle As Style

[C#]

public Style FooterStyle {get; set;}

[Delphi]

property FooterStyle: Style;

Remarks

This property returns the Style object that controls the appearance of column footings within a list, column, or split. By default, this is the built-in Footing style.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ForeColor Property (C1Combo)

ForeColor Property (C1Combo)

Specifies the foreground color of an object.

Syntax

[VB]

Public ForeColor As Color

[C#]

public Color ForeColor {get; set;}

[Delphi]

property ForeColor: Color;

Remarks

Colors may be specified as RGB values or system default colors.

For Style objects, the value of the ForeColor property is inherited from the parent style (if any) unless explicitly overridden.

See Also

C1List Object

C1Combo Object

Style Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GapHeight Property

GapHeight Property

Sets or returns the length between the edit portion and the dropdown portion of the combo box.

Syntax

[VB]

Public GapHeight As Integer

[C#]

public int GapHeight {get; set;}

[Delphi]

property GapHeight: Integer;

Remarks

The default value is 2 pixels, but the value can be set to less than 2 pixels.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HeadingStyle Property (C1Combo)

HeadingStyle Property (C1Combo)

Returns the Style object that controls the appearance of the column heading.

Syntax

[VB]

Public HeadingStyle As Style

[C#]

public Style HeadingStyle {get; set;}

[Delphi]

property HeadingStyle: Style;

Remarks

This property returns the Style object that controls the appearance of column headings within a list, column, or split. By default, this is the built-in Heading style.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HighlightRowStyle Property (C1Combo)

HighlightRowStyle Property (C1Combo)

Returns the Style object that controls the appearance of the highlighted row.

Syntax

[VB]

Public HighlightRowStyle As Style

[C#]

public Style HighlightRowStyle {get; set;}

[Delphi]

property HighlightRowStyle: Style;

Remarks

This property sets or returns the Style object that controls the appearance of a highlighted row or cell marquee. By default, this is the built-in HighlightRow style.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HScrollBar Property (C1Combo)

HScrollBar Property (C1Combo)

Returns the HBar object that controls the appearance of the horizontal scrollbar.

Syntax

[VB]

Public HScrollBar As HBar

[C#]

public HBar HScrollBar {get; }

[Delphi]

property HScrollBar: HBar;

Remarks

This property returns or sets the HBar object that controls the appearance of the horizontal scrollbar.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


IntegralHeight Property (C1Combo)

IntegralHeight Property (C1Combo)

Determines whether partial rows are displayed in a C1List or C1Combo control.

Syntax

[VB]

object.IntegralHeight = Boolean

[C#]

public bool IntegralHeight {get; set;}

[Delphi]

property IntegralHeight: Boolean;

Remarks

If True, partial rows are not displayed, and the height of the control will be reduced to eliminate the last partial row if necessary.

If False, partial rows are displayed, and the control retains its design-time height.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ItemHeight Property (C1Combo)

ItemHeight Property (C1Combo)

Returns or sets the height of all list rows.

Syntax

[VB]

Public ItemHeight As Integer

[C#]

public int ItemHeight {get; set;}

[Delphi]

property ItemHeight: Integer;

Remarks

The default value depends upon the character height of the current font.

A setting of 0 causes the list to readjust its display so that each row occupies a single line of text in the current font. Therefore, the following statements will set the row height so that exactly two lines of text are shown in each row:

· Visual Basic

· C#

· Delphi

If the control's AllowRowSizing property is set to True, then the user can adjust the ItemHeight property at run time by dragging the row divider between any pair of record selectors.

Note

Increasing the ItemHeight property does not wrap cell text at column boundaries unless the column Style’s WrapText property is True.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


KeepForeColor Property

KeepForeColor Property

Determines whether the fore color of the text box remains unchanged when the combo box is disabled.

Syntax

[VB]

Public Property KeepForeColor As Boolean

[C#]

public int KeepForeColor {get; set;}

[Delphi]

property KeepForeColor: Integer;

Remarks

This property only takes effect when the ComboStyle is set to ComboStyleEnum.DropdownList. When this property is False (default), the text box text is gray while the combo is disabled. Setting it to True allows you to keep the text fore color as it is even when the combo is in the disabled state.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


LeftCol Property (C1Combo)

LeftCol Property (C1Combo)

Returns or sets the zero-based index of the leftmost column in a list or split.

Syntax

[VB]

Public LeftCol As Integer

[C#]

public int LeftCol {get; set;}

[Delphi]

property LeftCol: Integer;

Remarks

For a C1List or C1Combo control, setting the LeftCol property causes the list to scroll so that the specified column becomes the leftmost column. If a list contains multiple splits, then the leftmost column changes in each split.

For a Split object, setting the LeftCol property causes the specified column to become the leftmost column for that split only.

Use the LeftCol property in code to scroll a list or split horizontally. Use the TopIndex property to determine the bookmark of the first visible row in a list or split.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


LimitToList Property

LimitToList Property

Determines if the NotInList event fires when an incremental search value is not found.

Syntax

[VB]

Public LimitToList As Boolean

[C#]

public bool LimitToList {get; set;}

[Delphi]

property LimitToList: Boolean;

Remarks

If True, the NotInList event will fire whenever the user enters a value into the text portion of a C1Combo control and the value is not found in the list portion of the control.

If False (the default), the NotInList event will not fire.

By writing a handler for the NotInList event, you can enable your users to add new items to the recordset specified by the control's DataSource property.

The content in the text area of C1Combo can be cleared when the LimitToList property is set to True. You can not delete characters individually, but can clear them by selecting all the text and pressing the <Delete> key.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ListCount Property (C1Combo)

ListCount Property (C1Combo)

Returns the total row number for the control.

Syntax

[VB]

Public ReadOnly Property ListCount As Integer

[C#]

public int ListCount {get;}

[Delphi]

property ListCount: Integer;

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MatchEntry Property (C1Combo)

MatchEntry Property (C1Combo)

Returns or sets a value indicating how a C1Combo’s dropdown list performs searches based on user input.

Syntax

[VB]

C1Combo.MatchEntry = value

[C#]

public MatchEntryEnum MatchEntry {get; set;}

[Delphi]

property MatchEntry: MatchEntryEnum;

Remarks

The MatchEntry property returns or sets the method by which the list will display data. This only take effects when it is the dropdown list that has the input focus.

Member Name | Description
None | The control does not perform any incremental searches.
Standard | The default. The search argument is limited to one character, and the control attempts to find a match for the character entered using the first letter of entries in the list. Repeatedly typing the same letter cycles through all of the entries in the list beginning with that letter.
Extended | The control searches for an entry matching all characters entered. The search is performed incrementally as characters are typed. The search argument is cleared when the user presses Backspace or hesitates for a few seconds.

Note

The MatchCol property determines which column is searched.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MatchEntryTimeout Property (C1Combo)

MatchEntryTimeout Property (C1Combo)

Returns or sets a value indicating the timeout value, in milliseconds, for incremental searching when a C1Combo control's ComboStyle property is set to DropdownList, or when a C1List control's MatchEntry property is set to Extended.

Syntax

[VB]

object.MatchEntryTimeout = long

[C#]

public long MatchEntryTimeout {get; set;}

[Delphi]

property MatchEntryTimeout: Long;

Remarks

The search is performed incrementally as characters are typed. If there is no keystroke after this time value, the incremental search will be reset, allowing the user to begin a new search.

For the C1Combo control, this means that the text entry box is cleared after the timeout period has passed, and new characters may be entered in their place.

For the C1List control, this means that after the timeout period has passed, the next characters entered will start a new search through the list.

Note

The DisplayMember property determines which column is searched.

Applied To

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MaxDropDownItems Property

MaxDropDownItems Property

The maximum number of items of in the drop-down portion of the combo box.

Syntax

[VB]

Public MaxDropDownItems As Short

[C#]

public short MaxDropDownItems {get; set;}

[Delphi]

property MaxDropDownItems: Short;

Remarks

The default value for this property is 5. If the data source contains fewer records than the number specified for MaxDropDownItems, then the list will show all of the items in the data source.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MaxLength Property

MaxLength Property

Gets or sets the maximum number of characters allowed in the editable portion of a combo box.

Syntax

[VB]

Public MaxLength As Integer

[C#]

public int MaxLength {get; set;}

[Delphi]

property MaxLength: Integer;

Remarks

The value of this property must be greater than or equal to zero.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MouseCursor Property

MouseCursor Property

Determines the style of the mouse cursor when it is over list portion of the control.

Syntax

[VB]

Public MouseCursor As Cursor

[C#]

public Cursor MouseCursor {get; set;}

[Delphi]

property MouseCursor: Cursor;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OddRowStyle Property (C1Combo)

OddRowStyle Property (C1Combo)

Returns the OddRowStyle Style object.

Syntax

[VB]

Public OddRowStyle As Style

[C#]

public Style OddRowStyle {get; set;}

[Delphi]

property OddRowStyle: Style;

Remarks

This property sets or returns the Style object that controls the appearance of an odd-numbered row in a list or split where the AlternatingRows property is set to True. By default, this is the built-in OddRow style.

To change the appearance of even-numbered rows, set the EvenRowStyle property.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PartialRightColumn Property (C1Combo)

PartialRightColumn Property (C1Combo)

Determines whether the rightmost column of a control or split is clipped to the object's right edge when it is scrolled into view but cannot be displayed in its entirety.

Syntax

[VB]

object.PartialRightColumn = boolean

[C#]

public bool PartialRightColumn {get; set}

[Delphi]

property PartialRightColumn: Boolean;

Remarks

If True (the default), the rightmost column will be clipped if the control or split is not wide enough to accommodate the entire column.

If False, the rightmost column will not be clipped while other columns are visible. In this case, the rightmost column must be scrolled into view as the only visible column in the control or split.

If a control contains multiple splits, then setting its PartialRightColumn property has the same effect as setting the PartialRightColumn property of each split individually.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PreferredHeight Property

PreferredHeight Property

Gets the preferred height of the item area of the combo box.

Syntax

[VB]

Public PreferredHeight As Integer

[C#]

public int PreferredHeight {get;}

[Delphi]

property PreferredHeight: Integer;

Remarks

The preferred height is a value based on the font height and an adjustment for the border.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ReadOnly Property (C1Combo)

ReadOnly Property (C1Combo)

Controls whether the text in the control can be changed or not.

Syntax

[VB]

Public Property ReadOnly As Boolean

[C#]

public bool ReadOnly {get; set;}

[Delphi]

property ReadOnly: Boolean;

Remarks

The default value is false.

· Visual Basic

· C#

· Delphi

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RightToLeft Property (C1Combo)

RightToLeft Property (C1Combo)

Provides an appearance and functionality familiar to Middle East or Latin users.

Syntax

[VB]

object.RightToLeft = boolean

[C#]

public bool RightToLeft {get; set;}

[Delphi]

property RightToLeft: Boolean;

Remarks

When the RightToLeft property is set to True:

· Control columns begin at the right boundary of the List.

· Fixed columns are located on the right side of the Control.

· LeftCol identifies the rightmost visible column (the first column beyond the leftmost fixed column).

· Cell values (control Text property) have right to left reading order.

When the RightToLeft property is set to False, the control behavior is the same as described in the standard documentation.

· For C1Combo, the edit box will be on the right side of the dropdown button.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Row Property (C1Combo)

Row Property (C1Combo)

Specifies the current row.

Syntax

[VB]

Public Row As Integer

[C#]

public int Row {get; set;}

[Delphi]

property Row: Integer;

Remarks

This property specifies the zero-based index of the current row relative to the first displayed row. It may be set at run time to highlight a different cell within the current column.

The Row property accepts values ranging from 0 to VisibleRows - 1. An error occurs if you attempt to set it to an invalid row index.

If the current row is not visible, then this property returns -1.

For a C1Combo control, changing the Row property at run time does not affect selected rows.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowDivider Property (C1Combo)

RowDivider Property (C1Combo)

Determines the style of the border drawn between list rows.

Syntax

[VB]

Public RowDivider As GridLines

[C#]

public GridLines RowDivider {get; set;}

[Delphi]

property RowDivider: GridLines;

Remarks

The Style property of RowDivider does not control whether rows can be resized by dragging their border. Use the AllowRowSizing property to control this behavior.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowSubDividerColor Property (C1Combo)

RowSubDividerColor Property (C1Combo)

Returns or sets the color of a RowSubDivider.

Syntax

[VB]

Public RowSubDividerColor As Color

[C#]

public Color RowSubDividerColor {get; set;}

[Delphi]

property RowSubDividerColor: Color;

Remarks

This property controls the row subdivider color of the list.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowTracking Property (C1Combo)

RowTracking Property (C1Combo)

Controls whether rows are automatically highlighted as the mouse is moved over the drop-down portion of a C1Combo control.

Syntax

[VB]

C1Combo.RowTracking = boolean

[C#]

public bool RowTracking {get; set;}

[Delphi]

property RowTracking: Boolean;

Remarks

If True (the default), individual rows are highlighted as the mouse moves over them.

If False, moving the mouse does not change the highlighted row.

Note

When RowTracking is True and the user highlights a different row by moving the mouse, the ItemChanged event will not fire.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollTips Property (C1Combo)

ScrollTips Property (C1Combo)

Determines whether the list displays a pop-up text window when the scrollbar thumb is dragged.

Syntax

[VB]

Public ScrollTips As Boolean

[C#]

public bool ScrollTips {get; set;}

[Delphi]

property ScrollTips: Boolean;

Remarks

By default, this property is set to False, and ScrollTips are not displayed.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollTrack Property (C1Combo)

ScrollTrack Property (C1Combo)

Determines whether the list constantly displays information as it scrolls.

Syntax

[VB]

Public ScrollTrack As Boolean

[C#]

public bool ScrollTrack {get; set;}

[Delphi]

property ScrollTrack: Boolean;

Remarks

If True (the default), moving the scrollbar thumb causes the list’s display to update with new data. If False, moving the scrollbar thumb does not change the display. If the ScrollTrack property is True, moving the scrollbar thumb causes the list to scroll.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedCols Property (C1Combo)

SelectedCols Property (C1Combo)

Returns the SelectedColumnCollection object.

Syntax

[VB]

Public SelectedCols As SelectedColumnCollection

[C#]

public SelectedColumnCollection SelectedCols {get;}

[Delphi]

property SelectedCols: SelectedColumnCollection;

Remarks

The SelectedColumnCollection object is a collection of C1DataColumn objects.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedIndex Property (C1Combo)

SelectedIndex Property (C1Combo)

Returns or sets the bookmark identifying the selected item in a control.

Syntax

[VB]

Public Property SelectedIndex As Integer

[C#]

public int SelectedIndex {get; set;}

[Delphi]

property SelectedIndex: Integer;

Remarks

Use the value returned by the SelectedIndex property to determine the current row in a C1List or C1Combo control.

When you set the SelectedIndex property to a valid value in code, the row associated with that value becomes the current row, and the dropdown control adjusts its display to bring the new current row into view if necessary.

The SelectedIndex property is defined as a Variant to accommodate user-defined bookmarks in unbound mode.

Note

For the C1Combo control, the SelectedIndex and Bookmark properties are synonymous.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedStyle Property (C1Combo)

SelectedStyle Property (C1Combo)

Returns the SelectedStyle Style object.

Syntax

[VB]

Public SelectedStyle As Style

[C#]

public Style SelectedStyle {get; set;}

[Delphi]

property SelectedStyle: Style;

Remarks

This property returns or sets the Style object that controls the appearance of selected rows and columns within a list or split. By default, this is the built-in Selected style.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedText Property

SelectedText Property

Sets or returns the string containing the currently selected text within the combo box’s editing window.

Syntax

[VB]

Public SelectedText As String

[C#]

public string SelectedText {get; set;}

[Delphi]

property SelectedText: string;

Remarks

Setting SelectedText to a new value sets SelectionLength to 0 and replaces the selected text with the new string.

Use the SelectedText property in combination with the SelectionStart and SelectionLength properties to set the insertion point, establish an insertion range, select substrings, or clear text. These properties are useful for implementing copy, cut, and paste operations that transfer string data to and from the clipboard.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedValue Property (C1Combo)

SelectedValue Property (C1Combo)

Gets or sets the value of the member property specified by the ValueMember property.

Syntax

[VB]

Public SelectedValue As Object

[C#]

public object SelectedValue {get; set;}

[Delphi]

property SelectedValue: Object;

Remarks

SelectedValue is bindable; the common usage is to bind it to a field in another DataSource.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectionLength Property

SelectionLength Property

Sets or returns the number of characters selected within the editing window.

Syntax

[VB]

Public SelectionLength As Integer

[C#]

public int SelectionLength {get; set;}

[Delphi]

property SelectionLength: Integer;

Remarks

When editing is not is progress, this property returns 0.

Setting SelectionLength to a value less than 0 causes a run time error.

Use the SelectionLength property in combination with the SelectionStart and SelectedText properties to set the insertion point, establish an insertion range, select substrings, or clear text. These properties are useful for implementing copy, cut, and paste operations that transfer string data to and from the clipboard.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectionStart Property

SelectionStart Property

Sets or returns the starting point of the text selection within the editing window.

Syntax

[VB]

Public SelectionStart As Integer

[C#]

public int SelectionStart {get; set;}

[Delphi]

property SelectionStart: Integer;

Remarks

When editing is not is progress, this property returns 0.

Setting SelectionStart to a value greater than the length of the text in the cell sets it to this length. Changing SelectionStart moves the entire selection while preserving the value of SelectionLength, if possible. If there are not enough characters, SelectionLength is decreased accordingly.

Use the SelectionStart property in combination with the SelectionLength and SelectedText properties to set the insertion point, establish an insertion range, select substrings, or clear text. These properties are useful for implementing copy, cut, and paste operations that transfer string data to and from the clipboard.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Property (C1Combo)

Split Property (C1Combo)

Specifies the zero-based index of the current split.

Syntax

[VB]

object.Split = integer

[C#]

public int Split {get; set;}

[Delphi]

property Split: Integer;

Remarks

Read/Write at run time. Not available at design time.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Splits Property (C1Combo)

Splits Property (C1Combo)

Returns a collection of Split objects.

Syntax

[VB]

Public Splits As SplitCollection

[C#]

public SplitCollection Splits {get;}

[Delphi]

property Splits: SplitCollection;

Remarks

The split indexer accepts three types of values. First it accepts a single Integer and returns a horizontal split object:

· Visual Basic

· C#

· Delphi

Secondly, it accepts the name of the split as a String (if one was specified), and returns either the horizontal or vertical split specified:

· Visual Basic

· C#

· Delphi

Thirdly, in order to return splits from a split matrix, this property also accepts two integers delimited by a comma that define the split index in the split matrix. For instance to access the 1st split in the 3rd row, the indexer would look as follows:

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Style Property (C1Combo)

Style Property (C1Combo)

Returns or sets the Style object.

Syntax

[VB]

Public Style As Style

[C#]

public Style Style {get; set;}

[Delphi]

property Style: Style;

Remarks

This property returns or sets the Style object that controls the normal appearance of a cell within a list, column, or split. By default, this is the built-in Normal style.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Styles Property (C1Combo)

Styles Property (C1Combo)

Returns a collection of named Style objects.

Syntax

[VB]

Public Styles As GridStyleCollection

[C#]

public GridStyleCollection Styles {get; set;}

[Delphi]

property Styles: GridStyleCollection;

Remarks

When a list is first created, it contains ten built-in styles, which control the following display aspects:

Normal | Data cells in unselected, unhighlighted rows
Heading | Column headers
Footing | Column footers
Selected | Data cells in selected rows
Caption | List and split caption bars
HighlightRow | Data cells in highlighted rows
EvenRow | Data cells in even numbered rows
OddRow | Data cells in odd numbered rows
FilterBar | Cells in the filter bar row
RecordSelector | Cells in the record selector column

Note

At design time, use the GridStyle property page to modify these built-in styles or create your own named styles.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SuperBack Property

SuperBack Property

Controls the BackSpace behavior when AutoCompletion and LimitToList are set to True.

Syntax

[VB]

Public SuperBack As Boolean

[C#]

public bool SuperBack {get; set;}

[Delphi]

property SuperBack: Boolean;

Remarks

SuperBack only applies when the AutoCompletion and LimitToList properties are set to True.

If a user presses the backspace button when SuperBack is set to False, and the remaining text is not matched in the dropdown list, the combo box text does not change. If a user presses the backspace button when SuperBack is set to True, and the remaining text is not matched in the dropdown list, the SelectedText expands one more position to the left.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Text Property (C1Combo)

Text Property (C1Combo)

Contains the text displayed in the editor.

Syntax

[VB]

Public Text As String

[C#]

public string Text {get; set;}

[Delphi]

property Text: string;

See Also

C1DataColumn Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


TextAlign Property

TextAlign Property

Determines how the text will be aligned within the editor.

Syntax

[VB]

Public TextAlign As HorizontalAlignment

[C#]

public HorizontalAlignment TextAlign {get; set;}

[Delphi]

property TextAlign: HorizontalAlignment;

Remarks

Member Name | Description
Left (0) | The default. Text is aligned to the left.
Right (1) | Text is aligned to the right.
Center (2) | Text is centered.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


TopIndex Property (C1Combo)

TopIndex Property (C1Combo)

Returns or sets a value containing the bookmark for the first visible row in a list or split.

Syntax

[VB]

Public TopIndex As Integer

[C#]

public int TopIndex {get; set;}

[Delphi]

property TopIndex: Integer;

Remarks

For a C1List or C1Combo control, setting the TopIndex property causes the list to scroll so that the specified row becomes the topmost row. If a list contains multiple splits, then the topmost row or column changes in each split, even if the splits have different HscrollBar or VscrollBar property settings.

For a Split object, setting the TopIndex property causes the specified row to become the topmost row for that split only.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueMember Property (C1Combo)

ValueMember Property (C1Combo)

Specifies the field name for binding purposes.

Syntax

[VB]

Public ValueMember As String

[C#]

public string ValueMember {get; set;}

[Delphi]

property ValueMember: string;

Example

· Visual Basic

· C#

· Delphi

Remarks

The default value is the empty string “ ”.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VisibleCols Property (C1Combo)

VisibleCols Property (C1Combo)

Returns the number of visible columns in the current split.

Syntax

[VB]

Public VisibleCols As Integer

[C#]

public int VisibleCols {get;}

[Delphi]

property VisibleCols: Integer;

Remarks

The value returned includes both fully and partially displayed columns. You can use the Split property of the C1List control to determine the index of the current split.

For C1Combo controls, this property returns the number of visible columns in the entire control, since there can only be one split. The value returned includes both fully and partially displayed columns.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VisibleRows Property (C1Combo)

VisibleRows Property (C1Combo)

Returns the number of visible rows in the list.

Syntax

[VB]

Public VisibleRows As Integer

[C#]

public int VisibleRows {get; set;}

[Delphi]

property VisibleRows: Integer;

Remarks

The value returned includes both fully and partially displayed rows.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VScrollBar Property (C1Combo)

VScrollBar Property (C1Combo)

Sets or returns the VBar object that controls the appearance of the vertical scrollbar.

Syntax

[VB]

Public VScrollBar As VBar

[C#]

public VBar VScrollBar {get; set;}

[Delphi]

property VScrollBar: VBar;

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


WillChangeToIndex Property (C1Combo)

WillChangeToIndex Property (C1Combo)

Returns the bookmark identifying the will-be selected item in a control.

Syntax

[VB]

Public ReadOnly Property WillChangeToIndex As Integer

[C#]

public int WillChangeToIndex {get;}

[Delphi]

property WillChangeToIndex: Integer;

Remarks

This property is used in the SelChange, RowChange and ItemChanged events. When you handle these events, the SelectedIndex will be the old selected index, and the WillChangeToIndex will be the new selected index.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


WillChangeToText Property (C1Combo)

WillChangeToText Property (C1Combo)

Returns the string identifying the text for the item to be selected.

Syntax

[VB]

Public ReadOnly Property WillChangeToText As String

[C#]

public string WillChangeToText {get;}

[Delphi]

property WillChangeToText: string;

Remarks

This property will most likely be used during SelChange, RowChange etc. events, and it will give you the text of the new selected item. It is related to WillChangeToIndex, which refers to the new selected index.

The WillChangeToText property returns an empty string when the WillChangeToIndex property is set to -1.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


WillChangeToValue Property (C1Combo)

WillChangeToValue Property (C1Combo)

Returns the object identifying the value to be selected.

Syntax

[VB]

Public ReadOnly Property WillChangeToValue As Object

[C#]

public object WillChangeToValue {get;}

[Delphi]

property WillChangeToValue: Object;

Remarks

This property is added similarly to WillChangeToIndex and WillChangeToText.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Method Reference

AddCellStyle Method (C1Combo)

AddItem Method (C1Combo)

AddItemTitles Method (C1Combo)

AddRegexCellStyle Method (C1Combo)

CaptureImage Method

CellContaining Method (C1Combo)

ClearCellStyle Method (C1Combo)

ClearFields Method (C1Combo)

ClearItems Method (C1Combo)

ClearSelCols Method (C1Combo)

ClearSelected Method (C1Combo)

CloseCombo Method

ColContaining Method (C1Combo)

FindString Method (C1Combo)

FindStringExact Method (C1Combo)

GetItemText Method (C1Combo)

HoldFields Method (C1Combo)

InsertHorizontalSplit Method (C1Combo)

InsertItem Method (C1Combo)

InsertVerticalSplit Method (C1Combo)

OpenCombo Method

PointAt Method (C1Combo)

ReBind Method (C1Combo)

Refresh Method (C1Combo)

RemoveHorizontalSplit Method (C1Combo)

RemoveItem Method (C1Combo)

RemoveVerticalSplit Method (C1Combo)

ResumeBinding Method (C1Combo)

RowContaining Method (C1Combo)

RowTop Method (C1Combo)

ScrollCtl Method (C1Combo)

Select Method

SelectAll Method

SetAddItemData Method (C1Combo)

Sort Method (C1Combo)

SplitContaining Method (C1Combo)

SuspendBinding Method (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddCellStyle Method (C1Combo)

AddCellStyle Method (C1Combo)

Controls the font and color of cells within a list, column, or split according to value.

Syntax

[VB]

Public Sub AddCellStyle(ByVal conditional As C1.Win.C1List.CellStyleFlag, ByVal style As C1.Win.C1List.Style)

[C#]

public void AddCellStyle ( C1.Win.C1List.CellStyleFlag conditional , C1.Win.C1List.Style style )

[Delphi]

procedure AddCellStyle(conditional: C1.Win.C1List.CellStyleFlag, style: As C1.Win.C1List.Style);

Parameter | Description
condition | Combination of one or more CellStyleFlag constants.
style | Style object that specifies font and color attributes.

Remarks

This method allows you to control the font and color of cells within a list, column, or split according to the status values (CellStyleFlag enumeration) specified by the condition argument:

Member Name | Description
Normal Cell | The cell satisfies none of the conditions.
CurrentCell | The cell is the current cell as specified by the Bookmark, Col, and Split properties. At any given time, only one cell can have this status.
MarqueeRow | The cell is part of a highlighted row marquee.
SelectedRow | The cell is part of a row selected by the user or in code. The SelectedRowCollection contains a bookmark for each selected row.
AllCells | All Cells

You can add the first four values together to specify multiple cell conditions. For example, a cell status value of 9 (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. You can also use a cell status value of 0 (CellStyleFlag.NormalCell) to refer to only those cells without any of the four basic cell conditions.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes updated cells to be displayed in red:

· Visual Basic

· C#

· Delphi

Each time the AddCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a list, column, or split.

Note

If a cell condition already exists for a particular condition value, the new style setting replaces the existing one.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddItem Method (C1Combo)

AddItem Method (C1Combo)

Add a new item to the end in the AddItem mode.

Syntax

[VB]

C1List1.AddItem("Greg;Daryll;412-657-3412")

[C#]

public void AddItem ( System.String newItem )

[Delphi]

procedure AddItem(newItem: string);

Remarks

Parameter | Description
newItem | The item to be added. It is delimited by the AddItemSeparator.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddItemTitles Method (C1Combo)

AddItemTitles Method (C1Combo)

Sets the column titles in the AddItem mode.

Syntax

[VB]

Public Sub AddItemTitles(ByVal titles As String)

[C#]

public void AddItemTitles ( System.String titles )

[Delphi]

procedure AddItemTitles(titles: string);

Parameter | Description
titles | The titles to be set. It is delimited by the semicolon (;).

Example

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddRegexCellStyle Method (C1Combo)

AddRegexCellStyle Method (C1Combo)

Controls the font and color of cells within a list, column, or split according to their contents.

Syntax

[VB]

Public Sub AddRegexCellStyle(ByVal conditional As C1.Win.C1List.CellStyleFlag, ByVal style As C1.Win.C1List.Style, ByVal regex As String)

[C#]

public void AddRegexCellStyle ( C1.Win.C1List.CellStyleFlag conditional , C1.Win.C1List.Style style , System.String regex )

[Delphi]

procedure AddRegexCellStyle(conditional: C1.Win.C1List.CellStyleFlag, style: C1.Win.C1List.Style, regex: string);

Parameter | Description
condition | Combination of one or more CellStyleFlag constants.
style | Style object that specifies font and color attributes.
regex | A regular expression string.

Remarks

This method allows you to control the font and color of cells within a list, column, or split according to their contents. The status values (CellStyleFlag enumeration) specified by the condition argument determine which cells are affected:

Member Name | Description
Normal Cell | The cell satisfies none of the conditions.
CurrentCell | The cell is the current cell as specified by the Bookmark, Col, and Split properties. At any given time, only one cell can have this status.
MarqueeRow | The cell is part of a highlighted row marquee.
SelectedRow | The cell is part of a row selected by the user or in code. The SelectedRowCollection contains a bookmark for each selected row.
AllCells | All Cells

You can add the first four values together to specify multiple cell conditions. For example, a cell status value of (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. You can also use a cell status value of (CellStyleFlag.NormalCell) to refer to only those cells without any of the four basic cell conditions. To designate that a cell condition should apply to all cells regardless of status, use a cell status value of CellStyleFlag.AllCells.

The regex argument is a regular expression string that describes the pattern matching to be performed on cell contents. The regular expressions supported by List are a subset of standard Unix regular expression syntax:

p* | Any pattern followed by an asterisk matches zero or more occurrences of that pattern. For example, ab*c matches ac, abc, and abbcy (partial match).
p+ | Any pattern followed by a plus sign matches one or more occurrences of that pattern. For example, ab+c matches abc and abbcy, but not ac.
[list] | A list of case-sensitive characters enclosed in brackets matches any one of those characters in the given position in the string. Character ranges can be used, as in [abcd], which is equivalent to [a-d]. Multiple ranges can also be used. For example, [A-Za-z0-9] matches any letter or digit. Bracketed patterns can also be combined with either the * or + operators. The pattern [A-Z]+ matches a sequence of one or more uppercase letters.
[^list] | If a list starts with a caret, it matches any character except those specified in the list.
. (period) | A period represents any single character.
^p | A caret at the beginning of a pattern forces a match to occur at the start of a cell. Otherwise, the pattern can match anywhere within a cell.
p$ | A dollar sign at the end of a pattern forces a match to occur at the end of a cell. Otherwise, the pattern can match anywhere within a cell.
\c | Any character preceded by a backslash represents itself, unless enclosed in brackets, in which case the backslash is interpreted literally.

Any other character represents itself and will be compared with respect to case.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes normal cells containing the letters "SQL" to be displayed in bold:

· Visual Basic

· C#

· Delphi

Each time the AddRegexCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a list, column, or split.

Note

If a cell condition already exists for a particular pair of condition and regex values, the new style setting replaces the existing one.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CaptureImage Method

CaptureImage Method

Returns an image of the control in a format that you can assign to the Picture property of a Visual Basic form or control or the PaintPicture method of the Printer object.

Syntax

[VB]

Public Sub CaptureImage()

[C#]

public void CaptureImage ( )

[Delphi]

procedure CaptureImage;

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellContaining Method (C1Combo)

CellContaining Method (C1Combo)

Returns the cell position for a set of coordinates.

Syntax

[VB]

Public Function CellContaining(ByVal x As Integer, ByVal y As Integer, ByRef rowAt As Integer, ByRef colAt As Integer) As Boolean

[C#]

public System.Boolean CellContaining ( System.Int32 x , System.Int32 y , System.Int32 rowAt , System.Int32 colAt )

[Delphi]

function CellContaining(x: Integer, y: Integer, rowAt: Integer, colAt: Integer): Boolean;

Parameter | Description
x, y | Integers that define a coordinate pair in pixels.
rowAt | Integer that receives the zero-based index of the row beneath the specified Y coordinate.
colAt | Integer that receives the zero-based index of the column beneath the specified X coordinate.

Return Value

A boolean that indicates whether a data cell is beneath the specified coordinate pair.

Remarks

The CellContaining method combines the ColContaining and RowContaining methods into one call. If the coordinate pair specified by x and y points to a data cell, this method returns True, and the rowAt and colAt arguments receive zero-based indexes that identify the cell.

This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a list cell.

If the specified coordinate is outside of the list's data area, this method returns False. You can use the PointAt method to determine what kind of list element, if any, is beneath the specified coordinate.

Note

You must convert the x and y arguments to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearCellStyle Method (C1Combo)

ClearCellStyle Method (C1Combo)

Removes a cell condition established with a previous call to the AddCellStyle method.

Syntax

[VB]

Public Sub ClearCellStyle(ByVal conditional As C1.Win.C1List.CellStyleFlag)

[C#]

public void ClearCellStyle ( C1.Win.C1List.CellStyleFlag conditional )

[Delphi]

procedure ClearCellStyle(conditional: CellStyleFlag);

Parameter | Description
condition | A combination of one or more CellStyleFlag constants.

Remarks

The ClearCellStyle method removes a cell condition established with a previous call to the AddCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If the condition argument is CellStyleFlag.AllCells, then all non-regex cell conditions are removed, regardless of status.

See Also

C1List Object

C1Combo Object

C1DisplayColumn Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearFields Method (C1Combo)

ClearFields Method (C1Combo)

Restores the default list layout.

Syntax

[VB]

Public Sub ClearFields()

[C#]

public void ClearFields ( )

[Delphi]

procedure ClearFields;

Remarks

The ClearFields method restores the default list layout so that subsequent ReBind operations will automatically derive new column bindings from the (possibly changed) data source. You can cancel the list's automatic layout behavior by invoking the HoldFields method.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearItems Method (C1Combo)

ClearItems Method (C1Combo)

Clears all of the items in the AddItem mode.

Syntax

[VB]

Public Sub ClearItems()

[C#]

public void ClearItems ( )

[Delphi]

procedure ClearItems;

Example

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearSelCols Method (C1Combo)

ClearSelCols Method (C1Combo)

The ClearSelCols method deselects all columns in a split. If no columns are selected, then this method does nothing.

Syntax

[VB]

Public Sub ClearSelCols()

[C#]

public void ClearSelCols ( )

[Delphi]

procedure ClearSelCols;

Return Value

None

Remarks

If a control contains multiple splits, then invoking its ClearSelCols method has the same effect as invoking the ClearSelCols method for the current split. The index of the current split is available through the control's Split property.

Use the SelectionStart property to determine the current column selection range for a split.

See Also

C1List Object

C1Combo Object

Split Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ClearSelected Method (C1Combo)

ClearSelected Method (C1Combo)

Clears a selection.

Syntax

[VB]

Public Sub ClearSelected()

[C#]

public void ClearSelected ( )

[Delphi]

procedure ClearSelected;

Example

· Visual Basic

· C#

· Delphi

Return Value

None

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CloseCombo Method

CloseCombo Method

Closes the dropdown list of the combo.

Syntax

[VB]

Public Sub CloseCombo()

[C#]

public void CloseCombo ( )

[Delphi]

procedure CloseCombo;

Return Value

None

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColContaining Method (C1Combo)

ColContaining Method (C1Combo)

Returns the index value of the list column containing the specified coordinate.

Syntax

[VB]

Public Function ColContaining(ByVal x As Integer) As Integer

[C#]

public System.Int32 ColContaining ( System.Int32 x )

[Delphi]

procedure ColContaining(x: Integer): Integer;

Parameter | Description
x | Integer that defines a horizontal coordinate (X value) in pixels.

Return Value

An integer corresponding to the index of the column beneath the specified X coordinate.

Remarks

The return value ranges from 0 to Columns.Count – 1.

This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a list column.

If x is outside of the list's data area, this method returns -1.

The ColContaining method returns the index value of the column indicated, not the visible column position. For example, if x falls within the first visible column, but two columns have been scrolled off the left side of the control, the ColContaining method returns 2, not 0 (assuming that the user did not move any columns previously).

Note

You must convert the x argument to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FindString Method (C1Combo)

FindString Method (C1Combo)

Find the first row index such that the cell text starts with string s in the given column.

Syntax

[VB]

Public Function FindString(ByVal s As String) As Integer

Public Function FindString(ByVal s As String, ByVal startIndex As Integer) As Integer

Public Function FindString(ByVal s As String, ByVal startIndex As Integer, ByVal col As Integer) As Integer

Public Function FindString(ByVal s As String, ByVal startIndex As Integer, ByVal field As String) As Integer

[C#]

public System.Int32 FindString ( System.String s )

public System.Int32 FindString ( System.String s , System.Int32 startIndex )

public System.Int32 FindString ( System.String s , System.Int32 startIndex , System.Int32 col )

public System.Int32 FindString ( System.String s , System.Int32 startIndex , System.String field )

[Delphi]

function FindString(s: string): Integer;

function FindString(s: string; startIndex: Integer): Integer;

function FindString(s: string; startIndex: Integer; col: Integer): Integer;

function FindString(s: string; startIndex: Integer; field: string): Integer;

Parameter | Description
s | The string to be searched.
startIndex | The row index where the search will start.
col | The field (column) index.
field | The field from which you are searching.

Remarks

If the startIndex is not given, then the search will start at the row index 0. If the column index or the field name is not given, then the DisplayMember is assumed.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FindStringExact Method (C1Combo)

FindStringExact Method (C1Combo)

Find the first row index such that the cell is the same with string s in the given column.

Syntax

[VB]

Public Function FindStringExact(ByVal s As String) As Integer

Public Function FindStringExact(ByVal s As String, ByVal startIndex As Integer) As Integer

Public Function FindStringExact(ByVal s As String, ByVal startIndex As Integer, ByVal col As Integer) As Integer

Public Function FindStringExact(ByVal s As String, ByVal startIndex As Integer, ByVal field As String) As Integer

[C#]

public System.Int32 FindStringExact ( System.String s )

public System.Int32 FindStringExact ( System.String s , System.Int32 startIndex )

public System.Int32 FindStringExact ( System.String s , System.Int32 startIndex , System.Int32 col )

public System.Int32 FindStringExact ( System.String s , System.Int32 startIndex , System.String field )

[Delphi]

function FindStringExact(s: string): Integer;

function FindStringExact(s: string; startIndex: Integer): Integer;

function FindStringExact(s: string; startIndex: Integer; col: Integer): Integer;

function FindStringExact(s: string; startIndex: Integer; field: string): Integer;

Parameter | Description
s | The string to be searched.
startIndex | The row index where the search will start.
col | The field (column) index.
field | The field from which you are searching.

Return Value

The row index of the first match.

Remarks

If the startIndex is not given, then the search will start at the row index 0. If the column index or the field name is not given, then the DisplayMember is assumed.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GetItemText Method (C1Combo)

GetItemText Method (C1Combo)

Gets the cell text for any cell.

Syntax

[VB]

Public Function GetItemText(ByVal rowIndex As Integer, ByVal colIndex As Integer) As String

Public Function GetItemText(ByVal rowIndex As Integer, ByVal colName As String) As String

[C#]

public System.String GetItemText ( System.Int32 rowIndex , System.String colName )

public System.String GetItemText ( System.Int32 rowIndex , System.Int32 colIndex )

[Delphi]

function GetItemText(rowIndex: Integer; colIndex: Integer): string;

function GetItemText(rowIndex: Integer; colName: Integer): string;

Parameter | Description
rowIndex | The row index.
colName | The column name.
colIndex | The column index.

Remarks

This method will get the text for any cell directly, instead of using the Column object.

Return Value

Returns a string which identifies the cell text.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HoldFields Method (C1Combo)

HoldFields Method (C1Combo)

Sets the current column/field layout as the customized layout.

Syntax

[VB]

Public Sub HoldFields()

[C#]

public void HoldFields ( )

[Delphi]

procedure HoldFields;

Remarks

The HoldFields method sets the current column/field layout as the customized layout so that subsequent ReBind operations will use the current layout for display. You can resume the list's automatic layout behavior by invoking the ClearFields method.

The HoldFields method is especially useful in the unbound modes when you have specified the column layout in code and would like to keep it intact after a ReBind operation.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


InsertHorizontalSplit Method (C1Combo)

InsertHorizontalSplit Method (C1Combo)

Inserts a horizontal split at the specified index.

Syntax

[VB]

Public Sub InsertHorizontalSplit(ByVal idx As Integer)

[C#]

public void InsertHorizontalSplit ( System.Int32 idx )

[Delphi]

procedure InsertHorizontalSplit(idx: Integer);

Parameter | Description
idx | A zero-based integer that identifies the position of the new split.

Remarks

This property inserts a horizontal split into the list at the index specified. By default the list has one horizontal split.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


InsertItem Method (C1Combo)

InsertItem Method (C1Combo)

Inserts a new item at the index position in the AddItem mode.

Syntax

[VB]

Public Sub InsertItem(ByVal newItem As String, ByVal index As Integer)

[C#]

public void InsertItem ( System.String newItem , System.Int32 index )

[Delphi]

procedure InsertItem(newItem: string; index: Integer);

Example

Insert the third row:

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


InsertVerticalSplit Method (C1Combo)

InsertVerticalSplit Method (C1Combo)

Inserts a vertical split at the specified index.

Syntax

[VB]

Public Sub InsertVerticalSplit(ByVal idx As Integer)

[C#]

public void InsertVerticalSplit ( System.Int32 idx )

[Delphi]

procedure InsertVerticalSplit(idx: Integer);

Parameter | Description
idx | A zero-based integer that identifies the position of the new split.

Remarks

This property inserts a vertical split into the list at the index specified. By default the list has one vertical split.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OpenCombo Method

OpenCombo Method

Drops down the list of the combo.

Syntax

[VB]

Public Sub OpenCombo()

[C#]

public void OpenCombo ( )

[Delphi]

procedure OpenCombo;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PointAt Method (C1Combo)

PointAt Method (C1Combo)

Returns one of the PointAtEnum constants, which indicates the kind of list element beneath the specified coordinate pair.

Syntax

[VB]

Public Function PointAt(ByVal x As Integer, ByVal y As Integer) As C1.Win.C1List.PointAtEnum

[C#]

public C1.Win.C1List.PointAtEnum PointAt ( System.Int32 x , System.Int32 y )

[Delphi]

function PointAt(x: Integer; y: Integer): C1.Win.C1List.PointAtEnum;

Parameter | Description
x, y | Singles that define a coordinate pair in pixels.

Return Value

PointAtEnum constants:

Member Name | Description
NotInList | Coordinates are not in list area.
AtCaption | Coordinates are in caption area.
AtSplitHeader | Coordinates are in a split’s header.
AtSplitSizeBox | Coordinates are in a splits resizing box.
AtRowSelect | Coordinates are in a row selector.
AtRowSize | Coordinates are in a row resizing box.
AtColumnHeader | Coordinates are in a column’s header.
AtColumnFooter | Coordinates are in a column’s footer.
AtColumnSize | Coordinates are in a column’s resizing box.
AtDataArea | Coordinates are in the list’s data area.
AtGroupArea | Coordinates are in the list’s GroupBy area.
AtGroupHeader | Coordinates are in the list’s GroupBy header.

Remarks

The PointAt method returns one of the constants in the preceding list, which indicates the kind of list element beneath the specified coordinate pair.

This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a list element.

Note

You must convert the x and y arguments to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ReBind Method (C1Combo)

ReBind Method (C1Combo)

Re-establishes the connection with the bound data source.

Syntax

[VB]

Public Sub Rebind()

[C#]

public void Rebind ( )

[Delphi]

procedure Rebind;

Remarks

This method re-establishes the connection with the bound data source, causing the control to perform the same operations that occur when you set the DataSource property at design time.

If you have not modified the list columns at design time, then executing the ReBind method will reset the columns, headings, and other properties based on the current data source.

However, if you have altered the columns in any way at design time (even if you leave the DataMember properties blank), then the list will assume that you wish to maintain the modified list layout and will not automatically reset the columns.

Note

To force the list to reset the column bindings even if the columns were modified at design time, invoke the ClearFields method immediately before ReBind. Conversely, to cancel the list's automatic layout response and force the list to use the current column/field layout, invoke the HoldFields method immediately before ReBind.

The HoldFields method is especially useful in the unbound modes when you have specified the column layout in code and would like to keep it intact after a ReBind operation.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Refresh Method (C1Combo)

Refresh Method (C1Combo)

Discards all data and repopulates all cells from a data source.

Syntax

[VB]

Public Overridable Sub Refresh()

[C#]

public virtual void Refresh ( )

[Delphi]

procedure Refresh;

Remarks

The Refresh method repaints the entire list. You can use this method to force the list to be repainted and hence cause the appropriate events to fire.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RemoveHorizontalSplit Method (C1Combo)

RemoveHorizontalSplit Method (C1Combo)

Removes a horizontal split at the specified index.

Syntax

[VB]

Public Sub RemoveHorizontalSplit(ByVal idx As Integer)

[C#]

public void RemoveHorizontalSplit ( System.Int32 idx )

[Delphi]

procedure RemoveHorizontalSplit(idx: Integer);

Parameter | Description
idx | A zero-based integer that identifies the position of the split to be removed.

Remarks

By default the list has one horizontal split.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RemoveItem Method (C1Combo)

RemoveItem Method (C1Combo)

Remove the item at the given position in the AddItem mode.

Syntax

[VB]

Public Sub RemoveItem(ByVal index As Integer)

[C#]

public void RemoveItem ( System.Int32 index )

[Delphi]

procedure RemoveItem(index: Integer);

Example

Remove the second row:

· Visual Basic

· C#

· Delphi

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RemoveVerticalSplit Method (C1Combo)

RemoveVerticalSplit Method (C1Combo)

Removes a vertical split at the specified index.

Syntax

[VB]

Public Sub RemoveVerticalSplit(ByVal idx As Integer)

[C#]

public void RemoveVerticalSplit ( System.Int32 idx )

[Delphi]

procedure RemoveVerticalSplit(idx: Integer);

Parameter | Description
idx | A zero-based integer that identifies the position of the split to be removed.

Remarks

By default the list has one vertical split.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ResumeBinding Method (C1Combo)

ResumeBinding Method (C1Combo)

Resumes data binding notification from the datasource.

Syntax

[VB]

Public Sub ResumeBinding()

[C#]

object.ResumeBinding ()

[Delphi]

procedure ResumeBinding;

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowContaining Method (C1Combo)

RowContaining Method (C1Combo)

Returns the zero-based index of the display row containing the specified coordinate.

Syntax

[VB]

Public Function RowContaining(ByVal y As Integer) As Integer

[C#]

public System.Int32 RowContaining ( System.Int32 y )

[Delphi]

procedure RowContaining(y: Integer): Integer;

Parameter | Description
y | A single that defines a vertical coordinate (Y value) in pixels.

Return Value

An integer corresponding to the display row beneath the specified Y coordinate.

Remarks

The RowContaining method returns the zero-based index of the display row containing the specified coordinate. This value ranges from 0 to VisibleRows - 1.

If y is outside of the list's data area, this method returns -1.

Note

You must convert the y argument to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowTop Method (C1Combo)

RowTop Method (C1Combo)

Returns the Y coordinate of the top of a visible row.

Syntax

[VB]

Public Function RowTop(ByVal y As Integer) As Integer

[C#]

public System.Int32 RowTop ( System.Int32 y )

[Delphi]

procedure RowTop (y: Integer): Integer;

Parameter | Description
y | An integer denoting a displayed row.

Return Value

A single corresponding to the Y position of the specified display row, based on the coordinate system of the list's container.

Remarks

The RowTop method returns the Y coordinate of the top of a visible row relative to the top of the list, as given by the list's Top property.

When the RowTop method is in invalid range, the returned value is zero.

Use the RowTop method in conjunction with ItemHeight, Left, and Width to determine the size and placement of controls displayed on top of a list cell.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollCtl Method (C1Combo)

ScrollCtl Method (C1Combo)

Scrolls the list horizontally and vertically in a single operation.

Syntax

[VB]

Public Sub ScrollCtl(ByVal cols As Integer, ByVal rows As Integer)

[C#]

public void ScrollCtl ( System.Int32 cols , System.Int32 rows )

[Delphi]

procedure ScrollCtl(cols: Integer; rows: Integer): Integer;

Parameter | Description
cols | A long integer denoting the number of columns to scroll and the direction in which to scroll them.
rows | A long integer denoting the number of rows to scroll and the direction in which to scroll them.

Remarks

Positive offsets scroll right and down. Negative offsets scroll left and up. Column offsets that are out of range cause a trappable error. Row offsets that are out of range scroll to the beginning or end of the database.

The same effect can be achieved by setting the LeftCol and TopIndex properties, but these must be set independently.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Select Method

Select Method

Selects specified text in a combo box’s text box.

Syntax

[VB]

Public Sub Select(ByVal start As Integer, ByVal length As Integer)

[C#]

public void Select ( System.Int32 start , System.Int32 length )

[Delphi]

procedure Select(start: Integer; length: Integer);

Parameter | Description
start | An integer denoting the starting point of a selection.
length | An integer denoting the length of a selection.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectAll Method

SelectAll Method

Selects all of the text in a combo box’s text box.

Syntax

[VB]

Public Sub SelectAll()

[C#]

public void SelectAll ( )

[Delphi]

procedure SelectAll;

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SetAddItemData Method (C1Combo)

SetAddItemData Method (C1Combo)

Updates the cell data from the AddItem mode.

Syntax

[VB]

Public Sub SetAddItemData(ByVal row As Integer, ByVal col As Integer, ByVal data As String)

[C#]

public void SetAddItemData ( System.Int32 row , System.Int32 col , System.String data )

[Delphi]

procedure SetAddItemData(row: Integer; col: Integer; data: string);

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Sort Method (C1Combo)

Sort Method (C1Combo)

Sort a specified column for the control.

Syntax

[VB]

Public Sub Sort(ByVal col As Integer, ByVal dir As C1.Win.C1List.SortDirEnum)

Public Sub Sort(ByVal colName As String, ByVal dir As C1.Win.C1List.SortDirEnum)

[C#]

public void Sort ( System.Int32 col , C1.Win.C1List.SortDirEnum dir )

public void Sort ( System.String colName , C1.Win.C1List.SortDirEnum dir )

[Delphi]

procedure Sort(col: Integer, dir: C1.Win.C1List.SortDirEnum);

procedure Sort(colName: String, dir: C1.Win.C1List.SortDirEnum);

Remarks

Member Name | Description
col | The column number identifying the column to sort.
colName | The column name identifying the column to sort.
dir | The sort direction.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitContaining Method (C1Combo)

SplitContaining Method (C1Combo)

Returns the Index value of the split containing the specified coordinate pair.

Syntax

[VB]

Public Function SplitContaining(ByVal x As Integer, ByVal y As Integer) As Integer

[C#]

public System.Int32 SplitContaining ( System.Int32 x , System.Int32 y )

[Delphi]

function SplitContaining(x: Integer, y: Integer): Integer;

Parameter | Description
x, y | Singles that define a coordinate pair in pixels.

Return Value

An integer corresponding to the index of the split beneath the specified coordinate pair.

Remarks

The SplitContaining method returns the Index value of the split containing the specified coordinate pair. This value ranges from 0 to Split.Count – 1.

This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a list column.

If either argument is outside of the list's data area, this method returns -1.

Note

You must convert the x and y arguments to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SuspendBinding Method (C1Combo)

SuspendBinding Method (C1Combo)

Temporary suspension of data binding notifications from the datasource.

Syntax

[VB]

Public Sub SuspendBinding()

[C#]

public void SuspendBinding ()

[Delphi]

procedure SuspendBinding;

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Event Reference

AfterSort Event (C1Combo)

BeforeOpen Event

BorderStyleChanged Event

Change Event

Click Event

Close Event

ColFootClick Event (C1Combo)

ColHeadClick Event (C1Combo)

ColMove Event (C1Combo)

ColResize Event (C1Combo)

ComboStyleChanged Event

DataSourceChanged Event (C1Combo)

DisplayMemberChanged Event (C1Combo)

DoubleClick Event

DragDrop Event

DragEnter Event

DragOver Event

DrawItem Event

Error Event (C1Combo)

FetchCellStyle Event (C1Combo)

FetchCellTips Event (C1Combo)

FetchRowStyle Event (C1Combo)

FetchScrollTips Event (C1Combo)

FormatText Event (C1Combo)

ItemChanged Event

KeyDown Event

KeyPress Event

KeyUp Event

LeftColChange Event (C1Combo)

Mismatch Event

MouseDown Event

MouseEnter Event

MouseHover Event

MouseLeave Event

MouseMove Event

MouseUp Event

NotInList Event

Open Event

Paint Event

RowChange Event (C1Combo)

RowResize Event (C1Combo)

Scroll Event

SelChange Event (C1Combo)

SelectedValueChanged Event (C1Combo)

TopIndexChange Event (C1Combo)

UnboundColumnFetch Event (C1Combo)

ValueMemberChanged Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AfterSort Event (C1Combo)

AfterSort Event (C1Combo)

Fires after a column is sorted by clicking the column header.

Syntax

[VB]

Public Event AfterSort(ByVal sender As Object, ByVal e As C1.Win.C1List.FilterEventArgs) As C1.Win.C1List.FilterEventHandler

[C#]

public event C1.Win.C1List.FilterEventHandler AfterSort

[Delphi]

property AfterSort: FilterEventHandler;

Event Data

The event handler receives an argument of type FilterEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Condition | The condition that can be used to sort or filter the data source.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeOpen Event

BeforeOpen Event

Fires before the list is dropped down.

Syntax

[VB]

Public Event BeforeOpen(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) As System.ComponentModel.CancelEventHandler

[C#]

public event System.ComponentModel.CancelEventHandler BeforeOpen

[Delphi]

property BeforeOpen: System.ComponentModel.CancelEventHandler;

Event Data

The event handler receives an argument of type CancelEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Cancel | A boolean that may be set to True to undo the drop down.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BorderStyleChanged Event

BorderStyleChanged Event

Fires when the user changes the BorderStyle property.

Syntax

[VB]

Public Event BorderStyleChanged (sender As Object, e As EventArgs) As EventHandler

[C#]

public event System.EventHandler BorderStyleChanged

[Delphi]

property BorderStyleChanged: EventHandler;

Event Data

No arguments

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Change Event

Change Event

Fires when the text is changed by selecting, typing or setting the Text property.

Syntax

[VB]

Public Event Change(sender As Object, e As EventArgs) As ChangeEventHandler

[C#]

public event C1.Win.C1List.ChangeEventHandler Change

[Delphi]

property Change: ChangeEventHandler;

Event Data

No arguments

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Click Event

Click Event

Fires when the user clicks inside the list.

Syntax

[VB]

Public Event Click As EventHandler

[C#]

public event System.EventHandler Click

[Delphi]

property Click: EventHandler;

Event Data

No arguments

Remarks

Clicking a control also generates MouseDown and MouseUp events in addition to the Click event. The order of events for the C1Combo controls is MouseDown, MouseUp, and Click.

When the user clicks a noncurrent row, the Click event fires before the control attempts to reposition to the row that was clicked. If the attempt succeeds, the control then fires the RowChange event. For this reason, you should not use the Click event to perform operations that depend upon the current row.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Close Event

Close Event

Fires when the user closes the list portion of the control by clicking the dropdown button or by pressing ALT + Down Arrow while the control is open.

Syntax

[VB]

Public Event Close(ByVal sender As Object, ByVal e As System.EventArgs) As C1.Win.C1List.CloseEventHandler

[C#]

public event C1.Win.C1List.CloseEventHandler Close

[Delphi]

property Close: CloseEventHandler;

Event Data

No arguments

Remarks

This event is fired only when ComboStyle property is set to DropdownCombo or DropdownList.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColFootClick Event (C1Combo)

ColFootClick Event (C1Combo)

Fires when the footer of the control is clicked.

Syntax

[VB]

Public Event ColFootClick(ByVal sender As Object, ByVal e As C1.Win.C1List.ColEventArgs) Handles ColEventHandler

[C#]

public event C1.Win.C1List.ColEventHandler ColFootClick

[Delphi]

property ColFootClick: ColEventHandler;

Event Data

The event handler receives an argument of type ColEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
ColIndex | The current column index.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColHeadClick Event (C1Combo)

ColHeadClick Event (C1Combo)

Fires when the headers of the control is clicked.

Syntax

[VB]

Public Event ColHeadClick(ByVal sender As Object, ByVal e As C1.Win.C1List.ColEventArgs) As ColEventHandler

[C#]

public event C1.Win.C1List.ColEventHandler ColHeadClick

[Delphi]

property ColHeadClick: ColEventHandler;

Event Data

The event handler receives an argument of type ColEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
ColIndex | The current column index.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMove Event (C1Combo)

ColMove Event (C1Combo)

Fires when the user has finished moving the selected columns.

Syntax

[VB]

Public Event ColMove(sender As Object, e As ColMoveEventArgs) As ColMoveEventHandler

[C#]

public event C1.Win.C1List.ColMoveEventHandler ColMove

[Delphi]

property ColMove: ColMoveEventHandler;

Event Data

The event handler receives an argument of type ColMoveEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Cancel | A boolean that may be set to True to prohibit movement.
ColIndex | An integer that identifies the column being moved. This is the absolute index.
Position | An integer that specifies the target location of the selected columns.

Remarks

Your event procedure can either accept the movement or cancel it altogether.

The Position argument ranges from 0, which denotes the left edge, to the total number of columns, which denotes the right edge.

If you set the Cancel argument to True, no movement occurs. Selected columns always remain selected, regardless of the Cancel setting.

Note

This event is only fired when the user moves the selected columns to a new location.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResize Event (C1Combo)

ColResize Event (C1Combo)

Fires after the user has finished resizing a column.

Syntax

[VB]

Public Event ColResize(sender As Object, e As ColResizeEventArgs) As ColResizeEventHandler

[C#]

public event C1.Win.C1List.ColResizeEventHandler ColResize

[Delphi]

property ColResize: ColResizeEventHandler;

Event Data

The event handler receives an argument of type ColResizeEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
ColIndex | An integer that identifies the column that was resized.
Cancel | A boolean that may be set to True to undo resizing.

Remarks

The ColResize event occurs after the user has finished resizing a column, but before columns to the right are repositioned. Your event procedure can accept the change, alter the degree of change, or cancel the change completely.

If you set the Cancel argument to True, the previous column width is restored and no repainting occurs. To alter the degree of change, set the Width property of the C1DataColumn object specified by the ColIndex argument to the desired value.

It is not necessary to execute the Refresh method within this event procedure. Doing so causes the list to be repainted even if the Cancel argument is True.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ComboStyleChanged Event

ComboStyleChanged Event

Fires when the user changes the ComboStyle property.

Syntax

[VB]

Public Event ComboStyleChange(sender As Object, e As EventArgs) As EventHandler

[C#]

public event System.EventHandler ComboStyleChanged

[Delphi]

property ComboStyleChanged: EventHandler;

Event Data

No arguments

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataSourceChanged Event (C1Combo)

DataSourceChanged Event (C1Combo)

Fires when a bound data source is changed or requeried.

Syntax

[VB]

Public Event DataSourceChanged(sender As Object, e As EventArgs) As EventHandler

[C#]

public event System.EventHandler DataSourceChanged

[Delphi]

property DataSourceChanged: EventHandler;

Event Data

No arguments

Remarks

This event also fires when a bound list control is first loaded.

The DataSourceChanged event fires before the list is filled with data. Therefore, you can use this event to initialize the list according to information obtained from the data source, if necessary.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DisplayMemberChanged Event (C1Combo)

DisplayMemberChanged Event (C1Combo)

Occurs when the DisplayMember property changes.

Syntax

[VB]

Public Event DisplayMemberChanged(sender As Object, e As EventArgs) As EventHandler

[C#]

public event System.EventHandler DisplayMemberChanged

[Delphi]

property DisplayMemberChanged: EventHandler;

Event Data

The event handler receives an argument of type EventArgs containing data related to this event.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DoubleClick Event

DoubleClick Event

Fires when the user presses then releases a mouse button twice in rapid succession over the control.

Syntax

[VB]

Public Event DoubleClick As EventHandler

[C#]

public event System.EventHandler DoubleClick

[Delphi]

property DoubleClick: EventHandler;

Event Data

No arguments

Remarks

Double-clicking a control also generates MouseDown, MouseUp, and Click events in addition to the DoubleClick event. The order of events for the control is MouseDown, MouseUp, Click, DoubleClick, and MouseUp.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DragDrop Event

DragDrop Event

Fires when a C1Combo control is the target component of a drag/drop operation and its DropMode is set to 1 - Manual.Syntax.

Syntax

[VB]

Public Event DragDrop As DragEventHandler

[C#]

public event System.DragEventHandler DragDrop

[Delphi]

property DragDrop: DragEventHandler;

Event Data

The event handler receives an argument of type DragEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
AllowedEffect | Gets which drag-and-drop operations are allowed by the originator (or source) of the drag event.
Data | Gets the IDataObject that contains the data associated with this event.
Effect | Gets or sets which drag-and-drop operations are allowed by the target of the drag event.
KeyState | Gets the current state of the CTRL, SHIFT and ALT keys, as well as the state of the mouse buttons.
X | Gets the x-coordinate of the mouse pointer.
Y | Gets the y-coordinate of the mouse pointer.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DragEnter Event

DragEnter Event

Occurs when an object is dragged into the control's bounds DragMode is set to 1 – Manual.

Syntax

[VB]

Public Event DragEnter As DragEventHandler

[C#]

public event System.DragEventHandler DragEnter

[Delphi]

property DragEnter: DragEventHandler;

Event Data

The event handler receives an argument of type DragEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
AllowedEffect | Gets which drag-and-drop operations are allowed by the originator (or source) of the drag event.
Data | Gets the IDataObject that contains the data associated with this event.
Effect | Gets or sets which drag-and-drop operations are allowed by the target of the drag event.
KeyState | Gets the current state of the CTRL, SHIFT and ALT keys, as well as the state of the mouse buttons.
X | Gets the x-coordinate of the mouse pointer.
Y | Gets the y-coordinate of the mouse pointer.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DragOver Event

DragOver Event

Fires when a combo control is the target component of a drag/drop operation and its DragMode is set to Manual.

Syntax

[VB]

Public Event DragOver As DragEventHandler

[C#]

public event System.DragEventHandler DragOver

[Delphi]

property DragOver: DragEventHandler;

Event Data

The event handler receives an argument of type DragEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
AllowedEffect | Gets which drag-and-drop operations are allowed by the originator (or source) of the drag event.
Data | Gets the IDataObject that contains the data associated with this event.
Effect | Gets or sets which drag-and-drop operations are allowed by the target of the drag event.
KeyState | Gets the current state of the CTRL, SHIFT and ALT keys, as well as the state of the mouse buttons.
X | Gets the x-coordinate of the mouse pointer.
Y | Gets the y-coordinate of the mouse pointer.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DrawItem Event

DrawItem Event

Fires when any cell is required to be redrawn and DrawMode is set to Normal.

Syntax

[VB]

Public Event DrawItem(sender As Object, e As OwnerDrawCellEventArgs) As OwnerDrawCellEventHandler

[C#]

public event C1.Win.C1List.OwnerDrawCellEventHandler DrawItem

[Delphi]

property DrawItem: OwnerDrawCellEventHandler;

Event Data

The event handler receives an argument of type OwnerDrawCellEventArgs containing data related to this event. The following properties provide information specific to this event.

Member | Description
CellRect | The cell rectangle that needs drawn.
Row | The row index of the cell that needs drawn.
Split | The split index of the cell that needs drawn.
Col | The column index of the cell that needs drawn.
Graphics | The GDI+ graphics object to render on.
Handled | Boolean which is set to True if event performed OwnerDraw.

Remarks

The DrawItem event handler is used for drawing a cell in the dropdown list. DrawItem is equal to the OwnerDrawCell event in the standard combobox.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Error Event (C1Combo)

Error Event (C1Combo)

Fires when a data access error occurs.

Syntax

[VB]

Public Event Error(sender As Object, e As ErrorEventArgs) As ErrorEventHandler

[C#]

public event C1.Win.C1List.ErrorEventHandler Error

[Delphi]

property Error: ErrorEventHandler;

Event Data

The event handler receives an argument of type ErrorEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Exception | The exception thrown by the operating system.
Handled | Indicates whether the user handled the error.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyle Event (C1Combo)

FetchCellStyle Event (C1Combo)

Fires when the list is about to display cell data in a column whose FetchStyle property is set to True.

Syntax

[VB]

Public Event FetchCellStyle(sender As Object, e As FetchCellStyleEventArgs) As FetchCellStyleEventHandler

[C#]

public event C1.Win.C1List.FetchCellStyleEventHandler FetchCellStyle

[Delphi]

property FetchCellStyle: FetchCellStyleEventHandler;

Event Data

The event handler receives an argument of type FetchCellStyleEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Condition | The sum of one or more CellStyleFlag constants describing the disposition of the cell being displayed.
Split | An integer that identifies the split containing the cell being displayed. This argument is omitted for C1Combo controls.
Row | An integer that identifies the row containing the cell being displayed.
Col | An integer that identifies the column containing the cell being displayed.
CellStyle | A Style object used to override the font and color characteristics of the cell being displayed.

Remarks

By setting one or more properties of the Style object passed in the CellStyle parameter, your application can change the appearance of individual cells.

You can also set the ForegroundImage property of the CellStyle parameter to display distinct bitmaps on a per-cell basis.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTips Event (C1Combo)

FetchCellTips Event (C1Combo)

Fires when the control has focus and the cursor is idle for a small amount of time (defined by the CellTipsDelay property) over a data cell, column header, column footer, split header or control caption bar.

Syntax

[VB]

Public Event FetchCellTips(sender As Object, e As FetchCellTipsEventArgs) As FetchCellTipsEventHandler

[C#]

public event C1.Win.C1List.FetchCellTipsEventHandler FetchCellTips

[Delphi]

property FetchCellTips: FetchCellTipsEventHandler;

Event Data

The event handler receives an argument of type FetchCellTipsEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
SplitIndex | The zero-based index of the split the cursor is over.
ColIndex | An integer that identifies the column the cursor is over. This is either a zero-based column index or a CellTipEnum value.
Row | An integer that identifies the row the cursor is over. This is either a zero-based row index or a CellTipEnum value.
CellTip | Contains the text to be displayed in the popup text box.
FullyDisplayed | A boolean that is True if the CellTips will fit entirely within the boundaries of the cell.
TipStyle | A Style object used to override the font and color characteristics of the cell tip text.

Remarks

This event will not fire if the cursor is over the scroll bars.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyle Event (C1Combo)

FetchRowStyle Event (C1Combo)

Fires whenever the list is about to display a row of data and the FetchRowStyles property is True for the list or one of its splits.

Syntax

[VB]

Public Event FetchRowStyle(sender As Object, e As FetchRowStyleEventArgs) As FetchRowStyleEventHandler

[C#]

public event C1.Win.C1List.FetchRowStyleEventHandler FetchRowStyle

[Delphi]

property FetchRowStyle: FetchRowStyleEventHandler;

Event Data

The event handler receives an argument of type FetchRowStyleEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Split | The zero-based index of the split for which formatting information is being requested. This argument is omitted for C1Combo controls.
Row | An integer that uniquely identifies the row to be displayed.
CellStyle | A Style object used to convey font and color information to the list.

Remarks

Use the FetchRowStyle event to control formatting on a per-row basis, as it is much more efficient than coding the FetchCellStyle event to apply the same formatting to all columns.

Note

A common application of row-based formatting is to present rows in alternating colors to enhance their readability. Although you could use the FetchRowStyle event to achieve this effect, the AlternatingRows property is easier to use, as it requires no coding.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTips Event (C1Combo)

FetchScrollTips Event (C1Combo)

Fires whenever the combo box has focus and the scrollbar thumb is moved using the mouse.

Syntax

[VB]

Public Event FetchScrollTips As FetchScrollTipsEventHandler

[C#]

public event C1.Win.C1List.FetchScrollTipsEventHandler FetchScrollTips

[Delphi]

property FetchScrollTips: FetchScrollTipsEventHandler;

Event Data

The event handler receives an argument of type FetchScrollTipsEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
SplitIndex | The zero-based index of the split that the scrollbar is associated with. This argument is omitted for C1Combo controls.
Row | An integer that uniquely identifies the topmost list row.
ScrollBar | A ScrollBarEnum constant that identifies the scrollbar that was moved.
ScrollTip | The text to be displayed in the pop-up text box.
TipStyle | A Style object used to override the font and color characteristics of the scroll tip text.

Remarks

If the ScrollTips property is True, the FetchScrollTips event will be fired whenever the combo box has focus and the scrollbar thumb is moved using the mouse.

By setting the properties of the TipStyle object, you can control the background color, text color, and font of the pop-up text box. By default, the TipStyle object uses the system ToolTip colors and the font attributes of the current split.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatText Event (C1Combo)

FormatText Event (C1Combo)

Fires when the list is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.

Syntax

[VB]

Public Event FormatText(sender As Object, e As FormatTextEventArgs) As FormatTextEventHandler

[C#]

public event C1.Win.C1List.FormatTextEventHandler FormatText

[Delphi]

property FormatText: FormatTextEventHandler;

Event Data

The event handler receives an argument of type FormatTextEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
ColIndex | An integer that identifies the column being displayed.
Value | An string containing the underlying data value.
Row | An integer that uniquely identifies the row from which the underlying data value was obtained.

Remarks

The Value argument contains the underlying data value and also serves as a placeholder for the formatted data to be displayed.

This event allows you to provide your own text formatting for cases where Visual Basic's intrinsic formatting is either unavailable or does not suit your needs.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ItemChanged Event

ItemChanged Event

Fires when the contents of the text box portion of a combo box and the current row in the list portion change simultaneously.

Syntax

[VB]

Public Event ItemChanged(sender As Object, e As EventArgs) As EventHandler

[C#]

public event System.EventHandler ItemChanged

[Delphi]

property ItemChanged: EventHandler;

Event Data

No arguments

Remarks

This event is triggered under several circumstances:

· When the user selects a different item from the list portion.

· When the user enters characters into the text portion that result in an incremental match.

· When the user changes the current record position by interacting with a bound data control.

· When the current record position or DataMember value is changed in code.

Typically, you attach an ItemChanged event procedure to a combo control to carry out commands and command-like actions.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


KeyDown Event

KeyDown Event

Fires when the user presses a key.

Syntax

[VB]

Public Event KeyDown As KeyEventHandler

[C#]

public event System.KeyEventHandler KeyDown

[Delphi]

property KeyDown: KeyEventHandler;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
Handled | Gets a value indicating whether the event was handled.
KeyCode | Gets the keyboard code for a KeyDown or KeyUp event.
KeyData | Gets the key data for a KeyDown or KeyUp event.
KeyValue | Gets the keyboard value for a KeyDown or KeyUp event.
Modifiers | Gets the modifier flags for a KeyDown or KeyUp event. This indicates which combination of modifier keys (CTRL, SHIFT and ALT) were pressed.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Remarks

Although these events are fired for most keystrokes, they are most often used for:

· Extended character keys such as function keys.

· Navigation keys.

· Combinations of keys with standard keyboard modifiers.

· Distinguishing between the numeric keypad and regular number keys.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


KeyPress Event

KeyPress Event

Fires when the user presses and releases one of the following kinds of keys:

· A printable keyboard character.

· The Ctrl key combined with an alphabetic or special character.

· The Enter or Backspace key.

Syntax

[VB]

Public Event KeyPress As KeyPressEventHandler

[C#]

public event System.KeyPressEventHandler KeyPress

[Delphi]

property KeyPress: KeyPressEventHandler;

Event Data

The event handler receives an argument of type KeyPressEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Handled | Gets a value indicating whether the event was handled.
KeyChar | Gets the character corresponding to the key pressed.

Remarks

Use the KeyPress event to test keystrokes for validity or to format characters as they are typed.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


KeyUp Event

KeyUp Event

Fires when the user releases a key.

Syntax

[VB]

Public Event KeyUp As KeyEventHandler

[C#]

public event System.KeyEventHandler KeyUp

[Delphi]

property KeyUp: KeyEventHandler;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
Handled | Gets a value indicating whether the event was handled.
KeyCode | Gets the keyboard code for a KeyDown or KeyUp event.
KeyData | Gets the key data for a KeyDown or KeyUp event.
KeyValue | Gets the keyboard value for a KeyDown or KeyUp event.
Modifiers | Gets the modifier flags for a KeyDown or KeyUp event. This indicates which combination of modifier keys (CTRL, SHIFT and ALT) were pressed.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Remarks

Although these events are fired for most keystrokes, they are most often used for:

· Extended character keys such as function keys.

· Navigation keys.

· Combinations of keys with standard keyboard modifiers.

· Distinguishing between the numeric keypad and regular number keys.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


LeftColChange Event (C1Combo)

LeftColChange Event (C1Combo)

Fires when the first visible column of a list or split is changed.

Syntax

[VB]

Public Event LeftColChange(sender As Object, e As SplitEventArgs) As SplitEventHandler

[C#]

public event C1.Win.C1List.SplitEventHandler LeftColChange

[Delphi]

property LeftColChange: SplitEventHandler;

Event Data

The event handler receives an argument of type SplitEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
SplitIndex | The zero-based index of the split in which the column change occurred. This argument is omitted for C1Combo controls.

Remarks

This event is triggered under several circumstances:

· When the list is first displayed.

· When the user scrolls through the list with the horizontal scroll bar or navigation keys.

· When the LeftCol property is changed in code to a different value.

· When the Visible property of the current left column is set to False.

· When the Width property of the current left column is set to 0.

· When the user resizes the current left column so that it is no longer visible.

· When the user moves the current left column or moves another column into its place.

When multiple cell change events are sent, the order will be TopIndexChange, LeftColChange, and RowChange.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Mismatch Event

Mismatch Event

Fires when the user enters a value in the text portion of a combo box that is not found in the list portion.

Syntax

[VB]

Public Event Mismatch(sender As Object, e As MismatchEventArgs) As MismatchEventHandler

[C#]

public event C1.Win.C1List.MismatchEventHandler Mismatch

[Delphi]

property Mismatch: MismatchEventHandler;

Event Data

The event handler receives an argument of type MismatchEventArgs containing data related to this event. The following properties provide information specific to this event.

Member | Description
Reposition | Boolean variable that may be set to False in order to prevent the current row from moving back to the top of the list when a mismatch has been typed.
NewEntry | String representing the text that was entered by the user but not found in the list.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MouseDown Event

MouseDown Event

Use a MouseDown or MouseUp event procedure to specify actions that will occur when a given mouse button is pressed or released.

Syntax

[VB]

Public Event MouseDown As MouseEventHandler

[C#]

public event System.Windows.Forms.MouseEventHandler MouseDown

[Delphi]

property MouseDown: MouseEventHandler;

Event Data

The event handler receives an argument of type MouseEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Button | Gets which mouse button was pressed.
Clicks | Gets the number of times the mouse button was pressed and released.
Delta | Gets a signed count of the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel.
X | Gets the x-coordinate of a mouse click.
Y | Gets the y-coordinate of a mouse click.

Remarks

Unlike the Click and DoubleClick events, MouseDown and MouseUp events enable you to distinguish between the left, right, and middle mouse buttons. You can also write code for mouse/keyboard combinations that use the Shift, Ctrl, and Alt keyboard modifiers.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MouseEnter Event

MouseEnter Event

Fires when the mouse pointer enters the control.

Syntax

[VB]

Public Event MouseEnter As EventHandler

[C#]

public event System.EventHandler MouseEnter

[Delphi]

property MouseEnter: System.EventHandler;

Event Data

No arguments

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MouseHover Event

MouseHover Event

Occurs when the mouse pointer hovers over the control.

Syntax

[VB]

Public Event MouseHover As EventHandler

[C#]

public event System.EventHandler MouseHover

[Delphi]

property MouseHover: System.EventHandler;

Event Data

No arguments

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MouseLeave Event

MouseLeave Event

Occurs when the mouse pointer leaves the control.

Syntax

[VB]

Public Event MouseLeave As EventHandler

[C#]

public event System.EventHandler MouseLeave

[Delphi]

property MouseLeave: System.EventHandler;

Event Data

No arguments

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MouseMove Event

MouseMove Event

The MouseMove event is generated continually as the mouse pointer moves across the control. This event is primarily useful for implementing drag-and-drop behavior on a per-column basis.

Syntax

[VB]

Public Event MouseMove As MouseEventHandler

[C#]

public event System.Windows.Forms.MouseEventHandler MouseMove

[Delphi]

property MouseMove: System.Windows.Forms.EventHandler;

Event Data

The event handler receives an argument of type MouseEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Button | Gets which mouse button was pressed.
Clicks | Gets the number of times the mouse button was pressed and released.
Delta | Gets a signed count of the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel.
X | Gets the x-coordinate of a mouse click.
Y | Gets the y-coordinate of a mouse click.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MouseUp Event

MouseUp Event

Use a MouseDown or MouseUp event procedure to specify actions that will occur when a given mouse button is pressed or released.

Syntax

[VB]

Public Event MouseUp As MouseEventHandler

[C#]

public event System.Windows.Forms.MouseEventHandler MouseUp

[Delphi]

property MouseUp: MouseEventHandler;

Event Data

The event handler receives an argument of type MouseEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Button | Gets which mouse button was pressed.
Clicks | Gets the number of times the mouse button was pressed and released.
Delta | Gets a signed count of the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel.
X | Gets the x-coordinate of a mouse click.
Y | Gets the y-coordinate of a mouse click.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


NotInList Event

NotInList Event

Fires when the user enters a value in the text portion of a combo box that is not found in the list portion.

Syntax

[VB]

Public Event NotInList As NotInListEventHandler

[C#]

public event C1.Win.C1List.NotInListEventHandler NotInList

[Delphi]

property NotInList: NotInListEventHandler;

Event Data

The event handler receives an argument of type NotInListEventArgs containing data related to this event. The following properties provide information specific to this event.

Member | Description
NewEntry | String representing the text that was entered by the user but not found in the list.
Retry | Boolean variable that may be set to True in order to force the control to requery the list for the new entry.

Remarks

This event can be fired when the LimitToList property is True or False (previously LimitToList had to be set to True) and the user presses the Enter key while the list portion of the combo is closed.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Open Event

Open Event

Fires when the user opens the list portion of the control by clicking the dropdown button or by pressing Alt + Down Arrow while the control is closed.

Syntax

[VB]

Public Event Open(sender As Object, e As EventArgs) As OpenEventHandler

[C#]

public event C1.Win.C1List.OpenEventHandler Open ()

[Delphi]

property Open: NotInListEventHandler;

Event Data

No arguments.

Note

This event is fired only when ComboStyle property is set to 0 - Dropdown Combo or 2 - DropdownList.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Paint Event

Paint Event

Fires when the control repaints itself (that is, whenever it receives a WM_PAINT message).

Syntax

[VB]

Public Event Paint As PaintEventHandler

[C#]

public event C1.Win.C1List.PaintEventHandler Paint

[Delphi]

property Paint: PaintEventHandler;

Event Data

The event handler receives an argument of type PaintEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
ClipRectangle | Indicates the rectangle in which to paint.
Graphics | Indicates the Graphics object used to paint.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowChange Event (C1Combo)

RowChange Event (C1Combo)

Fires when the user changes a row in the dropdown.

Syntax

[VB]

Public Event RowChange As EventHandler

[C#]

public event System.EventHandler RowChange

[Delphi]

property RowChange: EventHandler;

Event Data

No arguments

Remarks

This event is triggered under several circumstances:

· When a dropdown is first displayed.

· When the user moves the current row by clicking on another row or using the navigation keys.

· During incremental searching.

The current row position is provided by the Bookmark property.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowResize Event (C1Combo)

RowResize Event (C1Combo)

Fires when the user has finished resizing a list row.

Syntax

[VB]

Public Event RowResize As CancelEventHandler

[C#]

public event System.ComponentModel.CancelEventHandler RowResize

[Delphi]

property RowResize: CancelEventHandler;

Event Data

The event handler receives an argument of type CancelEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Cancel | A boolean that may be set to True to undo resizing.

Remarks

Your event procedure can accept the change, alter the degree of change, or cancel the change completely.

The C1Combo control's ItemHeight property determines the height of all rows in the control.

If you set the Cancel argument to True, the previous row height is restored and no repainting occurs. To alter the degree of change, set the ItemHeight property to the desired value.

It is not necessary to execute the Refresh method within this event procedure. Doing so causes the list to be repainted even if the Cancel argument is True.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Scroll Event

Scroll Event

Fires when the user scrolls the control horizontally or vertically using the scroll bars.

Syntax

[VB]

Public Event Scroll As CancelEventHandler

[C#]

public event System.ComponentModel.CancelEventHandler Scroll

[Delphi]

property Scroll: CancelEventHandler;

Event Data

The event handler receives an argument of type CancelEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Cancel | A boolean that may be set to True to undo resizing.

See Also

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelChange Event (C1Combo)

SelChange Event (C1Combo)

Fires when the user selects a different range of rows or columns.

Syntax

[VB]

Public Event SelChange As CancelEventHandler

[C#]

public event System.ComponentModel.CancelEventHandler SelChange

[Delphi]

property SelChange: CancelEventHandler;

Event Data

The event handler receives an argument of type CancelEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Cancel | A boolean that may be set to True to undo the new selection.

Remarks

This event is triggered under several circumstances:

· When the user selects a single row by clicking its record selector.

· When the user adds a row to the list of selected rows by clicking its record selector while holding down the Ctrl key.

· When the user selects a single column by clicking its header.

· When the user changes the range of selected columns by dragging to an adjacent column within the header row.

· When the user extends the range of selected columns by holding down the Shift key and clicking an unselected column header.

· When the user clears the current row or column selection by clicking an individual cell, in which case this event precedes RowChange.

The current range of selected columns is provided by the SelectedCols property. The bookmarks of the selected rows are available in the SelectedRowCollection. Within this event procedure, these properties and collections reflect the user's pending selection(s).

If your event procedure sets the Cancel argument to True, the previous row and column selections (if any) are restored, and the aforementioned properties revert to their previous values.

This event is only triggered by user interaction with the list. It cannot be triggered by code.

Note

When the user selects a column, any row selections are cleared. Similarly, when the user selects a row, any column selections are cleared.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedValueChanged Event (C1Combo)

SelectedValueChanged Event (C1Combo)

Occurs when the SelectedValue property changes.

Syntax

[VB]

Public Event SelectedValueChanged As EventHandler

[C#]

public event System.EventHandler SelectedValueChanged

[Delphi]

property SelectedValueChanged: EventHandler;

Event Data

The event handler receives an argument of type EventArgs containing data related to this event.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


TopIndexChange Event (C1Combo)

TopIndexChange Event (C1Combo)

Fires when the first displayed row of a control or split is changed.

Syntax

[VB]

Public Event TopIndexChange As SplitEventHandler

[C#]

public event C1.Win.C1List.SplitEventHandler TopIndexChange

[Delphi]

property TopIndexChange: SplitEventHandler;

Event Data

No arguments

Remarks

This event is triggered under several circumstances:

· When the list is first displayed.

· When the user scrolls through the list with the vertical scroll bar or navigation keys.

· When data in the list is changed in a way that implicitly affects the first row, such as when the first displayed record is deleted.

· When the TopIndex property is changed in code to a different value.

When multiple cell change events are sent, the order will be TopIndexChange, LeftColChange, and RowChange.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetch Event (C1Combo)

UnboundColumnFetch Event (C1Combo)

Fires when a bound needs to display the value of a cell in an unbound column.

Syntax

[VB]

Public Event UnboundColumnFetch As UnboundColumnFetchEventHandler

[C#]

public event C1.Win.C1List.UnboundColumnFetchEventHandler UnboundColumnFetch

[Delphi]

property UnboundColumnFetch: UnboundColumnFetchEventHandler;

Event Data

The event handler receives an argument of type UnboundColumnFetchEventArgs containing data related to this event. The following properties provide information specific to this event.

Argument | Description
Row | An integer that that identifies the row being requested.
Col | An integer that identifies the column being requested.
Value | A String used to transfer unbound column data to the list.

Remarks

The UnboundColumnFetch event is fired when a bound needs to display the value of a cell in an unbound column as specified by the Row and Col arguments. For a bound list, any column with an empty DataMember property and a non-empty Caption property is considered an unbound column.

To return an unbound value to the list, simply set the Value argument to the desired result. If you do not assign a value, the cell will remain blank.

Use this event to implement calculated fields based on other columns or to display local data alongside remote bound data.

Your application is responsible for storing data entered into an unbound column by the user. If an unbound column is used to display a calculated result based on other columns, then you do not need to store the unbound values since they can always be calculated "on the fly" using either the C1DataColumn object's Text property or data access objects.

Note

During the execution of this event, row movement is not permitted.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueMemberChanged Event (C1Combo)

ValueMemberChanged Event (C1Combo)

Occurs when the ValueMember property changes.

Syntax

[VB]

Public Event ValueMemberChanged As EventHandler

[C#]

public event System.EventHandler ValueMemberChanged

[Delphi]

property ValueMemberChanged: EventHandler;

Event Data

The event handler receives an argument of type EventArgs containing data related to this event.

See Also

C1List Object

C1Combo Object

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Event Handler Reference

CancelEventHandler Delegate

ChangeEventHandler Delegate

CloseEventHandler Delegate

ColEventHandler Delegate (C1Combo)

ColMoveEventHandler Delegate (C1Combo)

ColResizeEventHandler Delegate (C1Combo)

DragEventHandler Delegate

ErrorEventHandler Delegate (C1Combo)

EventHandler Delegate (C1Combo)

FetchCellStyleEventHandler Delegate (C1Combo)

FetchCellTipsEventHandler Delegate (C1Combo)

FetchRowStyleEventHandler Delegate (C1Combo)

FilterEventHandler Delegate (C1Combo)

FormatTextEventHandler Delegate (C1Combo)

KeyEventHandler Delegate

KeyPressEventHandler Delegate

MismatchEventHandler Delegate

MouseEventHandler Delegate

NotInListEventHandler Delegate

OpenEventHandler Delegate

OwnerDrawCellEventHandler Delegate (C1Combo)

PaintEventHandler Delegate

SplitEventHandler Delegate (C1Combo)

UnboundColumnFetchEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CancelEventHandler Delegate

CancelEventHandler Delegate

Syntax

[VB]

Public Delegate Sub CancelEventHandler (object sender, CancelEventArgs e)

[C#]

public sealed delegate CancelEventHandler : System.MulticastDelegate

[Delphi]

type CancelEventHandler = procedure(sender: System.Object; e: CancelEventArgs:C1Combo) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A CancelEventArgs object that contains the event data.

See Also

RowResize Event (C1Combo)

SelChange Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ChangeEventHandler Delegate

ChangeEventHandler Delegate

Syntax

[VB]

Public Delegate Sub ChangeEventHandler (object sender, System.EventArgs e)

[C#]

public sealed delegate ChangeEventHandler : System.MulticastDelegate

[Delphi]

type ChangeEventHandler = procedure(sender: System.Object; e: System.EventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A System.EventArgs object that contains the event data.

See Also

Change Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CloseEventHandler Delegate

CloseEventHandler Delegate

Syntax

[VB]

Public Delegate Sub CloseEventHandler (object sender, System.EventArgs e)

[C#]

public sealed delegate CloseEventHandler : System.MulticastDelegate

[Delphi]

type CloseEventHandler = procedure(sender: System.Object; e: System.EventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A System.EventArgs object that contains the event data.

See Also

Close Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColEventHandler Delegate (C1Combo)

ColEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub ColEventHandler (object sender, ColEventArgs e)

[C#]

public sealed delegate ColEventHandler : System.MulticastDelegate

[Delphi]

type ColEventHandler = procedure(sender: System.Object; e: ColEventArgs:C1Combo) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A ColEventArgs object that contains the event data.

See Also

ColFootClick Event (C1Combo)

ColHeadClick Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventHandler Delegate (C1Combo)

ColMoveEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub ColMoveEventHandler (object sender, ColMoveEventArgs e)

[C#]

public sealed delegate ColMoveEventHandler : System.MulticastDelegate

[Delphi]

type ColMoveEventHandler = procedure(sender: System.Object; e: ColMoveEventArgs:C1Combo) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A ColMoveEventArgs object that contains the event data.

See Also

ColMove Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventHandler Delegate (C1Combo)

ColResizeEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub ColResizeEventHandler (object sender, ColResizeEventArgs e)

[C#]

public sealed delegate ColResizeEventHandler : System.MulticastDelegate

[Delphi]

type ColResizeEventHandler = procedure(sender: System.Object; e: ColResizeEventArgs:C1Combo) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A ColResizeEventArgs object that contains the event data.

See Also

ColResize Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DragEventHandler Delegate

DragEventHandler Delegate

Syntax

[VB]

Public Delegate Sub DragEventHandler (object sender, DragEventArgs e)

[C#]

public sealed delegate DragEventHandler : System.MulticastDelegate

[Delphi]

type DragEventHandler = procedure(sender: System.Object; e: DragEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A DragEventArgs object that contains the event data.

See Also

DragDrop Event

DragEnter Event

DragOver Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ErrorEventHandler Delegate (C1Combo)

ErrorEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub ErrorEventHandler (object sender, ErrorEventArgs e)

[C#]

public sealed delegate ErrorEventHandler : System.MulticastDelegate

[Delphi]

type ErrorEventHandler = procedure(sender: System.Object; e: ErrorEventArgs:C1Combo) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A ErrorEventArgs object that contains the event data.

See Also

Error Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


EventHandler Delegate (C1Combo)

EventHandler Delegate (C1Combo)

See Also

See Microsoft .NET Documentation.

See Also

BorderStyleChanged Event

Change Event

Click Event

ComboStyleChanged Event

DataSourceChanged Event (C1Combo)

DoubleClick Event

ItemChanged Event

MouseEnter Event

MouseHover Event

MouseLeave Event

OnAddNew Event

OnInit Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventHandler Delegate (C1Combo)

FetchCellStyleEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub FetchCellStyleEventHandler (object sender, FetchCellStyleEventArgs e)

[C#]

public sealed delegate FetchCellStyleEventHandler : System.MulticastDelegate

[Delphi]

type FetchCellStyleEventHandler = procedure(sender: System.Object; e: FetchCellStyleEventArgs:C1Combo) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FetchCellStyleEventArgs object that contains the event data.

See Also

FetchCellStyle Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventHandler Delegate (C1Combo)

FetchCellTipsEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub FetchCellTipsEventHandler (object sender, FetchCellTipsEventArgs e)

[C#]

public sealed delegate FetchCellTipsEventHandler : System.MulticastDelegate

[Delphi]

type FetchCellTipsEventHandler = procedure(sender: System.Object; e: FetchCellTipsEventArgs:C1Combo) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FetchCellTipsEventArgs object that contains the event data.

See Also

FetchCellTips Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventHandler Delegate (C1Combo)

FetchRowStyleEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub FetchRowStyleEventHandler (object sender, FetchRowStyleEventArgs e)

[C#]

public sealed delegate FetchRowStyleEventHandler : System.MulticastDelegate

[Delphi]

type FetchRowStyleEventHandler = procedure(sender: System.Object; e: FetchRowStyleEventArgs:C1Combo) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FetchRowStyleEventArgs object that contains the event data.

See Also

FetchRowStyle Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FilterEventHandler Delegate (C1Combo)

FilterEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub FilterEventHandler (object sender, FilterEventArgs e)

[C#]

public sealed delegate Filter EventHandler : System.MulticastDelegate

[Delphi]

type Filter EventHandler = procedure(sender: System.Object; e: FilterEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FilterEventArgs object that contains the event data.

See Also

AfterSort Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventHandler Delegate (C1Combo)

FormatTextEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub FormatTextEventHandler (object sender, FormatTextEventArgs e)

[C#]

public sealed delegate FormatTextEventHandler : System.MulticastDelegate

[Delphi]

type FormatTextEventHandler = procedure(sender: System.Object; e: FormatTextEventArgs:C1Combo) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A FormatTextEventArgs object that contains the event data.

See Also

FormatText Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


KeyEventHandler Delegate

KeyEventHandler Delegate

Syntax

[VB]

Public Delegate Sub KeyEventHandler (object sender, KeyEventArgs e)

[C#]

public sealed delegate KeyEventHandler : System.MulticastDelegate

[Delphi]

type KeyEventHandler = procedure(sender: System.Object; e: KeyEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A KeyEventArgs object that contains the event data.

See Also

KeyDown Event

KeyUp Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


KeyPressEventHandler Delegate

KeyPressEventHandler Delegate

Syntax

[VB]

Public Delegate Sub KeyPressEventHandler (object sender, KeyPressEventArgs e)

[C#]

public sealed delegate KeyPressEventHandler : System.MulticastDelegate

[Delphi]

type KeyPressEventHandler = procedure(sender: System.Object; e: KeyPressEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A KeyPressEventArgs object that contains the event data.

See Also

KeyPress Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MismatchEventHandler Delegate

MismatchEventHandler Delegate

Syntax

[VB]

Public Delegate Sub MismatchEventHandler (object sender, MismatchEventArgs e)

[C#]

public sealed delegate MismatchEventHandler : System.MulticastDelegate

[Delphi]

type MismatchEventHandler = procedure(sender: System.Object; e: MismatchEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A MismatchEventArgs object that contains the event data.

See Also

Mismatch Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MouseEventHandler Delegate

MouseEventHandler Delegate

Syntax

[VB]

Public Delegate Sub MouseEventHandler (object sender, MouseEventArgs e)

[C#]

public sealed delegate MouseEventHandler : System.MulticastDelegate

[Delphi]

type MouseEventHandler = procedure(sender: System.Object; e: MouseEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A MouseEventArgs object that contains the event data.

See Also

MouseMove Event

MouseUp Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


NotInListEventHandler Delegate

NotInListEventHandler Delegate

Syntax

[VB]

Public Delegate Sub NotInListEventHandler (object sender, NotInListEventArgs e)

[C#]

public sealed delegate NotInListEventHandler : System.MulticastDelegate

[Delphi]

type NotInListEventHandler = procedure(sender: System.Object; e: NotInListEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A NotInListEventArgs object that contains the event data.

See Also

NotInList Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OpenEventHandler Delegate

OpenEventHandler Delegate

Syntax

[VB]

Public Delegate Sub OpenEventHandler (object sender, System.EventArgs e)

[C#]

public sealed delegate OpenEventHandler : System.MulticastDelegate

[Delphi]

type OpenEventHandler = procedure(sender: System.Object; e: System.EventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | An System.EventArgs object that contains the event data.

See Also

Open Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventHandler Delegate (C1Combo)

OwnerDrawCellEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub OwnerDrawCellEventHandler (object sender, OwnerDrawCellEventArgs e)

[C#]

public sealed delegate OwnerDrawCellEventHandler : System.MulticastDelegate

[Delphi]

type OwnerDrawCellEventHandler = procedure(sender: System.Object; e: OwnerDrawCellEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | An OwnerDrawCellEventArgs object that contains the event data.

See Also

DrawItem Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PaintEventHandler Delegate

PaintEventHandler Delegate

Syntax

[VB]

Public Delegate Sub PaintEventHandler (object sender, PaintEventArgs e)

[C#]

public sealed delegate PaintEventHandler : System.MulticastDelegate

[Delphi]

type PaintEventHandler = procedure(sender: System.Object; e: PaintEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A PaintEventArgs object that contains the event data.

See Also

Paint Event

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitEventHandler Delegate (C1Combo)

SplitEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub SplitEventHandler (object sender, SplitEventArgs e)

[C#]

public sealed delegate SplitEventHandler : System.MulticastDelegate

[Delphi]

type SplitEventHandler = procedure(sender: System.Object; e: SplitEventArgs) of object;

Arguments

Argument | Description
sender | The source of the event.
e | A SplitEventArgs object that contains the event data.

See Also

TopIndexChange Event (C1Combo)

LeftColChange Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventHandler Delegate (C1Combo)

UnboundColumnFetchEventHandler Delegate (C1Combo)

Syntax

[VB]

Public Delegate Sub UnboundColumnFetchEventHandler (object sender, UnboundColumnFetchEventArgs e)

[C#]

public sealed delegate UnboundColumnFetchEventHandler : System.MulticastDelegate

[Delphi]

type UnboundColumnFetchEventHandler = procedure(sender: System.Object; e: UnboundColumnFetchEventArgs:C1Combo) of object;

Arguments

Argument | Description
sender | The source of the event.
e | An UnboundColumnFetchEventArgs object that contains the event data.

See Also

UnboundColumnFetch Event (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Event Argument Reference

CancelEventArgs Argument (C1Combo)

ColEventArgs Argument (C1Combo)

ColMoveEventArgs Argument (C1Combo)

ColResizeEventArgs Argument (C1Combo)

DragEventArgs Argument

ErrorEventArgs Argument (C1Combo)

FetchCellStyleEventArgs Argument (C1Combo)

FetchCellTipsEventArgs Argument (C1Combo)

FetchRowStyleEventArgs Argument (C1Combo)

FilterEventArgs Argument (C1Combo)

FormatTextEventArgs Argument (C1Combo)

KeyEventArgs Argument

KeyPressEventArgs Argument

MismatchEventArgs Argument

MouseEventArgs Argument

NotInListEventArgs Argument

OwnerDrawCellEventArgs Argument (C1Combo)

PaintEventArgs Argument

SplitEventArgs Argument (C1Combo)

UnboundColumnFetchEventArgs Argument (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CancelEventArgs Argument (C1Combo)

CancelEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class CancelEventArgs

[C#]

public class CancelEventArgs : System.EventArgs

[Delphi]

type CancelEventArgs: class(EventArgs);

Members

Public Boolean Cancel

Member | Description
Cancel | A boolean that may be set to True to prevent the executing of a task.

See Also

CancelEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColEventArgs Argument (C1Combo)

ColEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class ColEventArgs

[C#]

public class ColEventArgs : System.EventArgs

[Delphi]

type ColEventArgs: class(EventArgs);

Members

Public Readonly Integer ColIndex

Member | Description
ColIndex | An integer that identifies the column that an action is to be executed upon.

See Also

ColEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventArgs Argument (C1Combo)

ColMoveEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class ColMoveEventArgs

[C#]

public class ColMoveEventArgs : System.EventArgs

[Delphi]

type ColMoveEventArgs: class(EventArgs);

Members

Public Readonly Integer Position

Public Readonly Integer ColIndex

Public Boolean Cancel

Member | Description
Position | An integer that specifies the target location of the selected columns.
ColIndex | An integer that specifies the current location of the selected column.
Cancel | A boolean that may be set to True to prohibit movement.

See Also

ColMoveEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventArgs Argument (C1Combo)

ColResizeEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class ColResizeEventArgs

[C#]

public class ColResizeEventArgs : System.EventArgs

[Delphi]

type ColResizeEventArgs: class(EventArgs);

Members

Public Readonly Integer ColIndex

Public Boolean Cancel

Member | Description
ColIndex | An integer that identifies the column that was resized.
Cancel | A boolean that may be set to True to undo resizing.

See Also

ColResizeEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DragEventArgs Argument

DragEventArgs Argument

Syntax

[VB]

Public Class DragEventArgs

[C#]

public class DragEventArgs : System.EventArgs

[Delphi]

type DragEventArgs: class(EventArgs);

Members

Public Readonly System.Windows.Forms.DragDropEffectsEnum AllowedEffect

Public Readonly IDataObject Data

Public System.Windows.Forms.DragDropEffectsEnum Effect

Public Readonly Integer KeyState

Public Readonly Integer X

Public Readonly Integer Y

Argument | Description
AllowedEffect | Gets which drag-and-drop operations are allowed by the originator (or source) of the drag event.
Data | Gets the IDataObject that contains the data associated with this event.
Effect | Gets or sets which drag-and-drop operations are allowed by the target of the drag event.
KeyState | Gets the current state of the CTRL, SHIFT and ALT keys, as well as the state of the mouse buttons.
X | Gets the x-coordinate of the mouse pointer.
Y | Gets the y-coordinate of the mouse pointer.

See Also

DragEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ErrorEventArgs Argument (C1Combo)

ErrorEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class ErrorEventArgs

[C#]

public class ErrorEventArgs : System.EventArgs

[Delphi]

type ErrorEventArgs: class(EventArgs);

Members

Argument | Description
Exception | The exception that was thrown.
Handled | Indicates if the exception was handled.

See Also

ErrorEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs Argument (C1Combo)

FetchCellStyleEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class FetchCellStyleEventArgs

[C#]

public class FetchCellStyleEventArgs : System.EventArgs

[Delphi]

type FetchCellStyleEventArgs: class(EventArgs);

Members

Public Readonly CellStyleFlag Condition

Public Readonly Integer Split

Public Readonly Integer Row

Public Readonly Integer Col

Public Readonly Style CellStyle

Member | Description
Condition | The sum of one or more CellStyleFlag constants describing the disposition of the cell being displayed.
Split | An integer that identifies the split containing the cell being displayed. This argument is omitted for C1Combo controls.
Row | An integer that identifies the row containing the cell being displayed.
Col | An integer that identifies the column containing the cell being displayed.
CellStyle | A Style object used to override the font and color characteristics of the cell being displayed.

See Also

FetchCellStyleEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs Argument (C1Combo)

FetchCellTipsEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class FetchCellTipsEventArgs

[C#]

public class FetchCellTipsEventArgs : System.EventArgs

[Delphi]

type FetchCellTipsEventArgs: class(EventArgs);

Members

Public Readonly Integer SplitIndex

Public Readonly Integer ColIndex

Public Readonly Integer Row

Public String CellTip

Public Readonly Boolean FullyDisplayed

Public Readonly Style TipStyle

Member | Description
SplitIndex | The zero-based index of the split the cursor is over.
ColIndex | An integer that identifies the column the cursor is over. This is either a zero-based column index or a (negative) CellTipEnum value.
Row | An integer that identifies the row the cursor is over. This is either a zero-based row index or a (negative) CellTipEnum value.
CellTip | The text to be displayed in the pop-up text box.
FullyDisplayed | A boolean that is True if CellTip will fit entirely within the boundaries of the cell.
TipStyle | Style object used to override the font and color characteristics of the cell tip text.

See Also

FetchCellTipsEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventArgs Argument (C1Combo)

FetchRowStyleEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class FetchRowStyleEventArgs

[C#]

public class FetchRowStyleEventArgs : System.EventArgs

[Delphi]

type FetchRowStyleEventArgs: class(EventArgs);

Members

Public Readonly Integer Split

Public Readonly Integer Row

Public Readonly Style CellStyle

Member | Description
Split | The zero-based index of the split for which formatting information is being requested. This argument is omitted for C1Combo controls.
Row | An integer that uniquely identifies the row to be displayed.
CellStyle | A Style object used to convey font and color information to the list.

See Also

FetchRowStyleEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FilterEventArgs Argument (C1Combo)

FilterEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class FilterEventArgs

[C#]

public class FilterEventArgs: System.EventArgs

[Delphi]

type FilterEventArgs: class(EventArgs);

Members

Public Readonly String Condition

Member | Description
Condition | The condition that can be used to sort or filter the data source.

See Also

FilterEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventArgs Argument (C1Combo)

FormatTextEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class FormatTextEventArgs

[C#]

public class FormatTextEventArgs : System.EventArgs

[Delphi]

type FormatTextEventArgs: class(EventArgs);

Members

Public Readonly Integer ColIndex

Public Readonly Integer Row

Public String Value

Member | Description
ColIndex | An integer that identifies the column being displayed.
Row | An integer that uniquely identifies the row from which the underlying data value was obtained.
Value | A string containing the underlying data value.

See Also

FormatTextEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


KeyEventArgs Argument

KeyEventArgs Argument

Syntax

[VB]

Public Class KeyEventArgs

[C#]

public class KeyEventArgs : System.EventArgs

[Delphi]

type KeyEventArgs: class(EventArgs);

Members

Public Readonly Boolean Alt

Public Readonly Boolean Control

Public Readonly Boolean Handled

Public Readonly Systems.Windows.Forms.Keys KeyCode

Public Readonly Systems.Windows.Forms.Keys KeyData

Public Readonly Integer KeyValue

Public Readonly Systems.Windows.Forms.Keys Modifiers

Public Readonly Boolean Shift

Argument | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
Handled | Gets a value indicating whether the event was handled.
KeyCode | Gets the keyboard code for a KeyDown or KeyUp event.
KeyData | Gets the key data for a KeyDown or KeyUp event.
KeyValue | Gets the keyboard value for a KeyDown or KeyUp event.
Modifiers | Gets the modifier flags for a KeyDown or KeyUp event. This indicates which combination of modifier keys (CTRL, SHIFT and ALT) were pressed.
Shift | Gets a value indicating whether the SHIFT key was pressed.

See Also

KeyEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


KeyPressEventArgs Argument

KeyPressEventArgs Argument

Syntax

[VB]

Public Class KeyPressEventArgs

[C#]

public class KeyPressEventArgs : System.EventArgs

[Delphi]

type KeyPressEventArgs: class(EventArgs);

Members

Public Readonly Boolean Handled

Public Readonly Char KeyChar

Argument | Description
Handled | Gets a value indicating whether the event was handled.
KeyChar | Gets the character corresponding to the key pressed.

See Also

KeyPressEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MismatchEventArgs Argument

MismatchEventArgs Argument

Syntax

[VB]

Public Class MismatchEventArgs

[C#]

public class MismatchEventArgs : System.EventArgs

[Delphi]

type MismatchEventArgs: class(EventArgs);

Members

Public Boolean Reposition

Public String NewEntry

Member | Description
Reposition | Integer that may be set to False in order to prevent the current row from moving back to the top of the list when a mismatch has been typed.
NewEntry | String representing the text that was entered by the user but not found in the list.

See Also

MismatchEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MouseEventArgs Argument

MouseEventArgs Argument

Syntax

[VB]

Public Class MouseEventArgs

[C#]

public class MouseEventArgs : System.EventArgs

[Delphi]

type MouseEventArgs: class(EventArgs);

Members

Public Readonly System.Windows.Forms.MouseButtons Button

Public Readonly Integer Clicks

Public Readonly Integer Delta

Public Readonly Integer X

Public Readonly Integer Y

Argument | Description
Button | Gets which mouse button was pressed.
Clicks | Gets the number of times the mouse button was pressed and released.
Delta | Gets a signed count of the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel.
X | Gets the x-coordinate of a mouse click.
Y | Gets the y-coordinate of a mouse click.

See Also

MouseEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


NotInListEventArgs Argument

NotInListEventArgs Argument

Syntax

[VB]

Public Class NotInListEventArgs

[C#]

public class NotInListEventArgs : System.EventArgs

[Delphi]

type NotInListEventArgs: class(EventArgs);

Members

Public Readonly String NewEntry

Public Readonly Boolean Retry

Member | Description
NewEntry | String representing the text that was entered by the user but not found in the list.
Retry | Integer that may be set to True in order to force the control to requery the list for the new entry.

See Also

NotInListEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs Argument (C1Combo)

OwnerDrawCellEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class OwnerDrawEventArgs

[C#]

public class OwnerDrawCellEventArgs : System.EventArgs

[Delphi]

type OwnerDrawCellEventArgs: class(EventArgs);

Members

Public Readonly Rectangle CellRect

Public Readonly Integer Row, Split, Col

Public Readonly Graphics Graphics

Public Boolean Handled

Member | Description
CellRect | The cell rectangle that needs drawn.
Row | The row index of the cell that needs drawn.
Split | The split index of the cell that needs drawn.
Col | The column index of the cell that needs drawn.
Graphics | The GDI+ graphics object to render on.
Handled | Boolean which is set to True if event performed OwnerDraw.

See Also

OwnerDrawCellEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PaintEventArgs Argument

PaintEventArgs Argument

Syntax

[VB]

Public Class PaintEventArgs

[C#]

public class PaintEventArgs : System.EventArgs

[Delphi]

type PaintEventArgs: class(EventArgs);

Members

Public Readonly System.Drawing.Rectangle ClipRectangle

Public Readonly System.Drawing.Graphics Graphics

Argument | Description
ClipRectangle | Indicates the rectangle in which to paint.
Graphics | Indicates the Graphics object used to paint.

See Also

PaintEventHandler Delegate

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitEventArgs Argument (C1Combo)

SplitEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class SplitEventArgs

[C#]

public class SplitEventArgs : System.EventArgs

[Delphi]

type SplitEventArgs: class(EventArgs);

Members

Public Readonly Integer SplitIndex

Member | Description
SplitIndex | The zero-based index of the split which an action is to be executed upon.

See Also

SplitEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventArgs Argument (C1Combo)

UnboundColumnFetchEventArgs Argument (C1Combo)

Syntax

[VB]

Public Class UnboundColumnFetchEventArgs

[C#]

public class UnboundColumnFetchEventArgs : System.EventArgs

[Delphi]

type UnboundColumnFetchEventArgs: class(EventArgs);

Members

Public Readonly Integer Row

Public Readonly Integer Col

Public String Value

Member | Description
Row | An integer that that identifies the row being requested.
Col | An integer that identifies the column being requested.
Value | A string used to transfer unbound column data to the list.

See Also

UnboundColumnFetchEventHandler Delegate (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1Combo Enumeration Reference

AddNewModeEnum Enumeration (C1Combo)

AlignHorzEnum Enumeration (C1Combo)

AlignVertEnum Enumeration (C1Combo)

BackgroundPictureDrawModeEnum Enumeration (C1Combo)

BorderTypeEnum Enumeration (C1Combo)

CellStyleFlag Enumeration (C1Combo)

CellTipEnum Enumeration (C1Combo)

ComboStyleEnum Enumeration

DataModeEnum Enumeration (C1Combo)

DragModeEnum Enumeration

DropdownPositionEnum Enumeration

DropModeEnum Enumeration

ForeGroundPicturePositionEnum Enumeration (C1Combo)

HorizontalAlignment Enumeration

LineStyleEnum Enumeration (C1Combo)

PointAtEnum Enumeration (C1Combo)

PresentationEnum Enumeration (C1Combo)

RowSizingEnum Enumeration (C1Combo)

ScrollBarEnum Enumeration (C1Combo)

ScrollBarStyleEnum Enumeration (C1Combo)

SizeModeEnum Enumeration (C1Combo)

SortDirEnum Enumeration (C1Combo)

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddNewModeEnum Enumeration (C1Combo)

AddNewModeEnum Enumeration (C1Combo)

Specifies the current state of the AddNew row.

Syntax

[VB]

Public enum AddNewModeEnum

[C#]

public sealed enum AddNewModeEnum : System.Enum

[Delphi]

type AddNewModeEnum = (NoAddNew, AddNewCurrent, AddNewPending);

Remarks

Use the members of this enumeration to set the value of the AddNewMode property in the C1List class.

Member Name | Description
NoAddNew | The current cell is not in the AddNew row.
AddNewCurrent | The current cell is in the Add New row.
AddNewPending | There is an Add New operation pending.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AlignHorzEnum Enumeration (C1Combo)

AlignHorzEnum Enumeration (C1Combo)

Specifies the Horizontal Alignment in a cell

Syntax

[VB]

Public enum AlignHorzEnum

[C#]

public sealed enum AlignHorzEnum : System.Enum

[Delphi]

type AlignHorzEnum = (General, Near, Center, Far, Justify);

Remarks

Use the members of this enumeration to set the value of the Alignment property in the C1List class.

Member Name | Description
General | Sets cell text to be left-aligned and numbers to be right-aligned.
Near | Aligns cell text to the near side of the cell (left side in left-to-right mode).
Center | Aligns text in a cell to the center.
Far | Aligns cell text to the far side of the cell (right side in left-to-right mode).
Justify | Spreads text throughout cell.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AlignVertEnum Enumeration (C1Combo)

AlignVertEnum Enumeration (C1Combo)

Specifies the Vertical Alignment in a cell.

Syntax

[VB]

Public enum AlignVertEnum

[C#]

public sealed enum AlignVertEnum : System.Enum

[Delphi]

type AlignVertEnum = (Top, Center, Bottom);

Remarks

Use the members of this enumeration to set the value of the VerticalAlignment property in the C1List class.

Member Name | Description
Top | Aligns text in a cell to the top.
Center | Aligns text in a cell in the center.
Bottom | Aligns text in a cell to the bottom.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BackgroundPictureDrawModeEnum Enumeration (C1Combo)

BackgroundPictureDrawModeEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum BackgroundPictureDrawModeEnum

[C#]

public sealed enum BackgroundPictureDrawModeEnum : System.Enum

[Delphi]

type BackgroundPictureDrawModeEnum = (Center, Tile, Stretch);

Remarks

Use the members of this enumeration to set the value of the BackgroundPictureDrawMode property in the C1List class.

Member Name | Description
Center | Aligns Background picture to the center of the cell.
Tile | Tiles Background picture in cell.
Stretch | Stretches background picture to fit cell.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BorderTypeEnum Enumeration (C1Combo)

BorderTypeEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum BorderTypeEnum

[C#]

public sealed enum BorderTypeEnum : System.Enum

[Delphi]

type BorderTypeEnum = (None, Flat, Raised, Inset, Groove, Fillet, RaisedBevel, InsetBevel);

Remarks

Use the members of this enumeration to set the value of the BorderStyle property in the C1Combo class.

Member Name | Description
None | No cell borders are used when the cell is painted.
Flat | No Visual Effects are used when the cell is painted.
Raised | The control paints the cell border as 3D raised.
Inset | The control paints the cell border as 3D inset.
Groove | The control paints a line around the inside of the border.
Fillet | The control paints a fillet type border.
RaisedBevel | The control paints the cell border as 3D raised with bevel.
InsetBevel | The control paints the cell border as 3D inset with bevel.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellStyleFlag Enumeration (C1Combo)

CellStyleFlag Enumeration (C1Combo)

Syntax

[VB]

Public enum CellStyleFlag

[C#]

public sealed enum CellStyleFlag : System.Enum

[Delphi]

type CellStyleFlag = (NormalCell, CurrentCell, SelectedRow, AllCells);

Remarks

Use the members of this enumeration to set one of the values of the AddCellStyle or AddRegExCellStyle methods in the C1Combo class.

This enum has the [Flags] attribute and can be combined.

Member Name | Description
NormalCell | The cell satisfies none of the conditions.
CurrentCell | The cell is the current cell as specified by the Bookmark, Col, and Split properties. At any given time, only one cell can have this status.
SelectedRow | The cell is part of a row selected by the user or in code. The SelectedRowCollection contains a bookmark for each selected row.
AllCells | All Cells
MarqueeRow | The cell is part of a highlighted row marquee.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellTipEnum Enumeration (C1Combo)

CellTipEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum CellTipEnum

[C#]

public sealed enum CellTipEnum : System.Enum

[Delphi]

type CellTipEnum = (NoCellTips, Anchored, Floating);

Remarks

Use the members of this enumeration to set the value of the CellTips property in the C1Combo class.

Member Name | Description
NoCellTips | No cell tips will be applied.
Anchored | Celltip will be anchored to the cell.
Floating | Celltip will be floating near the cell.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ComboStyleEnum Enumeration

ComboStyleEnum Enumeration

Syntax

[VB]

Public enum ComboStyleEnum

[C#]

public sealed enum ComboStyleEnum : System.Enum

[Delphi]

type ComboStyleEnum = (DropdownCombo, SimpleCombo, DropdownList);

Remarks

Use the members of this enumeration to access the return value of the ComboStyle property in the C1Combo class.

Member Name | Description
DropdownCombo (0) | Includes a text box and a dropdown list. The user can select from the list or type in the text box.
SimpleCombo (1) | Includes a text box and a list which is always displayed. The user can select from the list or type in the box. The size of a simple combo box includes both the text and list portions. By default, a simple combo box is sized so that none of the list is displayed. To display more of the list, resize the control at design time or increase its Height property at run time.
DropdownList (2) | Includes a text box and dropdown list as in setting 0 – Dropdown Combo. However, this style disallows text entry and permits selection only from the dropdown list.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataModeEnum Enumeration (C1Combo)

DataModeEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum DataModeEnum

[C#]

public sealed enum DataModeEnum : System.Enum

[Delphi]

type DataModeEnum = (Normal, AddItem);

Remarks

Use the members of this enumeration to access the return value of the DataMode property in the C1Combo class.

Member Name | Description
Normal | The control displays data available from its bound DataSource.
AddItem | The list portion of the control is populated with data via the AddItem method. The first item added starts at zero. Any event that uses a bookmark will use the zero-based index of the control. When in AddItem mode, the DataSource and DataMember properties are ignored.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DragModeEnum Enumeration

DragModeEnum Enumeration

Syntax

[VB]

Public enum DragMode

[C#]

public sealed enum DragModeEnum : System.Enum

[Delphi]

type DragModeEnum = (Automatic, Manual);

Remarks

Use the members of this enumeration to set the value of the DragMode property in the C1Combo class.

Member Name | Description
Automatic | The combo box handles the drag operation.
Manual | The programmer can manually handle the drag operation.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropdownPositionEnum Enumeration

DropdownPositionEnum Enumeration

Syntax

[VB]

Public enum DropdownPositionEnum

[C#]

public sealed enum DropdownPositionEnum : System.Enum

[Delphi]

type DropdownPositionEnum = (Default, RightDown, RightUp, LeftDown, LeftUp);

Remarks

Use the members of this enumeration to set the value of the DropdownPosition property in the C1Combo class.

Member Name | Description
Default (0) | The dropdown list will open to the right and down.
RightDown (1) | The dropdown list will open to the right and down.
RightUp (2) | The dropdown list will open to the right and up.
LeftDown (3) | The dropdown list will open to the left and down.
LeftUp (4) | The dropdown list will open to the left and up.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropModeEnum Enumeration

DropModeEnum Enumeration

Syntax

[VB]

Public enum DropMode

[C#]

public sealed enum DropModeEnum : System.Enum

[Delphi]

type DropModeEnum = (Automatic, Manual);

Remarks

Use the members of this enumeration to set the value of the DropMode property in the C1Combo class.

Member Name | Description
Automatic | The combo box handles the drop operation.
Manual | The programmer can manually handle the drop operation.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ForeGroundPicturePositionEnum Enumeration (C1Combo)

ForeGroundPicturePositionEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum ForeGroundPicturePositionEnum

[C#]

public sealed enum ForeGroundPicturePositionEnum : System.Enum

[Delphi]

type ForeGroundPicturePositionEnum = (Near, Far, LeftOfText, RightOfText, TopOfText, BottomOfText, PictureOnly, TextOnly);

Remarks

Use the members of this enumeration to set the value of the ForegroundPicturePosition property in the C1Combo class.

Member Name | Description
Near | Positions Foreground picture on the near side of the cell.
Far | Positions Foreground picture on the far side of the cell.
LeftOfText | Positions Foreground picture to the left of the cell text.
RightOfText | Positions Foreground picture to the right of the cell text.
TopOfText | Positions Foreground picture on top of the cell text.
BottomOfText | Positions Foreground picture below the cell text.
PictureOnly | Foreground picture is only included.
TextOnly | Text is only included.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HorizontalAlignment Enumeration

HorizontalAlignment Enumeration

Syntax

[VB]

Public enum HorizontalAlignment

[C#]

public sealed enum HorizontalAlignment : System.Enum

[Delphi]

type HorizontalAlignment = (Left, Right, Center);

Remarks

Use the members of this enumeration to set the value of the TextAlign property in the C1Combo class.

Member Name | Description
Left (0) | The default. Text is aligned to the left.
Right (1) | Text is aligned to the right.
Center (2) | Text is centered.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


LineStyleEnum Enumeration (C1Combo)

LineStyleEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum LineStyleEnum

[C#]

public sealed enum LineStyleEnum : System.Enum

[Delphi]

type LineStyleEnum = (None, Single, Double, Raised, Inset);

Remarks

This enumeration is used to set the line style for row and column divider.

Member Name | Description
None | No line style
Single | Single line
Double | Double line
Raised | Line with 3D raised appearance
Inset | Line with 3D inset appearance
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PointAtEnum Enumeration (C1Combo)

PointAtEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum PointAtEnum

[C#]

public sealed enum PointAtEnum : System.Enum

[Delphi]

type PointAtEnum = (NotInList, AtCaption, AtSplitHeader, AtSplitSizeBox, AtRowSelect, AtRowSize, AtColumnHeader, AtColumnFooter, AtColumnSize, AtDataArea, AtGroupArea, AtGroupHeader);

Remarks

Use the members of this enumeration to access the return value of the PointAt method in the C1Combo class.

Member Name | Description
NotInList | Coordinates are not in list area.
AtCaption | Coordinates are in caption area.
AtSplitHeader | Coordinates are in a split’s header.
AtSplitSizeBox | Coordinates are in a splits resizing box.
AtRowSelect | Coordinates are in a row selector.
AtRowSize | Coordinates are in a row resizing box.
AtColumnHeader | Coordinates are in a column’s header.
AtColumnFooter | Coordinates are in a column’s footer.
AtColumnSize | Coordinates are in a column’s resizing box.
AtDataArea | Coordinates are in the list’s data area.
AtGroupArea | Coordinates are in the list’s GroupBy area.
AtGroupHeader | Coordinates are in the list’s GroupBy header.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PresentationEnum Enumeration (C1Combo)

PresentationEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum PresentationEnum

[C#]

public sealed enum PresentationEnum : System.Enum

[Delphi]

type PresentationEnum = (Normal, RadioButton, CheckBox);

Remarks

Use the members of this enumeration to set the value of the Presentation property in the C1List class.

Member Name | Description
Normal | Value items are displayed as text or graphics depending upon the setting of the DisplayValue and Translate properties.
RadioButton | Value items are displayed as a group of radio buttons within the cell.
CheckBox | Value items are displayed as a check box within the current cell.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowSizingEnum Enumeration (C1Combo)

RowSizingEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum RowSizingEnum

[C#]

public sealed enum RowSizingEnum : System.Enum

[Delphi]

type RowSizingEnum = (None, AllRows, IndividualRows);

Remarks

Use the members of this enumeration to set the value of the AllowRowSizing property in the C1Combo class.

Member Name | Description
None | No sizing will be allowed.
AllRows | All rows will be sized as a group.
IndividualRows | Rows can be resized independently.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollBarEnum Enumeration (C1Combo)

ScrollBarEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum ScrollBarEnum

[C#]

public sealed enum ScrollBarEnum : System.Enum

[Delphi]

type ScrollBarEnum = (Horizontal, Vertical);

Remarks

This enumeration identifies which scrollbar is being scrolled for the FetchScrollTips event.

Member Name | Description
Horizontal | The Horizontal ScrollBar is being scrolled.
Vertical | The Vertical ScrollBar is being scrolled.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollBarStyleEnum Enumeration (C1Combo)

ScrollBarStyleEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum ScrollBarStyleEnum

[C#]

public sealed enum ScrollBarStyleEnum : System.Enum

[Delphi]

type ScrollBarStyleEnum = (None, Always, Automatic);

Remarks

Use the members of this enumeration to set the style of the HBar and VBar object.

Member Name | Description
None | No Scroll Bars
Always | ScrollBars always visible
Automatic | Horizontal and/or vertical scroll bars are displayed only if the object's contents extend beyond its borders.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SizeModeEnum Enumeration (C1Combo)

SizeModeEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum SizeModeEnum

[C#]

public sealed enum SizeModeEnum : System.Enum

[Delphi]

type SizeModeEnum = (Exact, NumberOfColumns, Scalable);

Remarks

Use the members of this enumeration to set the value of the SplitSizeMode property.

Member Name | Description
Exact | The value returned is a floating point number indicating the exact size of the split in terms of the coordinate system of the list's container.
NumberOfColumns | The value returned is an integer indicating the number of columns displayed in the split.
Scalable | The value returned by the property is an integer indicating the relative size of the split with respect to other scalable splits.
Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SortDirEnum Enumeration (C1Combo)

SortDirEnum Enumeration (C1Combo)

Syntax

[VB]

Public enum SortDirEnum

[C#]

public sealed enum SortDirEnum : System.Enum

[Delphi]

type SortDirEnum = (ASC, DESC, None);

Remarks

Use the members of this enumeration to set the value of the Sort method.

Member Name | Description
ASC | The column will be sorted in the ascending order.
DESC | The column will be sorted in the descending order.
None | The column will not be sorted.

Example

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddCellStyle Method - C#

C#

C1.Win.C1List.Style S = new C1.Win.C1List.Style();

S.ForeColor = System.Drawing.Color.Red;

C1List1.AddCellStyle( C1.Win.C1List.CellStyleFlag.SelectedRow, S);


AddCellStyle Method (C1Combo) - C#

C#

C1.Win.C1List.Style S = new C1.Win.C1List.Style();

S.ForeColor = System.Drawing.Color.Red;

C1List1.AddCellStyle( C1.Win.C1List.CellStyleFlag.UpdatedCell, S);


AddCellStyle Method (C1Combo) - Delphi

Delphi

var

C1: C1List1.AddCellStyle;

S: C1.Win.C1List.Style;

begin

S := C1.Win.C1List.Style.Create;

S.ForeColor := System.Drawing.Color.Red;

end;


AddCellStyle Method (C1Combo) - Visual Basic

Visual Basic

Dim S As New C1.Win.C1List.Style()

S.ForeColor = System.Drawing.Color.Red

C1List1.AddCellStyle C1.Win.C1List.CellStyleFlag.UpdatedCell, S


AddCellStyle Method - Delphi

Delphi

var

C1: C1List1.AddCellStyle;

S: C1.Win.C1List.Style;

begin

S := C1.Win.C1List.Style.Create;

S.ForeColor := System.Drawing.Color.Red;

end;


AddCellStyle Method - Visual Basic

Visual Basic

Dim S As New C1.Win.C1List.Style()

S.ForeColor = System.Drawing.Color.Red

C1List1.AddCellStyle C1.Win.C1List.CellStyleFlag.SelectedRow, S


Adding Members - C#

C#

// Create a ValueItem object

C1List.ValueItem S;

this.C1List1.Columns[0].ValueItems.Values.Add(S);


Adding Members - C#2

C#

// Create a Split object with index 1

C1List.ValueItem S;

this.C1List1.Columns[0].ValueItems.Values.Insert (1, S);


Adding Members - Delphi

Delphi

var

S: C1List.ValueItem;

begin

Self.C1List1.Columns[0].ValueItems.Values.Add(S);

end;


Adding Members - Delphi2

Delphi

var

S: C1List.ValueItem;

begin

this.C1List1.Columns[0].ValueItems.Values.Insert (1, S);


Adding Members - Visual Basic

Visual Basic

' Create a ValueItem object

Dim S As New C1List.ValueItem

Me.C1List1.Columns(0).ValueItems.Values.Add(S)


Adding Members - Visual Basic2

Visual Basic

' Create a Split object with index 1

Dim S As New C1List.ValueItem

Me.C1List1.Columns(0).ValueItems.Values.Insert (1, S)


AddItemEnd Method - C#

C#

int i;

this.C1List1.SuspendBinding();

for ( i = 1; i <= 1000; i++)

this.C1List1.AddItem("A;B;" + i);

this.C1List1.ResumeBinding ();


AddItemEnd Method (C1Combo) - C#

C#

int i;

this.C1Combo1.SuspendBinding();

for ( i = 1; i <= 1000; i++)

this.C1Combo1.AddItem("A;B;" + i);

this. C1Combo1.ResumeBinding ();


AddItemEnd Method (C1Combo) - Delphi

Delphi

var

i: Integer;

begin

with Self.C1Combo1 do

begin

AddItemBegin;

For i = 1 To 1000 do

AddItemF("A;B;" + System.Object(i).ToString);

AddItemEnd;

end;

end;


AddItemEnd Method (C1Combo) - Visual Basic

Visual Basic

Dim i As Integer

With Me.C1Combo1

.SuspendBinding ()

For i = 1 To 1000

.AddItem ("A;B;" & i)

Next i

.ResumeBinding ()

End With


AddItemEnd Method - Delphi

Delphi

var

i: Integer;

begin

with Self.C1List1 do

begin

AddItemBegin;

For i = 1 To 1000 do

AddItemF("A;B;" + System.Object(i).ToString);

AddItemEnd;

end;

end;


AddItemEnd Method - Visual Basic

Visual Basic

Dim i As Integer

With Me.C1List1

.SuspendBinding ()

For i = 1 To 1000

.AddItem ("A;B;" & i)

Next i

.ResumeBinding ()

End With


AddItem Mode - C#

C#

private void Command1_Click() {

C1List1.AddItem(“Smith;John;210 Elm St.”);

C1List1.AddItem(“Doe;Jane;100 Oak St.”);

}


AddItem Mode - C#2

C#

private void Command2_Click() {

C1List1.RemoveItem( C1List1.SelectedIndex );

}


AddItem Mode - C#3

C#

private void Command3_Click() {

C1List1.ClearItems();

}


AddItem Mode - C#4

C#

private void Command4_Click() {

C1List1.InsertItem("Carl;Ziegler;412-678-2351", 1);

}


AddItem Mode - Delphi

Delphi

procedure Command1_Click;

begin

with C1List1 do

begin

AddItem('Smith;John;210 Elm St.');

AddItem('Doe;Jane;100 Oak St.');

end;

End;


AddItem Mode - Delphi2

Delphi

procedure Command2_Click;

begin

C1List1.RemoveItem C1List1.SelectedIndex;

end;


AddItem Mode - Delphi3

Delphi

procedure Command3_Click;

begin

C1List1.ClearItems;

end;


AddItem Mode - Delphi4

Delphi

procedure Command4_Click;

begin

C1List1.InsertItem('Carl;Ziegler;412-678-2351');

end;


AddItem Mode - Visual Basic

Visual Basic

Private Sub Command1_Click()

With C1List1

.AddItem "Smith;John;210 Elm St."

.AddItem "Doe;Jane;100 Oak St."

End With

End Sub


AddItem Mode - Visual Basic2

Visual Basic

Private Sub Command2_Click()

C1List1.RemoveItem C1List1.SelectedIndex

End Sub


AddItem Mode - Visual Basic3

Visual Basic

Private Sub Command3_Click()

C1List1.ClearItems

End Sub


AddItem Mode - Visual Basic4

Visual Basic

Private Sub Command4_Click()

C1List1.InsertItem("Carl;Ziegler;412-678-2351", 1)

End Sub


AddItemTitles Method - C#

C#

C1List1.AddItemTitles("First Name; LastName; Phone Number");


AddItemTitles Method (C1Combo) - C#

C#

C1Combo1.AddItemTitles("First Name; LastName; Phone Number");


AddItemTitles Method (C1Combo) - Delphi

Delphi

begin

C1Combo1.AddItemTitles('First Name; LastName; Phone Number');

end;


AddItemTitles Method (C1Combo) - Visual Basic

Visual Basic

C1Combo1.AddItemTitles("First Name; LastName; Phone Number")


AddItemTitles Method - Delphi

Delphi

begin

C1List1.AddItemTitles('First Name; LastName; Phone Number');

end;


AddItemTitles Method - Visual Basic

Visual Basic

C1List1.AddItemTitles("First Name; LastName; Phone Number")


AddRegexCellStyle Method - C#

C#

C1List.Style S = new C1List.Style();

S.Font = new Font(S.Font, FontStyle);

C1List1.AddRegexCellStyle( CellStyleFlag.NormalCell, S, "SQL" );


AddRegexCellStyle Method (C1Combo) - C#

C#

C1List.Style S = new C1List.Style;

S.Font = new Font(S.Font, FontStyle.Bold);

C1Combo1.AddRegexCellStyle( CellStyleFlag.NormalCell, S, "SQL" );


AddRegexCellStyle Method (C1Combo) - Delphi

Delphi

var

CellStyleFlag: C1Combo1.AddRegexCellStyle;

S: C1List.Style;

begin

S.Font.Bold := True;

end;


AddRegexCellStyle Method (C1Combo) - Visual Basic

Visual Basic

Dim S As New C1.Win.C1List.Style

S.Font = New Font(S.Font, FontStyle.Bold)

C1Combo1.AddRegexCellStyle CellStyleFlag.NormalCell, S, "SQL"


AddRegexCellStyle Method - Delphi

Delphi

var

CellStyleFlag: C1List1.AddRegexCellStyle;

begin

S.Font := New Font(S.Font, FontStyle.Bold);

end;


AddRegexCellStyle Method - Visual Basic

Visual Basic

Dim S As New C1List.Style()

S.Font = New Font(S.Font, FontStyle.Bold)

C1List1.AddRegexCellStyle CellStyleFlag.NormalCell, S, "SQL"


Anonymous style inheritance - C#

C#

Font myfont;

myfont = new Font (this.C1List1.Styles[ “Normal”].Font, FontStyle.Bold);

this.C1List1.Styles[ “Normal”].Font = myfont;


Anonymous style inheritance - C#2

C#

Font myfont;

myfont = new Font (this.C1List1.Splits[0].Style.Font, FontStyle.Bold);

this.C1List1.Splits[0].Style.Font = myfont;


Anonymous style inheritance - C#3

C#

Font myfont;

Font myfont1;

Font myfont2;

Font myfont3;

myfont = new Font (this.C1List1.Splits[0].Style.Font, FontStyle.Bold);

this.C1List1.Splits[0].Style.Font = myfont;

myfont1 = new Font (this.C1List1.Splits[0].CaptionStyle.Font, FontStyle.Bold);

this.C1List1.Splits[0].CaptionStyle.Font = myfont1;

myfont2 = new Font (this.C1List1.Splits[0].HeadingStyle.Font, FontStyle.Bold);

this.C1List1.Splits[0].HeadingStyle.Font = myfont2;

myfont3 = new Font (this.C1List1.Splits[0].FooterStyle.Font, FontStyle.Bold);

this.C1List1.Splits[0].FooterStyle.Font = myfont3;


Anonymous style inheritance - C#4

C#

Font myfont;

myfont = new Font (this.C1List1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold);

this.C1List1.Splits[0].DisplayColumns[0].Style.Font = myfont;


Anonymous style inheritance - C#5

C#

Font myfont;

Font myfont1;

Font myfont2;

myfont = new Font (this.C1List1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold);

this.C1List1.Splits[0].DisplayColumns[0].Style.Font = myfont;

myfont1 = new Font (this.C1List1.Splits[0].DisplayColumns[0].HeadingStyle.Font, FontStyle.Bold);

this.C1List1.Splits[0].DisplayColumns[0].HeadingStyle.Font = myfont1;

myfont2 = new Font (this.C1List1.Splits[0].DisplayColumns[0].FooterStyle.Font, FontStyle.Bold);

this.C1List1.Splits[0].DisplayColumns[0].FooterStyle.Font = myfont2;


Anonymous style inheritance - C#6

C#

this.C1List1.Style.BackColor = System.Drawing.Color.Gray;


Anonymous style inheritance - C#7

C#

this.C1List1.Splits[0].Style.BackColor = System.Drawing.Color.Gray;


Anonymous style inheritance - C#8

C#

this.C1List1.Splits[0].DisplayColumns[0].Style.HorizontalAlignment = AlignHorzEnum.Center;


Anonymous style inheritance - C#9

C#

this.C1List1.Splits[0].DisplayColumns[0].Style.HorizontalAlignment = AlignHorzEnum.Center;


Anonymous style inheritance - C#10

C#

this.C1List1.Splits[0].DisplayColumns[0].HeadingStyle.HorizontalAlignment = AlignHorzEnum.Near;

this.C1List1.Splits[0].DisplayColumns[0].FooterStyle.HorizontalAlignment = AlignHorzEnum.Far;

this.C1List1.Splits[0].DisplayColumns[0].Style.HorizontalAlignment = AlignHorzEnum.Center;


Anonymous style inheritance - Delphi

Delphi

var

myfont: Font;

begin

myfont := Font.Create(Self.C1List1.Styles(‘Normal’).Font, FontStyle.Bold);

Self.C1List1.Styles(‘Normal’).Font := myfont;

end;


Anonymous style inheritance - Delphi2

Delphi

var

myfont: Font;

begin

myfont := Font.Create(Self.C1List1.Splits[0].Style.Font, FontStyle.Bold);

Self.C1List1.Splits(0).Style.Font := myfont;

end;


Anonymous style inheritance - Delphi3

Delphi

var

myfont3: Font;

myfont2: Font;

myfont1: Font;

myfont: Font;

begin

myfont := Font.Create(Self.C1List1.Splits[0].Style.Font, FontStyle.Bold);

Self.C1List1.Splits[0].Style.Font := myfont;

myfont1 := Font.Create(Self.C1List1.Splits[0].CaptionStyle.Font, FontStyle.Bold);

Self.C1List1.Splits[0].CaptionStyle.Font := myfont1;

myfont2 := Font.Create(Self.C1List1.Splits[0].HeadingStyle.Font, FontStyle.Bold);

Self.C1List1.Splits[0].HeadingStyle.Font := myfont2;

myfont3 := Font.Create(Self.C1List1.Splits[0].FooterStyle.Font, FontStyle.Bold);

Self.C1List1.Splits[0].FooterStyle.Font := myfont3;

end;


Anonymous style inheritance - Delphi4

Delphi

var

myfont: Font;

begin

myfont := Font.Create(Self.C1List1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold);

Self.C1List1.Splits[0].DisplayColumns[0].Style.Font := myfont;

end;


Anonymous style inheritance - Delphi5

Delphi

var

myfont2: Font;

myfont1: Font;

myfont: Font;

begin

myfont := Font.Create(Self.C1List1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold);

Self.C1List1.Splits[0].DisplayColumns[0].Style.Font := myfont;

myfont1 := Font.Create(Self.C1List1.Splits[0].DisplayColumns[0].HeadingStyle.Font, FontStyle.Bold);

Self.C1List1.Splits[0].DisplayColumns[0].HeadingStyle.Font := myfont1;

myfont2 := Font.Create(Self.C1List1.Splits[0].DisplayColumns[0].FooterStyle.Font, FontStyle.Bold);

Self.C1List1.Splits[0].DisplayColumns[0].FooterStyle.Font := myfont2;

end;


Anonymous style inheritance - Delphi6

Delphi

Self.C1List1.Style.BackColor := System.Drawing.Color.Gray;


Anonymous style inheritance - Delphi7

Delphi

Self.C1List1.Splits[0].Style.BackColor := System.Drawing.Color.Gray;


Anonymous style inheritance - Delphi8

Delphi

Self.C1List1.Splits[0].DisplayColumns[0].Style.HorizontalAlignment := AlignHorzEnum.Center;


Anonymous style inheritance - Delphi9

Delphi

Self.C1List1.Splits[0].DisplayColumns[0].Style.HorizontalAlignment := AlignHorzEnum.Center;


Anonymous style inheritance - Delphi10

Delphi

begin

with C1List1.Splits[0].DisplayColumns[0] do

begin

HeadingStyle.HorizontalAlignment := AlignHorzEnum.Near;

FooterStyle.HorizontalAlignment := AlignHorzEnum.Far;

Style.HorizontalAlignment := AlignHorzEnum.Center;

end;

end;


Anonymous style inheritance - Visual Basic

Visual Basic

Dim myfont As Font

myfont = New Font (Me.C1List1.Styles(“Normal”).Font, FontStyle.Bold)

Me.C1List1.Styles(“Normal”).Font = myfont


Anonymous style inheritance - Visual Basic2

Visual Basic

Dim myfont As Font

myfont = New Font (Me.C1List1.Splits(0).Style.Font, FontStyle.Bold)

Me.C1List1.Splits(0).Style.Font = myfont


Anonymous style inheritance - Visual Basic3

Visual Basic

Dim myfont As Font

Dim myfont1 As Font

Dim myfont2 As Font

Dim myfont3 As Font

myfont = New Font (Me.C1List1.Splits(0).Style.Font, FontStyle.Bold)

Me.C1List1.Splits(0).Style.Font = myfont

myfont1 = New Font (Me.C1List1.Splits(0).CaptionStyle.Font, FontStyle.Bold)

Me.C1List1.Splits(0).CaptionStyle.Font = myfont1

myfont2 = New Font (Me.C1List1.Splits(0).HeadingStyle.Font, FontStyle.Bold)

Me.C1List1.Splits(0).HeadingStyle.Font = myfont2

myfont3 = New Font (Me.C1List1.Splits(0).FooterStyle.Font, FontStyle.Bold)

Me.C1List1.Splits(0).FooterStyle.Font = myfont3


Anonymous style inheritance - Visual Basic4

Visual Basic

Dim myfont As Font

myfont = New Font (Me.C1List1.Splits(0).DisplayColumns(0).Style.Font, FontStyle.Bold)

Me.C1List1.Splits(0).DisplayColumns(0).Style.Font = myfont


Anonymous style inheritance - Visual Basic5

Visual Basic

Dim myfont As Font

Dim myfont1 As Font

Dim myfont2 As Font

myfont = New Font (Me.C1List1.Splits(0).DisplayColumns(0).Style.Font, FontStyle.Bold)

Me.C1List1.Splits(0).DisplayColumns(0).Style.Font = myfont

myfont1 = New Font (Me.C1List1.Splits(0).DisplayColumns(0).HeadingStyle.Font, FontStyle.Bold)

Me.C1List1.Splits(0).DisplayColumns(0).HeadingStyle.Font = myfont1

myfont2 = New Font (Me.C1List1.Splits(0).DisplayColumns(0).FooterStyle.Font, FontStyle.Bold)

Me.C1List1.Splits(0).DisplayColumns(0).FooterStyle.Font = myfont2


Anonymous style inheritance - Visual Basic6

Visual Basic

Me.C1List1.Style.BackColor = System.Drawing.Color.Gray


Anonymous style inheritance - Visual Basic7

Visual Basic

Me.C1List1.Splits(0).Style.BackColor = System.Drawing.Color.Gray


Anonymous style inheritance - Visual Basic8

Visual Basic

Me.C1List1.Splits(0).DisplayColumns(0).Style.HorizontalAlignment = AlignHorzEnum.Center


Anonymous style inheritance - Visual Basic9

Visual Basic

Me.C1List1.Splits(0).DisplayColumns(0).Style.HorizontalAlignment = AlignHorzEnum.Center


Anonymous style inheritance - Visual Basic10

Visual Basic

With Me.C1List1.Splits(0).DisplayColumns(0)

.HeadingStyle.HorizontalAlignment = AlignHorzEnum.Near

.FooterStyle.HorizontalAlignment = AlignHorzEnum.Far

.Style.HorizontalAlignment = AlignHorzEnum.Center

End With


Applying cell styles by contents - C#

C#

C1.Win.C1List.Style S = new C1.Win.C1List.Style();

Font myfont;

myfont = new Font(S.Font, FontStyle.Bold);

S.Font = myfont;

this.C1List1.Splits[0].DisplayColumns[0].AddRegexCellStyle(C1.Win.C1List.CellStyleFlag.AllCells, S, "Computer");


Applying cell styles by contents - Delphi

Delphi

var

myfont: Font;

S: C1.Win.C1List.Style;

begin

S := C1.Win.C1List.Style.Create;

myfont := Font.Create(S.Font, FontStyle.Bold);

S.Font := myfont;

Self.C1List1.Splits[0].DisplayColumns[0].AddRegexCellStyle(C1.Win.C1List.CellStyle Flag.AllCells, S, 'Computer');

end;


Applying cell styles by contents - Visual Basic

Visual Basic

Dim S As New C1.Win.C1List.Style()

Dim myfont As Font

myfont = New Font(S.Font, FontStyle.Bold)

S.Font = myfont

Me.C1List1.Splits(0).DisplayColumns(0).AddRegexCellStyle(C1.Win.C1List.CellStyleFlag.AllCells, S, "Computer")


Applying cell styles by custom criteria - C#

C#

private void C1List1_FetchCellStyle( object sender, C1.Win.C1List.FetchCellStyleEventArgs e) {

long N;

N = long.Parse(this.C1List1.Columns(e.Col).CellText(e.Row));

if ( N > 1000 )

e.CellStyle.ForeColor = System.Drawing.Color.Blue;

}


Applying cell styles by custom criteria - C#2

C#

if ( N > 1000 )

e.CellStyle.Font = new Font (e.CellStyle.Font, FontStyle.Italic);


Applying cell styles by custom criteria - C#3

C#

private void C1List1_FetchCellStyle( object sender, C1.Win.C1List.FetchCellStyleEventArgs e) {

switch (e.Col) {

case 4:

long Col1, Col2;

Col1 = long.Parse(this.C1List1.Columns[1].CellText(e.Row));

Col2 = long.Parse(this.C1List1.Columns[2].CellText(e.Row));

if ( Col1 - Col2 < 0 )

e.CellStyle.ForeColor = System.Drawing.Color.Red;

break;

case 7:

string S;

S = this.C1List1.Columns[7].CellText(e.Row);

if ( S == TextBox1.Text )

e.CellStyle.Font = new Font(e.CellStyle.Font, FontStyle.Bold);

break;

default:

Console.WriteLine ("FetchCellStyle not handled: " + e.Col);

break;

}

}


Applying cell styles by custom criteria - C#4

C#

private void C1List1_FetchRowStyle( object sender, C1.Win.C1List.FetchRowStyleEventArgs e)


Applying cell styles by custom criteria - Delphi

Delphi

procedure C1List1_FetchCellStyle(sender: System.Object; e: C1.Win.C1List.FetchCellStyleEventArgs);

var

N: Integer;

begin

N := Val(Me.C1List1.Columns[e.Col].CellText(e.Row));

If N > 1000 Then e.CellStyle.ForeColor := System.Drawing.Color.Blue;

end;


Applying cell styles by custom criteria - Delphi2

Delphi

begin

if (N > 1000) then

e.CellStyle.Font := Font.Create(e.CellStyle.Font, FontStyle.Italic);

end;


Applying cell styles by custom criteria - Delphi3

Delphi

procedure C1List1_FetchCellStyle(sender: System.Object; e: C1.Win.C1List.FetchCellStyleEventArgs);

var

Col1, Col2: Integer;

S: string;

begin

case e.Col of

4:

begin

Col1 := System.Int32.Parse(Me.C1List1.Columns[1].CellText(e.Row));

Col2 := System.Int32.Parse(Me.C1List1.Columns[2].CellText(e.Row));

if (Col1 – Col2 < 0) then

e.CellStyle.ForeColor := System.Drawing.Color.Red;

end;

7:

begin

S :=C1List1.Columns[7].CellText(e.Row);

if S = TextBox1.Text then

e.CellStyle.Font := Font.Create(e.CellStyle.Font, FontStyle.Bold);

end;

else

begin

Debug.WriteLine ('FetchCellStyle not handled: ');

end;

end;


Applying cell styles by custom criteria - Delphi4

Delphi

procedure Class1.C1List1_FetchRowStyle(sender: System.Object; e: C1.Win.C1List.FetchRowStyleEventArgs);


Applying cell styles by custom criteria - Visual Basic

Visual Basic

Private Sub C1List1_FetchCellStyle(ByVal sender As Object, ByVal e As C1.Win.C1List.FetchCellStyleEventArgs) Handles C1List1.FetchCellSTyle

Dim N As Long

N = Val(Me.C1List1.Columns(e.Col).CellText(e.Row))

If N > 1000 Then

e.CellStyle.ForeColor = System.Drawing.Color.Blue

End If

End Sub


Applying cell styles by custom criteria - Visual Basic2

Visual Basic

If N > 1000 Then

e.CellStyle.Font = New Font (e.CellStyle.Font, FontStyle.Italic)

End If


Applying cell styles by custom criteria - Visual Basic3

Visual Basic

Private Sub C1List1_FetchCellStyle(ByVal sender As Object, ByVal e As C1.Win.C1List.FetchCellStyleEventArgs) Handles C1List1.FetchCellSTyle

Select Case e.Col

Case 4

Dim Col1 As Long, Col2 As Long

Col1 = CLng(Me.C1List1.Columns(1).CellText(e.Row))

Col2 = CLng(Me.C1List1.Columns(2).CellText(e.Row))

If Col1 - Col2 < 0 Then e.CellStyle.ForeColor = System.Drawing.Color.Red

Case 7

Dim S As String

S = Me.C1List1.Columns(7).CellText(e.Row)

If S = TextBox1.Text Then e.CellStyle.Font = New Font(e.CellStyle.Font, _ FontStyle.Bold)

Case Else

Debug.WriteLine ("FetchCellStyle not handled: " & e.Col)

End Select

End Sub


Applying cell styles by custom criteria - Visual Basic4

Visual Basic

Private Sub C1List1_FetchRowStyle(ByVal sender As Object, ByVal e As C1.Win.C1List.FetchRowStyleEventArgs) Handles C1List1.FetchRowStyle


Applying cell styles by status - C#

C#

C1.Win.C1List.Style S = new C1.Win.C1List.Style();

Font myfont;

myfont = new Font(S.Font, FontStyle.Bold);

S.Font = myfont;

S.ForeColor = System.Drawing.Color.Red;

this.C1List1.AddCellStyle (C1.Win.C1List.CellStyleFlag.CurrentCell, S);


Applying cell styles by status - C#2

C#

C1.Win.C1List.Style S;

S = this.C1List1.Styles["RedBold"];

this.C1List1.AddCellStyle (C1.Win.C1List.CellStyleFlag.CurrentCell, S);


Applying cell styles by status - C#3

C#

this.C1List1.AddCellStyle(C1.Win.C1List.CellStyleFlag.CurrentCell, S);


Applying cell styles by status - Delphi

Delphi

var

myfont: Font;

S: C1.Win.C1List.Style;

begin

S := C1.Win.C1List.Style.Create;

myfont := Font.Create(S.Font, FontStyle.Bold);

S.Font := myfont;

S.ForeColor := System.Drawing.Color.Red;

Self.C1List1.AddCellStyle(C1.Win.C1List.CellStyleFlag.CurrentCell, S);

end;


Applying cell styles by status - Delphi2

Delphi

var

S: C1.Win.C1List.Style;

begin

S := Self.C1List1.Styles['RedBold'];

Self.C1List1.AddCellStyle(C1.Win.C1List.CellStyleFlag.CurrentCell, S);

end;


Applying cell styles by status - Delphi3

Delphi

Self.C1List1.AddCellStyle(C1.Win.C1List.CellStyleFlag.CurrentCell, S);


Applying cell styles by status - Visual Basic

Visual Basic

Dim S As New C1.Win.C1List.Style()

Dim myfont As Font

myfont = New Font(S.Font, FontStyle.Bold)

S.Font = myfont

S.ForeColor = System.Drawing.Color.Red

Me.C1List1.AddCellStyle (C1.Win.C1List.CellStyleFlag.CurrentCell, S)


Applying cell styles by status - Visual Basic2

Visual Basic

Dim S As C1.Win.C1List.Style

S = Me.C1List1.Styles("RedBold")

Me.C1List1.AddCellStyle (C1.Win.C1List.CellStyleFlag.CurrentCell, S)


Applying cell styles by status - Visual Basic3

Visual Basic

Me.C1List1.AddCellStyle(C1.Win.C1List.CellStyleFlag.CurrentCell, S)


BackgroundImage Property - C#

C#

this.C1List1.HeadingStyle.BackgroundPicture = System.Drawing.Image.FromFile("seaside.bmp");


BackgroundImage Property (C1Combo) - C#

C#

this.C1Combo1.HeadingStyle. BackgroundImage = System.Drawing.Image.FromFile("seaside.bmp");


BackgroundImage Property (C1Combo) - Delphi

Delphi

Self.C1Combo1.HeadingStyle. BackgroundImage:= System.Drawing.Image.FromFile('seaside.bmp');


BackgroundImage Property (C1Combo) - Visual Basic

Visual Basic

Me.C1Combo1.HeadingStyle. BackgroundImage = System.Drawing.Image.FromFile("seaside.bmp")


BackgroundImage Property - Delphi

Delphi

Self.C1List1.HeadingStyle.BackgroundPicture := System.Drawing.Image.FromFile('seaside.bmp');


BackgroundImage Property - Visual Basic

Visual Basic

Me.C1List1.HeadingStyle.BackgroundPicture = System.Drawing.Image.FromFile("seaside.bmp")


C1DataColumn Object - C#

C#

this.C1List1.Columns[0].Caption = “Region”;


C1DataColumn Object - Delphi

Delphi

Self.C1List1.Columns[0].Caption := Region;


C1DataColumn Object - Visual Basic

Visual Basic

Me.C1List1.Columns(0).Caption = “Region”


C1DisplayColumn Object - C#

C#

this.C1List1.Splits[0,0].DisplayColumns[0].Style.ForeColor = System.Drawing.Color.Blue;


C1DisplayColumn Object - Delphi

Delphi

Self.C1List1.Splits(0, 0).DisplayColumns(0).Style.ForeColor := System.Drawing.Color.Blue;


C1DisplayColumn Object - Visual Basic

Visual Basic

Me.C1List1.Splits(0,0).DisplayColumns(0).Style.ForeColor = System.Drawing.Color.Blue


Captions, Headers, and Footers - C#

C#

this.C1List1.Caption = "List Caption";

this.C1List1.Columns[0].Caption = "Column 0 Caption";

this.C1List1.Splits[0].Caption = "Split 0 Caption";


Captions, Headers, and Footers - Delphi

Delphi

Self.C1List1.Caption :='List Caption';

Self.C1List1.Columns[0].Caption := 'Column 0 Caption';

Self.C1List1.Splits[0].Caption := 'Split 0 Caption';


Captions, Headers, and Footers - Visual Basic

Visual Basic

Me.C1List1.Caption = "List Caption"

Me.C1List1.Columns(0).Caption = "Column 0 Caption"

Me.C1List1.Splits(0).Caption = "Split 0 Caption"


CharacterCasing Property - C#

C#

c1combo1.CharacterCasing = CharacterCasing.Lower;


CharacterCasing Property - Delphi

Delphi

begin

c1combo1.CharacterCasing := CharacterCasing.Lower;

end;


CharacterCasing Property - Visual Basic

Visual Basic

c1combo1.CharacterCasing = CharacterCasing.Lower


ClearItems Method - C#

C#

C1List1.ClearItems();


ClearItems Method (C1Combo) - C#

C#

C1Combo1.ClearItems();


ClearItems Method (C1Combo) - Delphi

Delphi

begin

C1Combo1.ClearItems;

end;


ClearItems Method (C1Combo) - Visual Basic

Visual Basic

C1Combo1.ClearItems()


ClearItems Method - Delphi

Delphi

begin

C1List1.ClearItems;

end;


ClearItems Method - Visual Basic

Visual Basic

C1List1.ClearItems()


ClearSelected Method - C#

C#

C1List1.ClearSelected();


ClearSelected Method (C1Combo) - C#

C#

C1Combo1.ClearSelected();


ClearSelected Method (C1Combo) - Delphi

Delphi

begin

C1Combo1.ClearSelected;

end;


ClearSelected Method (C1Combo) - Visual Basic

Visual Basic

C1Combo1.ClearSelected()


ClearSelected Method - Delphi

Delphi

C1List1.ClearSelected;


ClearSelected Method - Visual Basic

Visual Basic

C1List1.ClearSelected()


Column footers - C#

C#

this.C1List1.Columns[0].FooterText = "Footer0";

this.C1List1.Columns[1].FooterText = "Footer1";


Column footers - Delphi

Delphi

Self.C1List1.Columns[0].FooterText := 'Footer0';

Self.C1List1.Columns[1].FooterText := 'Footer1';


Column footers - Visual Basic

Visual Basic

Me.C1List1.Columns(0).FooterText = "Footer0"

Me.C1List1.Columns(1).FooterText = "Footer1"


Context-sensitive Help with CellTips - C#

C#

// General Declarations

C1List.C1DataColumn DescCol;

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

DescCol = this.C1List1.Columns["Description"];

}

private void C1List1_FetchCellTips( System.object sender, C1.Win.C1List.FetchCellTipsEventArgs e) {

e.CellTip = DescCol.CellText(e.Row);

}


Context-sensitive Help with CellTips - Delphi

Delphi

var

DescCol: C1List.C1DataColumn;

procedure Form1_Load(sender: System.object; e: System.EventArgs);

begin

inherited;

DescCol := C1List1.Columns[‘Description’];

end;

procedure C1List1_FetchCellTips(sender: System.object; e: C1.Win.C1List.FetchCellTipsEventArgs)

begin

e.CellTip := DescCol.CellText(e.Row);

end;


Context-sensitive Help with CellTips - Visual Basic

Visual Basic

' General Declarations

Dim DescCol As C1List.C1DataColumn

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

Set DescCol = Me.C1List1.Columns("Description")

End Sub

Private Sub C1List1_FetchCellTips(ByVal sender As System.Object, ByVal e As C1.Win.C1List.FetchCellTipsEventArgs) Handles C1List.FetchCellTips

e.CellTip = DescCol.CellText(e.Row)

End Sub


Creating and Removing Splits - C#

C#

C1List.Split S;

this.C1List1.InsertVerticalSplit(7) // Create a split with index 7;

this.C1List1.RemoveVerticalSplit(5) // Remove the split with index 5;


Creating and Removing Splits - C#2

C#

// set { variable equal to the number of splits in C1List1

variable = this.C1List1.Splits.Count;


Creating and Removing Splits - C#3

C#

for ( n = 0; n <= this.C1List1.Splits.Count – 1; i++); {

Console.WriteLine (this.C1List1.Splits[n].Caption);

}


Creating and Removing Splits - C#4

C#

C1List.Split S;

foreach ( S in this.C1List1.Splits ) {

Console.WriteLine (S.Caption);

}


Creating and Removing Splits - Delphi

Delphi

var

S: C1List.Split;

begin

Self.C1List1.InsertVerticalSplit(7);

Self.C1List1.RemoveVerticalSplit(5);

end;


Creating and Removing Splits - Delphi2

Delphi

begin

variable := Self.C1List1.Splits.Count;

end;


Creating and Removing Splits - Delphi3

Delphi

begin

n := 0;

while (n <= Self.C1List1.Splits.Count) do

begin

Console.WriteLine(Self.C1List1.Splits[n].Caption);

Inc(n);

end;

;

end;


Creating and Removing Splits - Delphi4

Delphi

var

S: C1List.Split;


Creating and Removing Splits - Visual Basic

Visual Basic

Dim S As C1List.Split

Me.C1List1.InsertVerticalSplit(7) ' Create a split with index 7

Me.C1List1.RemoveVerticalSplit(5) ' Remove the split with index 5


Creating and Removing Splits - Visual Basic2

Visual Basic

' Set variable equal to the number of splits in C1List1

variable = Me.C1List1.Splits.Count


Creating and Removing Splits - Visual Basic3

Visual Basic

For n = 0 To Me.C1List1.Splits.Count - 1

Debug.WriteLine (Me.C1List1.Splits(n).Caption)

Next n


Creating and Removing Splits - Visual Basic4

Visual Basic

Dim S As C1List.Split

For Each S In Me.C1List1.Splits

Debug.WriteLine (S.Caption)

Next


Creating and Resizing Splits through User Interaction - C#

C#

this.C1List1.AllowVerticalSplit = true;


Creating and Resizing Splits through User Interaction - C#2

C#

this.C1List1.AllowHorizontalSplit = true;


Creating and Resizing Splits through User Interaction - Delphi

Delphi

Self.C1List1.AllowVerticalSplit := True;


Creating and Resizing Splits through User Interaction - Delphi2

Delphi

Self.C1List1.AllowHorizontalSplit := True;


Creating and Resizing Splits through User Interaction - Visual Basic

Visual Basic

Me.C1List1.AllowVerticalSplit = True


Creating and Resizing Splits through User Interaction - Visual Basic2

Visual Basic

Me.C1List1.AllowHorizontalSplit = True


Creating unbound columns - C#

C#

C1List.C1DataColumn Col = new C1List.C1DataColumn;

this.C1List1.Columns.Insert(0, Col);

Col.Caption = “Unbound”;

this.C1List1.HoldFields();

this. C1List1.Rebind();


Creating unbound columns - C#2

C#

private void c1List1_UnboundColumnFetch(object sender, C1.Win.C1List.UnboundColumnFetchEventArgs e)


Creating unbound columns - Delphi

Delphi

var

Col: C1List.C1DataColumn;

begin

with C1List1 do

begin

Columns.Insert(0, col);

col.Caption := ‘Unbound’;

Splits[0].DisplayColumns[0].Visible := true;

HoldFields;

Revind;

end;

end;


Creating unbound columns - Delphi2

Delphi

procedure C1List1_UnboundColumnFetch(sender: System.Object; e: C1.Win.C1List.UnboundColumnFetchEventArgs);


Creating unbound columns - Visual Basic

Visual Basic

Dim Col As New C1List.C1DataColumn

With Me.C1List1

.Columns.Insert(0, Col)

Col.Caption = "Unbound"

.HoldFields

.ReBind

End With


Creating unbound columns - Visual Basic2

Visual Basic

Private Sub C1List1_UnboundColumnFetch(ByVal sender As Object, ByVal e As_ C1.Win.C1List.UnboundColumnFetchEventArgs)


Customizing the Scrollbars - C#

C#

private void Command1_Click() {

C1List1.VScrollBar.Width = 200;

C1List1.HscrollBar.Height = 200;

}


Customizing the Scrollbars - Delphi

Delphi

procedure Command1_Click;

begin

C1List1.VScrollBar.Width := 200;

C1List1.HscrollBar.Height := 200;

end;


Customizing the Scrollbars - Visual Basic

Visual Basic

Private Sub Command1_Click()

C1List1.VScrollBar.Width = 200

C1List1.HscrollBar.Height = 200

End Sub


DataMode Property - C#

C#

C1.Win.C1List.DataModeEnum dm;

dm = this.C1List1.DataMode ;


DataMode Property (C1Combo) - C#

C#

C1.Win.C1List.DataModeEnum dm;

dm = this.C1Combo1.DataMode ;


DataMode Property (C1Combo) - Delphi

Delphi

var

dm: C1.Win.C1List.DataModeEnum;

begin

dm := Self.C1Combo1.DataMode;

end;


DataMode Property (C1Combo) - Visual Basic

Visual Basic

Dim dm As C1.Win.C1List.DataModeEnum

dm = Me.C1Combo1.DataMode


DataMode Property - Delphi

Delphi

var

dm: C1.Win.C1List.DataModeEnum;

begin

dm := Self.C1List1.DataMode;

end;


DataMode Property - Visual Basic

Visual Basic

Dim dm As C1.Win.C1List.DataModeEnum

dm = Me.C1List1.DataMode


DefColWidth Property - C#

C#

C1List1.DefColWidth = this.C1List1.Splits[0].DisplayColumns[0].Width;


DefColWidth Property (C1Combo) - C#

C#

C1Combo1.DefColWidth = this.C1Combo1.Splits[0].DisplayColumns[0].Width ;


DefColWidth Property (C1Combo) - Delphi

Delphi

begin

C1Combo1.DefColWidth := Self.C1Combo1.Splits[0].DisplayColumns[0].Width;

end;


DefColWidth Property (C1Combo) - Visual Basic

Visual Basic

C1Combo1.DefColWidth = Me.C1Combo1.Splits(0).DisplayColumns(0).Width


DefColWidth Property - Delphi

Delphi

begin

C1List1.DefColWidth := Self.C1List1.Splits[0].DisplayColumns[0].Width;

end;


DefColWidth Property - Visual Basic

Visual Basic

C1List1.DefColWidth = Me.C1List1.Splits(0).DisplayColumns(0).Width


Displaying allowable values as radio buttons - C#

C#

this.C1List1.Columns["Country"].ValueItems.Presentation = PresentationEnum.RadioButton;


Displaying allowable values as radio buttons - C#2

C#

this.C1List1.Columns["Country"].ValueItems.DefaultItem = 5;


Displaying allowable values as radio buttons - Delphi

Delphi

begin

with C1List1.Columns('Country').ValueItems do Presentation := PresentationEnum.RadioButton;

;

end;


Displaying allowable values as radio buttons - Delphi2

Delphi

begin

with C1List1.Columns('Country').ValueItems do

DefaultItem := 5;

end;


Displaying allowable values as radio buttons - Visual Basic

Visual Basic

With Me.C1List1.Columns("Country").ValueItems

.Presentation = PresentationEnum.RadioButton

End With


Displaying allowable values as radio buttons - Visual Basic2

Visual Basic

With Me.C1List1.Columns("Country").ValueItems

.DefaultItem = 5

End With


Displaying background pictures - C#

C#

Font myfont;

this.C1List1.CaptionStyle.BackgroundImage = System.Drawing.Image.FromFile("gradient.bmp");

this.C1List1.CaptionStyle.ForeColor = System.Drawing.Color.White;

myfont = new Font(this.C1List1.CaptionStyle.Font, FontStyle.Bold);

this.C1List1.CaptionStyle.Font = myfont;


Displaying background pictures - C#2

C#

// Give the list a flat appearance and remove row dividers,

// and scroll bars. Assume that the ScaleMode of the ;

// containing form is in pixels.;

this.C1List1.Splits[0].InactiveStyle.ForeColor = System.Drawing.Color.White;

this.C1List1.RowDivider.Style = C1.Win.C1List.LineStyleEnum.None;

this.C1List1.HeadingStyle.Borders.BorderType = C1.Win.C1List.BorderTypeEnum.None;

this.C1List1.ItemHeight = 16;

this.C1List1.HScrollBar.Style = C1.Win.C1List.ScrollBarStyleEnum.Always;

this.C1List1.VScrollBar.Style = C1.Win.C1List.ScrollBarStyleEnum.Always;

//set { the background pattern to be used by data cells

//in the default split (so as not to disturb the Normal;

//style).;

this.C1List1.Splits[0].Style.BackgroundImage = System.Drawing.Image.FromFile("binderpaper.bmp");

this.C1List1.Splits[0].Style.BackgroundPictureDrawMode = C1.Win.C1List.BackgroundPictureDrawModeEnum.Tile;

//Create an empty unbound column on the left to hold

//the binder rings. Remove its dividing lines and set;

//the BackroundBitmap property of its Style object.;

C1.Win.C1List.C1DisplayColumn C;

C = C1List1.Splits[0].DisplayColumns[0];

C.Width = 48;

C.Visible = true;

C.Style.BackgroundImage = System.Drawing.Image.FromFile("binderrings.bmp");

C.HeaderDivider = false;

C.ColumnDivider.Style = C1.Win.C1List.LineStyleEnum.None;

this.C1List1.Col = 0 // Scroll the unbound column;

//into view;

//Use a small corner of the binder ring bitmap as the

//background of the column headers, and adjust the

//font and text color accordingly.;

Font myfont;

C1.Win.C1List.Style S = new C1.Win.C1List.Style();

this.C1List1.HeadingStyle.BackgroundImage = System.Drawing.Image.FromFile("bindercorner.bmp");

this.C1List1.HeadingStyle.BackgroundPictureDrawMode = C1.Win.C1List.BackgroundPictureDrawModeEnum.Tile;

myfont = new Font(S.Font, FontStyle.Bold);

this.C1List1.HeadingStyle.Font = myfont;

this.C1List1.HeadingStyle.ForeColor = System.Drawing.Color.White;


Displaying background pictures - Delphi

Delphi

var

myfont: Font;

begin

with C1List1.CaptionStyle do

begin

BackgroundImage := System.Drawing.Image.FromFile(‘gradient.bmp’);

ForeColor := System.Drawing.Color.White;

myfont := Font.Create(Font, FontStyle.Bold);

Font := myfont;

end;


Displaying background pictures - Delphi2

Delphi

var

C: C1.Win.C1List.C1DisplayColumn;

S: C1.Win.C1List.Style;

myfony: Font;

begin

// Give the list a flat appearance and remove row dividers,

// and scroll bars. Assume that the ScaleMode of the

// containing form is in pixels.

with C1List1 do

begin

Splits[0].InactiveStyle.ForeColor := System.Drawing.Color.White;

RowDivider.Style := C1.Win.C1List.LineStyleEnum.None;

HeadingStyle.Borders.BorderType := C1.Win.C1List.BorderTypeEnum.None;

ItemHeight := 16;

HScrollBar.Style := C1.Win.C1List.ScrollBarStyleEnum.Always;

VScrollBar.Style := C1.Win.C1List.ScrollBarStyleEnum.Always;

end;

// Set the background pattern to be used by data cells

// in the default split (so as not to disturb the Normal

// style).

with Me.C1List1.Splits[0].Style do

begin

BackgroundImage := System.Drawing.Image.FromFile(‘binderpaper.bmp’);

BackgroundPictureDrawMode := C1.Win.C1List.BackgroundPictureDrawModeEnum.Tile;

end;

// Create an empty unbound column on the left to hold

// the binder rings. Remove its dividing lines and set

// the BackroundBitmap property of its Style object.

C := C1List1.Splits[0].DisplayColumns[0];

with C do

begin

Width := 48;

Visible := True;

Style.BackgroundImage := System.Drawing.Image.FromFile(‘binderrings.bmp’);

HeaderDivider := False;

ColumnDivider.Style := C1.Win.C1List.LineStyleEnum.None;

end;

C1List1.Col := 0 // Scroll the unbound column into view

// Use a small corner of the binder ring bitmap as the

// background of the column headers, and adjust the

// font and text color accordingly.

with C1List1.HeadingStyle do

begin

BackgroundImage := System.Drawing.Image.FromFile(‘bindercorner.bmp’)

BackgroundPictureDrawMode = C1.Win.C1List.BackgroundPictureDrawModeEnum.Tile;

myfont := Font.Create(S.Font, FontStyle.Bold);

Font := myfont;

ForeColor := System.Drawing.Color.White;

end;

end;


Displaying background pictures - Visual Basic

Visual Basic

Dim myfont As Font

With Me.C1List1.CaptionStyle

.BackgroundImage = System.Drawing.Image.FromFile("gradient.bmp")

.ForeColor = System.Drawing.Color.White

myfont = New Font(.Font, FontStyle.Bold)

.Font = myfontEnd With


Displaying background pictures - Visual Basic2

Visual Basic

' Give the list a flat appearance and remove row dividers,

' and scroll bars. Assume that the ScaleMode of the

' containing form is in pixels.

With Me.C1List1

.Splits(0).InactiveStyle.ForeColor = System.Drawing.Color.White

.RowDivider.Style = C1.Win.C1List.LineStyleEnum.None

.HeadingStyle.Borders.BorderType = C1.Win.C1List.BorderTypeEnum.None

.ItemHeight = 16

.HScrollBar.Style = C1.Win.C1List.ScrollBarStyleEnum.Always

.VScrollBar.Style = C1.Win.C1List.ScrollBarStyleEnum.Always

End With

' Set the background pattern to be used by data cells

' in the default split (so as not to disturb the Normal

' style).

With Me.C1List1.Splits(0).Style

.BackgroundImage = System.Drawing.Image.FromFile("binderpaper.bmp")

.BackgroundPictureDrawMode = C1.Win.C1List.BackgroundPictureDrawModeEnum.Tile

End With

'Create an empty unbound column on the left to hold

'the binder rings. Remove its dividing lines and set

'the BackroundBitmap property of its Style object.

Dim C As C1.Win.C1List.C1DisplayColumn

C = C1List1.Splits(0).DisplayColumns(0)

With C

.Width = 48

.Visible = True

.Style.BackgroundImage = System.Drawing.Image.FromFile("binderrings.bmp")

.HeaderDivider = False

.ColumnDivider.Style = C1.Win.C1List.LineStyleEnum.None

End With

Me.C1List1.Col = 0 ' Scroll the unbound column

' into view

'Use a small corner of the binder ring bitmap as the

'background of the column headers, and adjust the

'font and text color accordingly.

Dim myfont As Font

Dim S As New C1.Win.C1List.Style()

With Me.C1List1.HeadingStyle

.BackgroundImage = System.Drawing.Image.FromFile("bindercorner.bmp")

.BackgroundPictureDrawMode = C1.Win.C1List.BackgroundPictureDrawModeEnum.Tile

myfont = New Font(S.Font, FontStyle.Bold)

.Font = myfont

.ForeColor = System.Drawing.Color.White

End With


Displaying both text and pictures in a cell - C#

C#

this.C1List1.Columns["Country"].ValueItems.AnnotatePicture = true;


Displaying both text and pictures in a cell - C#2

C#

this.C1List1.Columns["Country"].NumberFormat = "FormatText event";


Displaying both text and pictures in a cell - C#3

C#

private void C1List1_FormatText( object sender, C1.Win.C1List.FormatTextEventArgs e) {

switch (e.Value)

{

case "CAN":

e.Value = "Canada";

break;

case "UK":

e.Value = "United Kingdom";

break;

case "USA":

e.Value = "United States";

break;

case "JPN":

e.Value = "Japan";

break;

case "AUS":

e.Value = "Australia";

break;

}}


Displaying both text and pictures in a cell - Delphi

Delphi

begin

with Self.C1List1.Columns('Country').ValueItems dobegin

AnnotatePicture := True;

end;

end;


Displaying both text and pictures in a cell - Delphi2

Delphi

Self.C1List1.Columns('Country');


Displaying both text and pictures in a cell - Delphi3

Delphi

procedure C1List1_FormatText(sender: System.Object; e: C1.Win.C1List.FormatTextEventArgs);

begin

if e.Value = ‘CAN’ then

e.Value := ‘Canada’

else

if e.Value = ‘UK’ then

e.Value := 'United Kingdom'

else

if e.Value = ‘USA’ then

e.Value:= 'United States'

else

if e.Value = ‘JPN’ then

e.Value := ‘Japan’

else

if e.Value = ‘AUS’ then

e.Value := 'Australia';End;


Displaying both text and pictures in a cell - Visual Basic

Visual Basic

With Me.C1List1.Columns("Country").ValueItems

.AnnotatePicture = True

End With


Displaying both text and pictures in a cell - Visual Basic2

Visual Basic

Me.C1List1.Columns("Country").NumberFormat = "FormatText Event"


Displaying both text and pictures in a cell - Visual Basic3

Visual Basic

Private Sub C1List1_FormatText(ByVal sender As Object, ByVal e As C1.Win.C1List.FormatTextEventArgs) Handles C1List1.FormatText

Select Case e.Value

Case "CAN"

e.Value = "Canada"

Case "UK"

e.Value = "United Kingdom"

Case "USA"

e.Value = "United States"

Case "JPN"

e.Value = "Japan"

Case "AUS"

e.Value = "Australia"

End Select

End Sub


Enabling wordwrap in cells - C#

C#

C1List.C1DisplayColumn C;

foreach ( C in this.C1List1.Splits[0].DisplayColumns ){

C.Style.WrapText = true;

}


Enabling wordwrap in cells - Delphi

Delphi

var

I: Integer;

begin

for I := 0 to C1List1.Splits[0].DisplayColumns.Count – 1 do

C1List1.Splits[0].DisplayColumns[I].WrapText := True;

end;


Enabling wordwrap in cells - Visual Basic

Visual Basic

Dim C As C1List.C1DisplayColumn

For Each C In Me.C1List1.Splits(0).DisplayColumns

C.Style.WrapText = True

Next


Find Method - C#

C#

int found;

found = this.C1List1.Find("n", C1.Win.C1List.MatchCompareEnum.PartiallyEqual, true, 0, 0);

if ((found >= 0) ) {

this.C1List1.SelectedIndex = found;

}


Find Method - Delphi

Delphi

var

found: Integer;

begin

found := Self.C1List1.Find('n', C1.Win.C1List.MatchCompareEnum.PartiallyEqual, True, 0, 0);

if (found >= 0) then

Self.C1List1.SelectedIndex := found;

end;


Find Method - Visual Basic

Visual Basic

Dim found As Integer

found = Me.C1List1.Find("n", C1.Win.C1List.MatchCompareEnum.PartiallyEqual, True, 0, 0)

If (found >= 0) Then

Me.C1List1.SelectedIndex = found

End If


FixColumn Method - C#

C#

C1List1.Splits[0].DisplayColumns["Country"]

.FixColumn(true,0);


FixColumn Method - C#2

C#

C1List1.Splits[0].DisplayColumns["Country"]

.FixColumn(false,2);


FixColumn Method - Delphi

Delphi

begin

C1List1.Splits[0].DisplayColumns['Country'].FixColumn(True, 0);

end;


FixColumn Method - Delphi2

Delphi

begin

C1List1.Splits[0].DisplayColumns['Country'].FixColumn(False, 2);

end;


FixColumn Method - Visual Basic

Visual Basic

C1List1.Splits(0).DisplayColumns("Country")_

.FixColumn(True,0)


FixColumn Method - Visual Basic2

Visual Basic

C1List1.Splits(0).DisplayColumns("Country")_

.FixColumn(False,2)


FixedCols Method - C#

C#

int i;

i = this.C1List1.Splits[0].FixedCols();


FixedCols Method - Delphi

Delphi

var

i: Integer;

begin

i := Self.C1List1.Splits[0].FixedCols;

end;


FixedCols Method - Visual Basic

Visual Basic

Dim i As Integer

i = Me.C1List1.Splits(0).FixedCols()


ForegroundImage Property - C#

C#

this.C1List1.HeadingStyle.ForegroundImage = System.Drawing.Image.FromFile("bell.bmp");


ForegroundImage Property - Delphi

Delphi

Self.C1List1.HeadingStyle.ForegroundImage := System.Drawing.Image.FromFile('bell.bmp');


ForegroundImage Property - Visual Basic

Visual Basic

Me.C1List1.HeadingStyle.ForegroundImage = System.Drawing.Image.FromFile("bell.bmp")


Formatting with a custom event handler - C#

C#

private void C1List1_FormatText( object sender, C1.Win.C1List.FormatTextEventArgs e)


Formatting with a custom event handler - C#2

C#

private void C1List1_FormatText( object sender,_ C1.Win.C1List.FormatTextEventArgs e) {

string result;

if ( e.ColIndex == 0 ) {

// Determine how many X//s

while ( e.Value >= 10)

{

result = result + "X";

e.Value = e.Value - 10;

}

// Append "digits" 1-9

switch (e.Value) { case 1;

result = result + "I";

break;

case 2;

result = result + "II";

break; case 3;

result = result + "III";

break;

case 4;

result = result + "IV";

break;

case 5;

result = result + "V";

break;

case 6;

result = result + "VI";

break;

case 7;

result = result + "VII";

break;

case 8;

result = result + "VIII";

break;

case 9;

result = result + "IX";

break;

}

// Change the actual format

e.Value = result;

}

}


Formatting with a custom event handler - Delphi

Delphi

procedure C1List1_FormatText(sender: System.Object; e: C1.Win.C1List.FormatTextEventArgs);


Formatting with a custom event handler - Delphi2

Delphi

procedure C1List1_FormatText(sender: System.Object; e: C1.Win.C1List.FormatTextEventArgs);

var

S: string;

begin

S := ‘’;

If e.ColIndex = 0 Then

begin

// Determine how many X's;

while e.Value >= 10 do

begin

S := S + 'X';

e.Value := e.Value - 10;

end;

case e.Value of

1: S := S + ‘I’;

2: S := S + ‘II’;

3: S := S + ‘III’;

4: S := S + ‘IV’;

5: S := S + ‘V’;

6: S := S + ‘VI’;

7: S := S + ‘VII’;

8: S := S + ‘VIII’;

9: S := S + ‘IX’;

end;

e.Value := S;

end;

end;


Formatting with a custom event handler - Visual Basic

Visual Basic

Private Sub C1List1_FormatText(ByVal sender As Object, ByVal e As C1.Win.C1List.FormatTextEventArgs) Handles C1List1.FormatText


Formatting with a custom event handler - Visual Basic2

Visual Basic

Private Sub C1List1_FormatText(ByVal sender As Object,_ ByVal e As C1.Win.C1List.FormatTextEventArgs) Handles C1List1.FormatText

Dim result As String

If e.ColIndex = 0 Then

' Determine how many X's

While e.Value >= 10

result = result & "X"

e.Value = e.Value - 10

Wend

' Append "digits" 1-9

Select Case e.Value

Case 1

result = result & "I"

Case 2

result = result & "II"

Case 3

result = result & "III"

Case 4

result = result & "IV"

Case 5

result = result & "V"

Case 6

result = result & "VI"

Case 7

result = result & "VII"

Case 8

result = result & "VIII"

Case 9

result = result & "IX"

End Select

' Change the actual format

e.Value = result

End If

End Sub


Horizontal Scrolling and Fixed Columns - C#

C#

// Hide all columns in Splits[1] except for columns 0 and 1

C1.Win.C1List.C1DisplayColumnCollection Cols;

C1.Win.C1List.C1DisplayColumn C;

Cols = this.C1List1.Splits[1].DisplayColumns;

foreach ( C in Cols) {

C.Visible = false;

}

Cols[0].Visible = true;

Cols[1].Visible = true;

//Configure Splits[1] to display exactly two columns,_

//and disable resizing

this.C1List1.Splits[1].SplitSizeMode = C1.Win.C1List.SizeModeEnum.NumberOfColumns;

this.C1List1.Splits[1].SplitSize = 2;


Horizontal Scrolling and Fixed Columns - C#2

C#

// Make columns 0 and 1 invisible in splits 0 and 2

C1.Win.C1List.C1DisplayColumnCollection Cols;

Cols = this.C1List1.Splits[0].DisplayColumns;

Cols[0].Visible = false;

Cols[1].Visible = false;

Cols = this.C1List1.Splits[2].DisplayColumns;

Cols[0].Visible = false;

Cols[1].Visible = false;


Horizontal Scrolling and Fixed Columns - Delphi

Delphi

var

C: C1.Win.C1List.C1DisplayColumn;

Cols: C1.Win.C1List.C1DisplayColumnCollection;

I: Integer;

begin

// Hide all columns in Splits(1) except for columns 0 and 1

Cols := Self.C1List1.Splits[1].DisplayColumns;

for I := 0 to Cols.Count – 1 do

Cols[0].Visible := False;

Cols[0].Visible := True;

Cols[1].Visible := True;

//Configure Splits(1) to display exactly two columns,_

//and disable resizing

with C1List1.Splits[1] do

begin

SplitSizeMode := C1.Win.C1List.SizeModeEnum.NumberOfColumns;

SplitSize := 2;

end;

end;


Horizontal Scrolling and Fixed Columns - Delphi2

Delphi

var

Cols: C1.Win.C1List.C1DisplayColumnCollection;

begin

Cols := Self.C1List1.Splits(0).DisplayColumns;

Cols[0).Visible := False;

Cols[1].Visible := False;

Cols := Self.C1List1.Splits(2).DisplayColumns;

Cols[0].Visible := False;

Cols[1].Visible := False;

end;


Horizontal Scrolling and Fixed Columns - Visual Basic

Visual Basic

' Hide all columns in Splits(1) except for columns 0 and 1

Dim Cols As C1.Win.C1List.C1DisplayColumnCollection

Dim C As C1.Win.C1List.C1DisplayColumn

Cols = Me.C1List1.Splits(1).DisplayColumns

For Each C In Cols

C.Visible = False

Next C

Cols(0).Visible = True

Cols(1).Visible = True

'Configure Splits(1) to display exactly two columns,_
 'and disable resizing

With Me.C1List1.Splits(1)

.SplitSizeMode = C1.Win.C1List.SizeModeEnum.NumberOfColumns

.SplitSize = 2

End With


Horizontal Scrolling and Fixed Columns - Visual Basic2

Visual Basic

' Make columns 0 and 1 invisible in splits 0 and 2

Dim Cols As C1.Win.C1List.C1DisplayColumnCollection

Cols = Me.C1List1.Splits(0).DisplayColumns

Cols(0).Visible = False

Cols(1).Visible = False

Cols = Me.C1List1.Splits(2).DisplayColumns

Cols(0).Visible = False

Cols(1).Visible = False


Implementing multiple unbound columns - C#

C#

Data.DataTable dtCopy //Will be used as the Copy;

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

dtCopy = this.DsRectangle1.Tables[0].Copy();

}

private void C1List1_UnboundColumnFetch( System.object sender, C1.Win.C1List.UnboundColumnFetchEventArgs e) {

switch (this.c1List1.Columns[e.Col].Caption)

{

case "Area":

//Calculate “Area” column of the list

e.Value = dtCopy.Rows[e.Row][“Length”] *

dtCopy.Rows[e.Row][ “Width”]；

break;

case "Perimeter":

//Calculate “Perimeter” column of the list

e.Value = 2 *

(dtCopy.Rows[e.Row][ “Length”] + dtCopy.Rows[e.Row][“Width”])

break;

}

}


Implementing multiple unbound columns - Delphi

Delphi

dtCopy: Data.DataTable;

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

begin

dtCopy := DsRectangle1.Tables[0].Copy;

End Sub

procedure C1List1_UnboundColumnFetch(sender: System.Object; e: C1.Win.C1List.UnboundColumnFetchEventArgs);

begin

if C1List1.Columns(Col).Caption = ‘Area’ then

begin

e.value := dtCopy.Rows[e.Row].Item[‘Length’] *_

dtCopy.Rows[e.Row].Item[‘Width’];

end

else

begin

if C1List1.Columns(Col).Caption = ‘Perimeter’ then

begin

e.value := 2 * dtCopy.Rows[e.Row].Item[‘Length’] + dtCopy.Rows[e.Row].Item[‘Width’];

end;

end;


Implementing multiple unbound columns - Visual Basic

Visual Basic

Dim dtCopy As Data.DataTable 'Will be used as the Copy

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e_ As System.EventArgs) Handles MyBase.Load

dtCopy = Me.DsRectangle1.Tables(0).Copy()

End Sub

Private Sub C1List1_UnboundColumnFetch(ByVal sender As System.Object, ByVal e As C1.Win.C1List.UnboundColumnFetchEventArgs) Handles C1List1.UnboundColumnFetch

Select Case Me.C1List1.Columns(e.Col).Caption

Case “Area”

‘Calculate “Area” column of the list

e.Value = dtCopy.Rows(e.Row).Item(“Length”) *_

dtCopy.Rows(e.Row).Item(“Width”)

Case “Perimeter”

‘Calculate “Perimeter” column of the list

e.Value = 2 * _

(dtCopy.Rows(e.Row).Item(“Length”) + _

dtCopy.Rows(e.Row).Item(“Width”))

End Select

End Sub


InsertItem Method - C#

C#

C1List1.InsertItem("c1;c2;c3", 2);


InsertItem Method (C1Combo) - C#

C#

C1Combo1.InsertItem("c1;c2;c3", 2);


InsertItem Method (C1Combo) - Delphi

Delphi

begin

C1Combo1.InsertItem('c1;c2;c3', 2);

end;


InsertItem Method (C1Combo) - Visual Basic

Visual Basic

C1Combo1.InsertItem("c1;c2;c3", 2)


InsertItem Method - Delphi

Delphi

begin

C1List1.InsertItem('c1;c2;c3', 2);

end;


InsertItem Method - Visual Basic

Visual Basic

C1List1.InsertItem("c1;c2;c3", 2)


ItemHeight Property - C#

C#

this.C1List1.ItemHeight = 0;

this.C1List1.ItemHeight = this.C1List1.ItemHeight * 2;


ItemHeight Property (C1Combo) - C#

C#

this.C1Combo1.ItemHeight = 0;

this.C1Combo1.ItemHeight = this.C1List1.ItemHeight * 2;


ItemHeight Property (C1Combo) - Delphi

Delphi

Self.C1Combo1.ItemHeight := 0;

Self.C1Combo1.ItemHeight := Me.C1List1.ItemHeight * 2;


ItemHeight Property (C1Combo) - Visual Basic

Visual Basic

Me.C1Combo1.ItemHeight = 0

Me.C1Combo1.ItemHeight = Me.C1List1.ItemHeight * 2


ItemHeight Property - Delphi

Delphi

Self.C1List1.ItemHeight := 0;

Self.C1List1.ItemHeight := Me.C1List1.ItemHeight * 2;


ItemHeight Property - Visual Basic

Visual Basic

Me.C1List1.ItemHeight = 0

Me.C1List1.ItemHeight = Me.C1List1.ItemHeight * 2


Modifying a style property directly - C#

C#

this.C1List1.CaptionStyle.Font = new Font(this.C1List1.CaptionStyle.Font, FontStyle.Bold);

this.C1List1.Styles["Caption"].Font = new Font(this.C1List1.Styles("Caption").Font, FontStyle.Bold);


Modifying a style property directly - Delphi

Delphi

Self.C1List1.CaptionStyle.Font.Bold := True;

Self.C1List1.Styles['Caption'].Font.Bold := True;;


Modifying a style property directly - Visual Basic

Visual Basic

Me.C1List1.CaptionStyle.Font = New Font(Me.C1List1.CaptionStyle.Font, FontStyle.Bold)

Me.C1List1.Styles("Caption").Font = New Font(Me.C1List1.Styles("Caption").Font, FontStyle.Bold)


Modifying named styles - C#

C#

this.C1List1.Styles["Heading"].HorizontalAlignment = AlignHorzEnum.Center;


Modifying named styles - Delphi

Delphi

Self.C1List1.Styles['Heading'];


Modifying named styles - Visual Basic

Visual Basic

Me.C1List1.Styles("Heading").HorizontalAlignment = AlignHorzEnum.Center


Moving Columns at Run-Time - C#

C#

C1List.C1DisplayColumn dc;

dc = this.C1List1.Splits[0].DisplayColumns[1];

this.C1List1.Splits[0].DisplayColumns.RemoveAt(1);

this.C1List1.Splits[0].DisplayColumns.Insert (0, dc);


Moving Columns at Run-Time - Delphi

Delphi

begin

dc := Self.C1List1.Splits(0).DisplayColumns[ 1];

Self.C1List1.Splits[0].DisplayColumns.RemoveAt(1);

Self.C1List1.Splits[0].DisplayColumns.Insert(0, dc);

end;


Moving Columns at Run-Time - Visual Basic

Visual Basic

Dim dc as C1List.C1DisplayColumn

dc = Me.C1List1.Splits(0).DisplayColumns.Item(1)

Me.C1List1.Splits(0).DisplayColumns.RemoveAt(1)

Me.C1List1.Splits(0).DisplayColumns.Insert (0, dc)


Multiple-line headers and footers - C#

C#

this.C1List1.Splits[0].ColumnCaptonHeight =

this.C1List1.Splits[0].ColumnCaptonHeight * 2;

this.C1List1.Columns[0].Caption = "First line \n" + "Second line";


Multiple-line headers and footers - Delphi

Delphi

begin

with C1List1 do

begin

Splits[0].ColumnCaptionHeight := Splits[0].ColumnCaptionHeight * 2;

Columns[0].Caption := ‘First line’#13#10’Second line’;

end;

end;


Multiple-line headers and footers - Visual Basic

Visual Basic

With Me.C1List1

.Splits(0).ColumnCaptionHeight = _

.Splits(0).ColumnCaptionHeight * 2

.Columns(0).Caption = "First line" + vbNewLine+ "Second line"

End With


Namespaces - C#

C#

C1.Win.C1List.C1List List;


Namespaces - C#2

C#

using C1Split = C1.Win.C1List.Split;

using MySplit = MyProject.Split;

C1Split c1;

MySplit c2;


Namespaces - C#3

C#

using C1.Win.C1List ;


Namespaces - Delphi

Delphi

List: C1.Win.C1List.C1List;


Namespaces - Delphi2

Delphi

uses C1.Win.C1List.Split, MyProject.Split;

var

c2: MySplit;

c1: C1Split;


Namespaces - Delphi3

Delphi

uses C1.Win.C1List;


Namespaces - Visual Basic

Visual Basic

Dim List As C1.Win.C1List.C1List


Namespaces - Visual Basic2

Visual Basic

Imports C1Split = C1.Win.C1List.Split
Imports MySplit = MyProject.Split

Dim c1 As C1Split
Dim c2 As MySplit


Namespaces - Visual Basic3

Visual Basic

imports C1.Win.C1List


Numeric field formatting - C#

C#

this.C1List1.Columns["HireDate"].NumberFormat = "Medium Date";


Numeric field formatting - Delphi

Delphi

Self.C1List1.Columns('HireDate');


Numeric field formatting - Visual Basic

Visual Basic

Me.C1List1.Columns("HireDate").NumberFormat = "Medium Date"


Owner-drawn Cells - C#

C#

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

this.OleDbDataAdapter1.Fill(this.DataSet11);

//OwnerDraw the first column

this.C1List1.Splits[0].DisplayColumns[0].OwnerDraw =true

this.C1List1.Splits[0].DisplayColumns[0].Width = 2

* this.C1List1.Splits[0].DisplayColumns[0].Width;

}


Owner-drawn Cells - C#2

C#

private void C1List1_OwnerDrawCell( object sender, C1.Win.C1List.OwnerDrawCellEventArgs e) {

if ( e.Col == 0 ) {

//Create a gradient brush, blue to red

pt1, pt2 Point;

System.Drawing.Drawing2D.LinearGradientBrush lineGrdBrush;

Font ft;

Brush br;

pt1 = new Point(e.CellRect.X, e.CellRect.Y);

pt2 = new Point(e.CellRect.Right, e.CellRect.Y);

lineGrdBrush = new System.Drawing.Drawing2D.LinearGradientBrush(pt1, pt2, Color.Blue, Color.Red);

// fill the cell rectangle with the gradient

e.Graphics.FillRectangle(lineGrdBrush, e.CellRect);

//Draw string

ft = new Font("Arial", 8.25);

br = new SolidBrush(Color.White);

e.Graphics.DrawString(e.Text, ft, br, e.CellRect.X, e.CellRect.Y);

lineGrdBrush.Dispose();

ft.Dispose();

br.Dispose();

//Let the list know that we handled the event

e.Handled = true;

}

}


Owner-drawn Cells - Delphi

Delphi

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

begin

Self.OleDbDataAdapter1.Fill(Me.DataSet11);

// OwnerDraw the first column;

Self.C1List1.Splits[0].DisplayColumns[0].OwnerDraw := True;

Self.C1List1.Splits[0].DisplayColumns[0].Width := 2 * Me.C1List1.Splits[0].DisplayColumns[0].Width;

end;


Owner-drawn Cells - Delphi2

Delphi

procedure C1List1_OwnerDrawCell(sender: System.Object; e: C1.Win.C1List.OwnerDrawCellEventArgs);

var

pt1, pt2: Point;

lineGrdBrush: System.Drawing.Drawing2D.LinearGradientBrush;

ft: Font;

br: Brush;

begin

If e.Col = 0 Then

begin

// Create a gradient brush, blue to red;

pt1 := Point.Create(e.CellRect.X, e.CellRect.Y);

pt2 := Point.Create(e.CellRect.Copy, e.CellRect.Y);

lineGrdBrush := System.Drawing.Drawing2D.LinearGradientBrush.Create(pt1, pt2, Color.Blue, Color.Red);

// fill the cell rectangle with the gradient;

e.Graphics.FillRectangle(lineGrdBrush, e.CellRect);

// Draw string;

ft := Font.Create('Arial');

br := SolidBrush.Create(Color.White);

e.Graphics.DrawString(e.Text, ft, br, e.CellRect.X, e.CellRect.Y);

lineGrdBrush.Dispose();

ft.Dispose;

br.Dispose;

// Let the list know that we handled the event;

e.Handled := True;

end;

end;


Owner-drawn Cells - Visual Basic

Visual Basic

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

Me.OleDbDataAdapter1.Fill(Me.DataSet11)

'OwnerDraw the first column

Me.C1List1.Splits(0).DisplayColumns(0).OwnerDraw_

= True

Me.C1List1.Splits(0).DisplayColumns(0).Width = 2_

* Me.C1List1.Splits(0).DisplayColumns(0).Width

End Sub


Owner-drawn Cells - Visual Basic2

Visual Basic

Private Sub C1List1_OwnerDrawCell(ByVal sender As Object, ByVal e As C1.Win.C1List.OwnerDrawCellEventArgs) Handles C1List1.OwnerDrawCell

If e.Col = 0 Then

'Create a gradient brush, blue to red

Dim pt1, pt2 As Point

Dim lineGrdBrush As System.Drawing.Drawing2D.LinearGradientBrush

Dim ft As Font

Dim br As Brush

pt1 = New Point(e.CellRect.X, e.CellRect.Y)

pt2 = New Point(e.CellRect.Right, e.CellRect.Y)

lineGrdBrush = New System.Drawing.Drawing2D.LinearGradientBrush(pt1, pt2, Color.Blue, Color.Red)

' fill the cell rectangle with the gradient

e.Graphics.FillRectangle(lineGrdBrush, e.CellRect)

'Draw string

ft = New Font("Arial", 8.25)

br = New SolidBrush(Color.White)

e.Graphics.DrawString(e.Text, ft, br, e.CellRect.X, e.CellRect.Y)

lineGrdBrush.Dispose()

ft.Dispose()

br.Dispose()

'Let the list know that we handled the event

e.Handled = True

End If

End Sub


ReadOnly Property (C1Combo) - C#

C#

c1Combo1.Readonly = true;


ReadOnly Property (C1Combo) - Delphi

Delphi

c1Combo1.ReadOnly := true;


ReadOnly Property (C1Combo) - Visual Basic

Visual Basic

c1Combo1.ReadOnly = True


Referencing Splits and their Properties - C#

C#

// Read the zero-based index of the current split

Variable = this.C1List1.Split;

// set { focus to the split with an index equal to Variable%

this.C1List1.Split = Variable;


Referencing Splits and their Properties - Delphi

Delphi

begin

Variable := Self.C1List1.Split;

Self.C1List1.Split := Variable;

end;


Referencing Splits and their Properties - Visual Basic

Visual Basic

' Read the zero-based index of the current split

Variable = Me.C1List1.Split

' Set focus to the split with an index equal to Variable%

Me.C1List1.Split = Variable


RemoveItem Method - C#

C#

C1List1.RemoveItem(1);


RemoveItem Method (C1Combo) - C#

C#

C1Combo1.RemoveItem(1);


RemoveItem Method (C1Combo) - Delphi

Delphi

begin

C1Combo1.RemoveItem(1);

end;


RemoveItem Method (C1Combo) - Visual Basic

Visual Basic

C1Combo1.RemoveItem(1)


RemoveItem Method - Delphi

Delphi

begin

C1List1.RemoveItem(1);

end;


RemoveItem Method - Visual Basic

Visual Basic

C1List1.RemoveItem(1)


Removing members - C#

C#

// Remove the Split object with index 1

this.C1List1.Columns[0].ValueItems.Values.RemoveAt(1);


Removing members - Delphi

Delphi

begin

Self.C1List1.Columns[0].ValueItems.Values.RemoveAt(1);

end;


Removing members - Visual Basic

Visual Basic

' Remove the Split object with index 1

Me.C1List1.Columns(0).ValueItems.Values.RemoveAt(1)


Row Height and Word Wrap - C#

C#

this.C1List1.ItemHeight = 3 * this.C1List1.ItemHeight;


Row Height and Word Wrap - Delphi

Delphi

Self.C1List1.ItemHeight := 3 * Self.C1List1.ItemHeight;


Row Height and Word Wrap - Visual Basic

Visual Basic

Me.C1List1.ItemHeight = 3 * Me.C1List1.ItemHeight


Selecting Columns- C#

C#

C1List.C1DataColumn dc;

dc = this.C1List1.SelectedCols[0];

this.C1List1.Splits[0].DisplayColumns[dc].Style.ForeColor = System.Drawing.Color.Red;


Selecting Columns- Delphi

Delphi

var

_: System.Object;

dc: C1List.C1DataColumn;

begin

dc := C1List1.SelectedCols[0];

Self.C1List1.Splits[0].DisplayColumns.Item[dc].Style.ForeColor := System.Drawing.Color.Red;

end;


Selecting Columns- Visual Basic

Visual Basic

Dim dc as C1List.C1DataColumn

dc = Me.C1List1.SelectedCols(0)

Me.C1List1.Splits(0).DisplayColumns.Item(dc).Style.ForeColor = System.Drawing.Color.Red


SetAddItemData Method - C#

C#

C1List1.SetAddItemData(1, 0, "new string ");


SetAddItemData Method - Delphi

Delphi

begin

C1List1.SetAddItem(1, 0, 'new string ');

end;


SetAddItemData Method - Visual Basic

Visual Basic

C1List1.SetAddItemData(1, 0, "New String")


Sizing and Scaling Splits - C#

C#

this.C1List1.InsertHorizontalSplit(0) //Create Split on the left;

this.C1List1.InsertHorizontalSplit(0) //Create another;


Sizing and Scaling Splits - C#2

C#

this.C1List1.Splits[0].SplitSize = 1 // Change relative size to 1;

this.C1List1.Splits[1].SplitSize = 2 // Change relative size to 2;

this.C1List1.Splits[2].SplitSize = 3 // Change relative size to 3;


Sizing and Scaling Splits - C#3

C#

this.C1List1.Splits[0].SplitSizeMode = C1.Win.C1List.SizeModeEnum.Scalable;

this.C1List1.Splits[0].SplitSize = 1;

this.C1List1.Splits[1].SplitSizeMode = C1.Win.C1List.SizeModeEnum.Exact;

this.C1List1.Splits[1].SplitSize = 250;

this.C1List1.Splits[2].SplitSizeMode = C1.Win.C1List.SizeModeEnum.Scalable;

this.C1List1.Splits[2].SplitSize = 2;


Sizing and Scaling Splits - Delphi

Delphi

Self.C1List1.InsertHorizontalSplit(0) // Create Split on the left;

Self.C1List1.InsertHorizontalSplit(0) // Create another;


Sizing and Scaling Splits - Delphi2

Delphi

Self.C1List1.Splits(0).SplitSize := 1 // Change relative size to 1;

Self.C1List1.Splits(1).SplitSize := 2 // Change relative size to 2;

Self.C1List1.Splits(2).SplitSize := 3 // Change relative size to 3;


Sizing and Scaling Splits - Delphi3

Delphi

Self.C1List1.Splits[0].SplitSizeMode := C1.Win.C1List.SizeModeEnum.Scalable;

Self.C1List1.Splits[0].SplitSize := 1;

Self.C1List1.Splits[1].SplitSizeMode := C1.Win.C1List.SizeModeEnum.Exact;

Self.C1List1.Splits[1].SplitSize := 250;

Self.C1List1.Splits[2].SplitSizeMode := C1.Win.C1List.SizeModeEnum.Scalable;

Self.C1List1.Splits[2].SplitSize := 2;


Sizing and Scaling Splits - Visual Basic

Visual Basic

Me.C1List1.InsertHorizontalSplit(0) 'Create Split on the left

Me.C1List1.InsertHorizontalSplit(0) 'Create another


Sizing and Scaling Splits - Visual Basic2

Visual Basic

Me.C1List1.Splits(0).SplitSize = 1 ' Change relative size to 1

Me.C1List1.Splits(1).SplitSize = 2 ' Change relative size to 2

Me.C1List1.Splits(2).SplitSize = 3 ' Change relative size to 3


Sizing and Scaling Splits - Visual Basic3

Visual Basic

Me.C1List1.Splits(0).SplitSizeMode = C1.Win.C1List.SizeModeEnum.Scalable

Me.C1List1.Splits(0).SplitSize = 1

Me.C1List1.Splits(1).SplitSizeMode = C1.Win.C1List.SizeModeEnum.Exact

Me.C1List1.Splits(1).SplitSize = 250

Me.C1List1.Splits(2).SplitSizeMode = C1.Win.C1List.SizeModeEnum.Scalable

Me.C1List1.Splits(2).SplitSize = 2


SortDirEnum Enumeration - C#

C#

//sort the “Country” column in the ascending order

this.c1Combo1.Sort(“Country”, C1.Win.C1List.SortDirEnum.ASC);


SortDirEnum Enumeration (C1Combo) - C#

C#

//sort the “Country” column in the ascending order

this.c1Combo1.Sort(“Country”, C1.Win.C1List.SortDirEnum.ASC);


SortDirEnum Enumeration (C1Combo) - Delphi

Delphi

begin

Self.c1Combo1.Sort(Country, C1.Win.C1List.SortDirEnum.ASC);

end;


SortDirEnum Enumeration (C1Combo) - Visual Basic

Visual Basic

'sort the “Country” column in the ascending order

Me.c1Combo1.Sort(“CounTry”, C1.Win.C1List.SortDirEnum.ASC)


SortDirEnum Enumeration - Delphi

Delphi

begin

//sort the “Country” column in the ascending order

Self.c1Combo1.Sort(Country, C1.Win.C1List.SortDirEnum.ASC);

end;


SortDirEnum Enumeration - Visual Basic

Visual Basic

'sort the “Country” column in the ascending order

Me.c1Combo1.Sort(“CounTry”, C1.Win.C1List.SortDirEnum.ASC)


Specifying text-to-picture translations - C#

C#

C1.Win.C1List.ValueItem Item;

C1.Win.C1List.ValueItem Item = new C1.Win.C1List.ValueItem();

C1.Win.C1List.ValueItemCollection values = this.c1List1.Columns[0].ValueItems.Values;

Item.Value = "CAN";

Item.DisplayValue = System.Drawing.Image.FromFile("canada.bmp");

values.Add(Item);

Item = new C1.Win.C1List.ValueItem();

Item.Value = "UK";

Item.DisplayValue = System.Drawing.Image.FromFile("uk.bmp");

values.Add(Item);

Item = new C1.Win.C1List.ValueItem();

Item.Value = "USA";

Item.DisplayValue = System.Drawing.Image.FromFile("usa.bmp");

values.Add(Item);

Item = new C1.Win.C1List.ValueItem();

Item.Value = "JPN";

Item.DisplayValue = System.Drawing.Image.FromFile("japan.bmp");

values.Add(Item);

Item = new C1.Win.C1List.ValueItem();

Item.Value = "AUS";

Item.DisplayValue = System.Drawing.Image.FromFile("australia.bmp");

values.Add(Item);

this.c1List1.Columns[0].ValueItems.Translate = true;


Specifying text-to-picture translations - Delphi

Delphi

var

Item: C1.Win.C1List.ValueItem;

begin

with C1List1.Columns[‘Country’].ValueItems.Values do

begin

Item.value := ‘CAN’;

Item.DisplayValue := System.Drawing.Image.FromFile(‘canada.bmp’);

Add(Item);

Item.value := ‘UK’;

Item.DisplayValue := System.Drawing.Image.FromFile(‘uk.bmp’);

Add(Item);

Item.value := ‘USA’;

Item.DisplayValue := System.Drawing.Image.FromFile(‘usa.bmp’);

Add(Item);

Item.value := ‘JPN’;

Item.DisplayValue := System.Drawing.Image.FromFile(‘japan.bmp’);

Add(Item);

Item.value := ‘AUS’;

Item.DisplayValue := System.Drawing.Image.FromFile(‘australia.bmp’);

Add(Item);

this.C1List1.Columns(‘Country’).ValueItems.Translate := true;

end;

end;


Specifying text-to-picture translations - Visual Basic

Visual Basic

Dim Item As C1.Win.C1List.ValueItem

With Me.C1List1.Columns("Country").ValueItems.Values

Item = new C1.Win.C1List.ValueItem()

Item.Value = "CAN"

Item.DisplayValue = _

System.Drawing.Image.FromFile("canada.bmp")

.Add(Item)

Item = new C1.Win.C1List.ValueItem()

Item.Value = "UK"

Item.DisplayValue = _

System.Drawing.Image.FromFile("uk.bmp")

.Add(Item)

Item = new C1.Win.C1List.ValueItem()

Item.Value = "USA"

Item.DisplayValue = _

System.Drawing.Image.FromFile("usa.bmp")

.Add(Item)

Item = new C1.Win.C1List.ValueItem()

Item.Value = "JPN"

Item.DisplayValue = System.Drawing.Image.FromFile("japan.bmp")

.Add(Item)

Item = new C1.Win.C1List.ValueItem()

Item.Value = "AUS"

Item.DisplayValue = System.Drawing.Image.FromFile("australia.bmp")

.Add(Item)

Me.C1List1.Columns("Country").ValueItems.Translate = True

End With


Specifying text-to-text translations - C#

C#

C1List.ValueItem Item;

C1.Win.C1List.ValueItem Item = new C1.Win.C1List.ValueItem();

C1.Win.C1List.ValueItemCollection values = this.c1List1.Columns[0].ValueItems.Values;

Item.Value = "CAN";

Item.DisplayValue = "Canada";

values.Add(Item);

Item = new C1.Win.C1List.ValueItem();

Item.Value = "UK";

Item.DisplayValue = "United Kingdom";

values.Add(Item);

Item = new C1.Win.C1List.ValueItem();

Item.Value = "USA";

Item.DisplayValue = "United States";

values.Add(Item);

Item = new C1.Win.C1List.ValueItem();

Item.Value = "JPN";

Item.DisplayValue = "Japan";

values.Add(Item);

Item = new C1.Win.C1List.ValueItem();

Item.Value = "AUS";

Item.DisplayValue = "Australia";

values.Add(Item);

this.c1List1.Columns[0].ValueItems.Translate = true;


Specifying text-to-text translations - Delphi

Delphi

var

Item: C1List.ValueItem;

begin

with C1List1.Columns[‘Country’].ValueItems.Values do

begin

Item.value := ‘CAN’;

Item.DisplayValue := ‘Canada’;

Add(Item);

Item.value := ‘UK’;

Item.DisplayValue := ‘United Kingdom’;

Add(Item);

Item.value := ‘USA’;

Item.DisplayValue := ‘United States’;

Add(Item);

Item.value := ‘JPN’;

Item.DisplayValue := ‘Japan’;

Add(Item);

Item.value := ‘AUS’;

Item.DisplayValue := ‘Australia’;

Add(Item);

this.C1List1.Columns[‘Country’].ValueItems.Translate := true;

end;

end;


Specifying text-to-text translations - Visual Basic

Visual Basic

Dim Item As C1List.ValueItem

With Me.C1List1.Columns("Country").ValueItems.Values

Item = New C1.Win.C1List.ValueItem()

Item.Value = "CAN"

Item.DisplayValue = "Canada"

.Add(Item)

Item = New C1.Win.C1List.ValueItem()

Item.Value = "UK"

Item.DisplayValue = "United Kingdom"

.Add(Item)

Item = New C1.Win.C1List.ValueItem()

Item.Value = "USA"

Item.DisplayValue = "United States"

.Add(Item)

Item = New C1.Win.C1List.ValueItem()

Item.Value = "JPN"

Item.DisplayValue = "Japan"

.Add(Item)

Item = New C1.Win.C1List.ValueItem()

Item.Value = "AUS"

Item.DisplayValue = "Australia"

.Add(Item)

Me.C1List1.Columns("Country").ValueItems.Translate =

True

End With


Split Matrix Notation - C#

C#

this.C1List1.Splits [3,2].Style.ForeColor = System.Drawing.Color.Blue;


Split Matrix Notation - C#2

C#

this.C1List1.Splits[2].Style.ForeColor = System.Drawing.Color.Blue ;


Split Matrix Notation - Delphi

Delphi

Self.C1List1.Splits[3,2].Style.ForeColor := System.Drawing.Color.Blue;


Split Matrix Notation - Delphi2

Delphi

Self.C1List1.Splits[2].Style.ForeColor := System.Drawing.Color.Blue;


Split Matrix Notation - Visual Basic

Visual Basic

Me.C1List1.Splits.Item(3,2).Style.ForeColor = System.Drawing.Color.Blue


Split Matrix Notation - Visual Basic2

Visual Basic

Me.C1List1.Splits(2).Style.ForeColor = System.Drawing.Color.Blue


Split Object - C#

C#

this.C1List1.Splits[0].Caption = “Split00”;


Split Object - Delphi

Delphi

Self.C1List1.Splits[0].Caption := Split00;


Split Object - Visual Basic

Visual Basic

Me.C1List1.Splits(0).Caption = “Split00”


Splits Property - C#

C#

this.C1List.Splits[2].SpringMode = true;


Splits Property (C1Combo) - C#

C#

this.C1Combo1.Splits[2].SpringMode = true;


Splits Property (C1Combo) - C#2

C#

this.C1Combo1.Splits[“ThirdSplit”].SpringMode = true;


Splits Property (C1Combo) - C#3

C#

this.C1Combo1.Splits[2,0].SpringMode = true;


Splits Property (C1Combo) - Delphi

Delphi

Self.C1Combo1.Splits[2].SpringMode := True;


Splits Property (C1Combo) - Delphi2

Delphi

Self.C1Combo1.Splits[‘ThirdSplit’].SpringMode := True;


Splits Property (C1Combo) - Delphi3

Delphi

Self.C1Combo1.Splits[2, 0].SpringMode := true;


Splits Property (C1Combo) - Visual Basic

Visual Basic

Me.C1Combo1.Splits(2).SpringMode = True


Splits Property (C1Combo) - Visual Basic2

Visual Basic

Me.C1Combo1.Splits(“ThirdSplit”).SpringMode = True


Splits Property (C1Combo) - Visual Basic3

Visual Basic

Me.C1Combo1.Splits(2, 0).SpringMode = true


Splits Property - C#2

C#

this.C1List.Splits[ “ThirdSplit”].SpringMode = true;


Splits Property - C#3

C#

this.C1List.Splits[2,0].SpringMode = true;


Splits Property - Delphi

Delphi

Self.C1List.Splits[2].SpringMode := True;


Splits Property - Delphi2

Delphi

Self.C1List.Splits[“ThirdSplit”].SpringMode := True;


Splits Property - Delphi3

Delphi

Self.C1List.Splits[2, 0].SpringMode := true;


Splits Property - Visual Basic

Visual Basic

Me.C1List.Splits(2).SpringMode = True


Splits Property - Visual Basic2

Visual Basic

Me.C1List.Splits(“ThirdSplit”).SpringMode = True


Splits Property - Visual Basic3

Visual Basic

Me.C1List.Splits(2, 0).SpringMode = true


Style Object - C#

C#

this.C1List1.Styles[“Normal”].Backcolor = System.Drawing.Color.Gray;


Style Object - Delphi

Delphi

Self.C1List1.Styles[Normal].Backcolor := System.Drawing.Color.Gray;


Style Object - Visual Basic

Visual Basic

Me.C1List1.Styles(“Normal”).Backcolor = System.Drawing.Color.Gray


Three-dimensional versus Flat Display - C#

C#

this.C1List1.RowDivider.Style = LineStyleEnum.Inset;


Three-dimensional versus Flat Display - C#2

C#

C1List.C1DisplayColumn C;

foreach ( C in this.C1List1.Splits[0].DisplayColumns )

C.ColumnDivider.Style = LineStyleEnum.Inset;


Three-dimensional versus Flat Display - C#3

C#

this.C1List1.BackColor = System.Drawing.Color.Gray;


Three-dimensional versus Flat Display - Delphi

Delphi

Self.C1List1.RowDivider.Style := LineStyleEnum.Inset;


Three-dimensional versus Flat Display - Delphi2

Delphi

var

C: C1List.C1DisplayColumn;


Three-dimensional versus Flat Display - Delphi3

Delphi

Self.C1List1.BackColor := System.Drawing.Color.Gray;


Three-dimensional versus Flat Display - Visual Basic

Visual Basic

Me.C1List1.RowDivider.Style = LineStyleEnum.Inset


Three-dimensional versus Flat Display - Visual Basic2

Visual Basic

Dim C As C1List.C1DisplayColumn

For Each C In Me.C1List1.Splits(0).DisplayColumns

C.ColumnDivider.Style = LineStyleEnum.Inset

Next


Three-dimensional versus Flat Display - Visual Basic3

Visual Basic

Me.C1List1.BackColor = System.Drawing.Color.Gray


Tutorial 1 - Binding C1List to a DataSet - C#

C#

this.OleDbDataAdapter1.Fill(this.DsComposer1) ;


Tutorial 1 - Binding C1List to a DataSet - Delphi

Delphi

Self.OleDbDataAdapter1.Fill(Me.DsComposer1);


Tutorial 1 - Binding C1List to a DataSet - Visual Basic

Visual Basic

Me.OleDbDataAdapter1.Fill(Me.DsComposer1)


Tutorial 2 - Binding C1Combo to a DataSet - C#

C#

oleDbDataAdapter1.Fill(dataSet11);


Tutorial 2 - Binding C1Combo to a DataSet - Delphi

Delphi

begin

oleDbDataAdapter1.Fill(dataSet11);

end;


Tutorial 2 - Binding C1Combo to a DataSet - Visual Basic

Visual Basic

oleDbDataAdapter1.Fill(dataSet11)


Tutorial 3 - AddItem Mode - C#

C#

this.C1List1.AddItemTitles("First Name; LastName; Phone Number");

this.C1List1.AddItem("Greg;Daryll;412-657-3412");

this.C1List1.AddItem("Jane;Lambert;567-123-6785");

this.C1List1.AddItem("Allen;Clark;675-345-9087");

this.C1List1.AddItem("David;Elkins;564-345-2635");

this.C1List1.AddItem("Carl;Ziegler;412-678-2351");

this.C1List1.AddItem("William;Yahner;412-980-6754");


Tutorial 3 - AddItem Mode - C#2

C#

this.C1List1.AddItem

(this.TextBox1.Text + ";" + this.TextBox2.Text + ";" + this.TextBox3.Text);


Tutorial 3 - AddItem Mode - C#3

C#

try {

this.C1List1.RemoveItem(this.C1List1.SelectedIndex);

}

catch {

MessageBox.Show("Select an item from the list first.", "List");

}


Tutorial 3 - AddItem Mode - C#4

C#

this.C1List1.ClearItems();


Tutorial 3 - AddItem Mode - C#5

C#

this.C1List1.AddItemTitles("First Name; LastName; Phone Number");

this.C1List1.SuspendBinding ();

this.C1List1.AddItem("Greg;Daryll;412-657-3412");

this.C1List1.AddItem("Jane;Lambert;567-123-6785");

this.C1List1.AddItem("Allen;Clark;675-345-9087");

this.C1List1.AddItem("David;Elkins;564-345-2635");

this.C1List1.AddItem("Carl;Ziegler;412-678-2351");

this.C1List1.AddItem("William;Yahner;412-980-6754");

this.C1List1.ResumeBinding();


Tutorial 3 - AddItem Mode - Delphi

Delphi

with Self.C1List1

begin

AddItemTitles(‘First Name; LastName; Phone Number’);

AddItem(‘Greg;Daryll;412-657-3412’);

AddItem(‘Jane;Lambert;567-123-6785’);

AddItem(‘Allen;Clark;675-345-9087’);

AddItem(‘David;Elkins;564-345-2635’);

AddItem(‘Carl;Ziegler;412-678-2351’);

AddItem(‘William;Yahner;412-980-6754’);

end;


Tutorial 3 - AddItem Mode - Delphi2

Delphi

Self.C1List1.AddItem

(Self.TextBox1.Text +';' + Me.TextBox2.Text + ';' + Me.TextBox3.Text);


Tutorial 3 - AddItem Mode - Delphi3

Delphi

begin

try

Self.C1List1.RemoveItem(Self.C1List1.SelectedIndex);

except

MessageBox.Show('Select an item from the list first.', 'List');

end;

end;


Tutorial 3 - AddItem Mode - Delphi4

Delphi

Self.C1List1.ClearItems;


Tutorial 3 - AddItem Mode - Delphi5

Delphi

with Self.C1List1 do

begin

AddItemTitles(‘First Name; LastName; Phone Number’);

.SuspendBinding ()

AddItem(‘Greg;Daryll;412-657-3412’);

AddItem(‘Jane;Lambert;567-123-6785’);

AddItem(‘Allen;Clark;675-345-9087’);

AddItem(‘David;Elkins;564-345-2635’);

AddItem(‘Carl;Ziegler;412-678-2351’);

AddItem(‘William;Yahner;412-980-6754’);

.ResumeBinding ()

End;


Tutorial 3 - AddItem Mode - Visual Basic

Visual Basic

With Me.C1List1

.AddItemTitles("First Name; LastName; Phone Number")

.AddItem("Greg;Daryll;412-657-3412")

.AddItem("Jane;Lambert;567-123-6785")

.AddItem("Allen;Clark;675-345-9087")

.AddItem("David;Elkins;564-345-2635")

.AddItem("Carl;Ziegler;412-678-2351")

.AddItem("William;Yahner;412-980-6754")

End With


Tutorial 3 - AddItem Mode - Visual Basic2

Visual Basic

Me.C1List1.AddItem_

(Me.TextBox1.Text + ";" + Me.TextBox2.Text + ";" + Me.TextBox3.Text)


Tutorial 3 - AddItem Mode - Visual Basic3

Visual Basic

Try

Me.C1List1.RemoveItem(Me.C1List1.SelectedIndex)

Catch

MessageBox.Show("Select an item from the list first.", "List")

End Try


Tutorial 3 - AddItem Mode - Visual Basic4

Visual Basic

Me.C1List1.ClearItems()


Tutorial 3 - AddItem Mode - Visual Basic5

Visual Basic

With Me.C1List1

.AddItemTitles("First Name; LastName; Phone Number")

.SuspendBinding ()

.AddItem("Greg;Daryll;412-657-3412")

.AddItem("Jane;Lambert;567-123-6785")

.AddItem("Allen;Clark;675-345-9087")

.AddItem("David;Elkins;564-345-2635")

.AddItem("Carl;Ziegler;412-678-2351")

.AddItem("William;Yahner;412-980-6754")

.ResumeBinding ()

End With


Tutorial 4 - Displaying Master-Detail Relationships - C#

C#

this.OleDbDataAdapter1.Fill(this.DataSet11);

this.OleDbDataAdapter2.Fill(this.DataSet21);

this.dbcComp_Change(null, e.Empty);


Tutorial 4 - Displaying Master-Detail Relationships - C#2

C#

private void dbcComp_RowChange( object sender, System.EventArgs e) {

DataRow[] dr;

dr = this.DataSet21.Opus.Select("Last =//" + this.dbcComp.Text + "//");

DataSet2.OpusDataTable tb = new DataSet2.OpusDataTable();

tb = new DataSet2.OpusDataTable();

DataRow item;

foreach ( item in dr) {

tb.ImportRow(item);

} //

this.dblOpus.DataSource = tb;

}


Tutorial 4 - Displaying Master-Detail Relationships - Delphi

Delphi

Self.OleDbDataAdapter1.Fill(Me.DataSet11);

Self.OleDbDataAdapter2.Fill(Me.DataSet21);

Self.dbcComp_Change(Nothing, e.Empty);


Tutorial 4 - Displaying Master-Detail Relationships - Delphi2

Delphi

procedure MainForm.dbcCombo_Change(Sender: System.Object);

var

dr: array of DataRow;

ATable: DataTable;

I: Integer;

begin

dr := tblOpus.Select('Last=''' + dbcCombo.Text + '''');

ATable := tblOpus.Clone;

for I := 0 to High(dr) do

ATable.ImportRow(dr[I]);

dblOpus.DataSource := ATable;

end;


Tutorial 4 - Displaying Master-Detail Relationships - Visual Basic

Visual Basic

Me.OleDbDataAdapter1.Fill(Me.DataSet11)

Me.OleDbDataAdapter2.Fill(Me.DataSet21)

Me.dbcComp_Change(Nothing, e.Empty)


Tutorial 4 - Displaying Master-Detail Relationships - Visual Basic2

Visual Basic

Private Sub dbcComp_RowChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles dbcComp.RowChange

Dim dr As DataRow()

dr = Me.DataSet21.Opus.Select("Last ='" & Me.dbcComp.Text + "'")

Dim tb As New DataSet2.OpusDataTable()

tb = New DataSet2.OpusDataTable()

Dim item As DataRow

For Each item In dr

tb.ImportRow(item)

Next

Me.dblOpus.DataSource = tb

End Sub


Tutorial 5 - Using C1List with SQL Query Results - C#

C#

private void Button1_Click( System.object sender, System.EventArgs e) {

DataSet ds = new DataSet();

string sqlStr;

OleDb.OleDbDataAdapter da;

sqlStr = this.TextBox1.Text.Trim();

da = new OleDb.OleDbDataAdapter(sqlStr, this.OleDbConnection1);

try {

da.Fill(ds, "TestSQL");

this.C1List1.DataSource = null;

this.C1List1.ClearFields();

this.C1List1.DataSource = ds.Tables("TestSQL");

} catch( Exception x) {

MsgBox("Invalid SQL statement.");

}

}


Tutorial 5 - Using C1List with SQL Query Results - Delphi

Delphi

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

var

ds: DataSet;

sqlStr: string;

da: OleDb.OleDbDataAdapter;

begin

sqlStr := Self.TextBox1.Text.Trim();

da := OleDb.OleDbDataAdapter.Create(sqlStr, Self.OleDbConnection1);

Try

da.Fill(ds, ‘TestSQL’);

Self.C1List1.DataSource := nil;

Self.C1List1.ClearFields;

Self.C1List1.DataSource := ds.Tables(‘TestSQL’);

except

MsgBox(‘Invalid SQL statement.’);

End;

end;


Tutorial 5 - Using C1List with SQL Query Results - Visual Basic

Visual Basic

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim ds As New DataSet()

Dim sqlStr As String

Dim da As OleDb.OleDbDataAdapter

sqlStr = Me.TextBox1.Text.Trim()

da = New OleDb.OleDbDataAdapter(sqlStr, Me.OleDbConnection1)

Try

da.Fill(ds, "TestSQL")

Me.C1List1.DataSource = Nothing

Me.C1List1.ClearFields()

Me.C1List1.DataSource = ds.Tables("TestSQL")

Catch x As Exception

MsgBox("Invalid SQL statement.")

End Try

End Sub


Tutorial 6 - Selecting Multiple Rows Using Bookmarks - C#

C#

long i;

for ( i = 0; i <= this.DsComposer1.Composer.Rows.Count - 1; i++) {

if ( this.DsComposer1.Composer.Rows[i] ["Country"] == "Germany" ) this.C1List1.SelectedIndices.Add(i);

}


Tutorial 6 - Selecting Multiple Rows Using Bookmarks - C#2

C#

this.C1List1.ClearSelected();


Tutorial 6 - Selecting Multiple Rows Using Bookmarks - Delphi

Delphi

var

i: Integer;

begin

for i := 0 to Self.DsComposer1.Composer.Rows.Count – 1 do

begin

If Self.DsComposer1.Composer.Rows[i].Item[‘Country’] = ‘Russia’ then

Self.C1List1.SelectedIndices.Add(i);

end;

end;


Tutorial 6 - Selecting Multiple Rows Using Bookmarks - Delphi2

Delphi

Self.C1List1.ClearSelected;


Tutorial 6 - Selecting Multiple Rows Using Bookmarks - Visual Basic

Visual Basic

Dim i As Long

For i = 0 To Me.DsComposer1.Composer.Rows.Count - 1

If Me.DsComposer1.Composer.Rows(i).Item_

("Country") = "Germany" Then

Me.C1List1.SelectedIndices.Add(i)

End If


Tutorial 6 - Selecting Multiple Rows Using Bookmarks - Visual Basic2

Visual Basic

Me.C1List1.ClearSelected()


Tutorial 7 - Displaying Unbound Columns in a Bound List - C#

C#

DataTable dtCopy = new DataTable() ;


Tutorial 7 - Displaying Unbound Columns in a Bound List - C#2

C#

this.OleDbDataAdapter1.Fill(this.DsComposer1);

dtCopy = this.DsComposer1.Tables[0].Copy();

this.C1List1.Splits[0].DisplayColumns["Last"].Visible = false;

this.C1List1.Splits[0].DisplayColumns["First"].Visible = false;


Tutorial 7 - Displaying Unbound Columns in a Bound List - C#3

C#

private void C1List1_UnboundColumnFetch( object sender,

C1.Win.C1List.UnboundColumnFetchEventArgs e){

if ((e.Col == 0 && e.Row < dtCopy.Rows.Count) ) {

e.Value = dtCopy.Rows[e.Row] ["First"] + " " + dtCopy.Rows[e.Row] [“Last”];

}

}


Tutorial 7 - Displaying Unbound Columns in a Bound List - Delphi

Delphi

var

dtCopy: DataTable;

begin

dtCopy := DataTable.Create;

end;


Tutorial 7 - Displaying Unbound Columns in a Bound List - Delphi2

Delphi

begin

Self.OleDbDataAdapter1.Fill(Self.DsComposer1);

dtCopy := Self.DsComposer1.Tables(0).Copy;

Self.C1List1.Splits[0].DisplayColumns.Item['Last'].Visible := False;

Self.C1List1.Splits[0].DisplayColumns.Item['First'].Visible := False;

end;


Tutorial 7 - Displaying Unbound Columns in a Bound List - Delphi3

Delphi

procedure MainForm.C1List1_UnboundColumnFetch(Sender: System.Object; e: C1.Win.C1List.UnboundColumnFetchEventArgs);

begin

if (e.Col = 0) and (e.Row < dtCopy.Rows.Count) then

e.Value := dtCopy.Rows[e.Row]['First'].ToString + ' ' + dtCopy.Rows[e.Row]['Last'].ToString;

end;


Tutorial 7 - Displaying Unbound Columns in a Bound List - Visual Basic

Visual Basic

Dim dtCopy As New DataTable()


Tutorial 7 - Displaying Unbound Columns in a Bound List - Visual Basic2

Visual Basic

Me.OleDbDataAdapter1.Fill(Me.DsComposer1)

dtCopy = Me.DsComposer1.Tables(0).Copy()

Me.C1List1.Splits(0).DisplayColumns.Item ("Last").Visible = False

Me.C1List1.Splits(0).DisplayColumns.Item ("First").Visible = False


Tutorial 7 - Displaying Unbound Columns in a Bound List - Visual Basic3

Visual Basic

Private Sub C1List1_UnboundColumnFetch(ByVal sender As Object,_

ByVal e As C1.Win.C1List.UnboundColumnFetchEventArgs)_

Handles C1List1.UnboundColumnFetch

If (e.Col = 0 And e.Row < dtCopy.Rows.Count) Then

e.Value = dtCopy.Rows(e.Row).Item_

("First") + " " + dtCopy.Rows(e.Row).Item("Last")

End If

End Sub


Tutorial 8 - Displaying Translated Data - C#

C#

this.OleDbDataAdapter1.Fill(this.DsContacts1);


Tutorial 8 - Displaying Translated Data - Delphi

Delphi

Self.OleDbDataAdapter1.Fill(Me.DsContacts1);


Tutorial 8 - Displaying Translated Data - Visual Basic

Visual Basic

Me.OleDbDataAdapter1.Fill(Me.DsContacts1)


Tutorial 10 - Using Row Styles to Highlight Related Data - C#

C#

bool bFlag1, bFlag2;


Tutorial 10 - Using Row Styles to Highlight Related Data - C#2

C#

this.C1List1.FetchRowStyles = true;

bFlag1 = true;

this.C1List1.Refresh();


Tutorial 10 - Using Row Styles to Highlight Related Data - C#3

C#

this.C1List1.FetchRowStyles = true;

bFlag2 = true;

this.C1List1.Refresh();


Tutorial 10 - Using Row Styles to Highlight Related Data - C#4

C#

this.C1List1.FetchRowStyles = true;

bFlag1 = false;

bFlag2 = false;

this.C1List1.Refresh();


Tutorial 10 - Using Row Styles to Highlight Related Data - C#5

C#

private void C1List1_FetchRowStyle( object sender,

C1.Win.C1List.FetchRowStyleEventArgs e) {

if ((bFlag1 && this.C1List1.Columns["CustType"].CellValue(e.Row) == 1) )

{

Font fntFont = new Font

(e.CellStyle.Font.Name, e.CellStyle.Font.Size, FontStyle.Bold);

e.CellStyle.Font = fntFont;

e.CellStyle.ForeColor = Color.Blue;

}

if ((bFlag2 && this.C1List1.Columns["CustType"].CellValue(e.Row) == 4) )

{

e.CellStyle.ForeColor = Color.White;

e.CellStyle.BackColor = Color.Red;

}

}


Tutorial 10 - Using Row Styles to Highlight Related Data - Delphi

Delphi

var

bFlag1: Boolean;

bFlag2: Boolean;


Tutorial 10 - Using Row Styles to Highlight Related Data - Delphi2

Delphi

begin

Self.C1List1.FetchRowStyles := True;

bFlag1 := True;

Self.C1List1.Refresh;

end;


Tutorial 10 - Using Row Styles to Highlight Related Data - Delphi3

Delphi

begin

C1List1.FetchRowStyles := true;

bFlag2 := true;

C1List1.Refresh;

end;


Tutorial 10 - Using Row Styles to Highlight Related Data - Delphi4

Delphi

begin

bFlag1 := False;

bFlag2 := False;

C1List1.Refresh;

end;


Tutorial 10 - Using Row Styles to Highlight Related Data - Delphi5

Delphi

procedure MainForm.C1List1_FetchRowStyle(Sender: System.Object; e: C1.Win.C1List.FetchRowStyleEventArgs);

var

AFont: System.Drawing.Font;

begin

if bFlag1 and (Int32.Parse(C1List1.Columns['CustType'].CellText(e.Row)) = 1) then

begin

AFont := System.Drawing.Font.Create(e.CellStyle.Font.Name, e.CellStyle.Font.Size, FontStyle.Bold);

e.CellStyle.Font := AFont;

e.CellStyle.ForeColor := Color.Blue;

end;

if bFlag2 and (Int32.Parse(C1List1.Columns['CustType'].CellText(e.Row)) = 4) then

begin

e.CellStyle.ForeColor := Color.White;

e.CellStyle.BackColor := Color.Red;

end;

end;


Tutorial 10 - Using Row Styles to Highlight Related Data - Visual Basic

Visual Basic

Dim bFlag1, bFlag2 As Boolean


Tutorial 10 - Using Row Styles to Highlight Related Data - Visual Basic2

Visual Basic

Me.C1List1.FetchRowStyles = True

bFlag1 = True

Me.C1List1.Refresh()


Tutorial 10 - Using Row Styles to Highlight Related Data - Visual Basic3

Visual Basic

Me.C1List1.FetchRowStyles = True

bFlag2 = True

Me.C1List1.Refresh()


Tutorial 10 - Using Row Styles to Highlight Related Data - Visual Basic4

Visual Basic

Me.C1List1.FetchRowStyles = True

bFlag1 = False

bFlag2 = False

Me.C1List1.Refresh()


Tutorial 10 - Using Row Styles to Highlight Related Data - Visual Basic5

Visual Basic

Private Sub C1List1_FetchRowStyle(ByVal sender As Object,_

ByVal e As C1.Win.C1List.FetchRowStyleEventArgs)_

Handles C1List1.FetchRowStyle

If (bFlag1 And Me.C1List1.Columns("CustType")_

.CellValue(e.Row) = 1) Then

Dim fntFont As New Font_

(e.CellStyle.Font.Name, e.CellStyle.Font.Size, FontStyle.Bold)

e.CellStyle.Font = fntFont

e.CellStyle.ForeColor = Color.Blue

End If

If (bFlag2 And Me.C1List1.Columns("CustType")_

.CellValue(e.Row) = 4) Then

e.CellStyle.ForeColor = Color.White

e.CellStyle.BackColor = Color.Red

End If

End Sub


Tutorial 11 - Displaying Rows in Alternating Colors - C#

C#

this.OleDbDataAdapter1.Fill(this.DsContacts1);

this.C1List1.AlternatingRows = true;


Tutorial 11 - Displaying Rows in Alternating Colors - Delphi

Delphi

Self.OleDbDataAdapter1.Fill(C1List1.DsContacts1);

Self.C1List1.AlternatingRows := True;


Tutorial 11 - Displaying Rows in Alternating Colors - Visual Basic

Visual Basic

Me.OleDbDataAdapter1.Fill(Me.DsContacts1)

Me.C1List1.AlternatingRows = True


Tutorial 12 - Creating Fixed, Nonscrolling Columns in List - C#

C#

private void Form1_Load( System.object sender,

System.EventArgs e)

{

this.OleDbDataAdapter1.Fill(this.DsComposer1);

//hide all the columns from the left split except col 0 and 1

int i;

for ( i = 2; i<= this.C1List1.Columns.Count - 1; i++) this.C1List1.Splits[0].DisplayColumns[i].Visible = false;

//configure the left split to display 2 columns exactly

this.C1List1.Splits[0].SplitSizeMode = C1.Win.C1List.SizeModeEnum.NumberOfColumns;

this.C1List1.Splits[0].SplitSize = 2;

this.C1List1.Splits[0].AllowHorizontalSizing = false;

//make col 0 and 1 invisible in the right split

this.C1List1.Splits[1].DisplayColumns[0].Visible = false;

this.C1List1.Splits[1].DisplayColumns[1].Visible = false;

}


Tutorial 12 - Creating Fixed, Nonscrolling Columns in List - C#2

C#

//make country + birth columns fixed

this.C1List2.Splits[0].DisplayColumns["Birth"].FixColumn(true);

this.C1List2.Splits[0].DisplayColumns["Country"].FixColumn(true, 1);


Tutorial 12 - Creating Fixed, Nonscrolling Columns in List - C#3

C#

//make country + birth columns unfixed

this.C1List2.Splits[0].DisplayColumns["Country"].FixColumn(false, 1);

this.C1List2.Splits[0].DisplayColumns["Birth"].FixColumn(false, 0);


Tutorial 12 - Creating Fixed, Nonscrolling Columns in List - Delphi

Delphi

procedure MainForm.Form1_Load(Sender: System.Object; e: System.EventArgs);

var

I: Integer;

begin

oleDbDataAdapter1.Fill(dataSet1, 'Composer');

C1List1.DataSource := dataSet1.Tables[0];

c1List2.DataSource := dataSet1.Tables[0];

// hide all the columns from the left split except col 0 & 1

for I := 2 to C1List1.Columns.Count - 1 do

C1List1.Splits[0].DisplayColumns[I].Visible := False;

// Configure the left split to display 2 columns exactly

with C1List1.Splits[0] do

begin

SplitSizeMode := C1.Win.C1List.SizeModeEnum.NumberOfColumns;

SplitSize := 2;

AllowHorizontalSizing := false;

end;

//Make col0 & col1 invisible in the right split

with C1List1.Splits[1] do

begin

DisplayColumns[0].Visible := false;

DisplayColumns[1].Visible := false;

end;

end;


Tutorial 12 - Creating Fixed, Nonscrolling Columns in List - Delphi2

Delphi

// make country & birth columns fixed;

Self.C1List2.Splits[0].DisplayColumns['Birth'];

Self.C1List2.Splits[0].DisplayColumns['Country'];


Tutorial 12 - Creating Fixed, Nonscrolling Columns in List - Delphi3

Delphi

// make country & birth columns unfixed;

Self.C1List2.Splits[0].DisplayColumns['Country'];

Self.C1List2.Splits[0].DisplayColumns['Birth'];


Tutorial 12 - Creating Fixed, Nonscrolling Columns in List - Visual Basic

Visual Basic

Private Sub Form1_Load(ByVal sender As System.Object,_

ByVal e As System.EventArgs) Handles MyBase.Load

Me.OleDbDataAdapter1.Fill(Me.DsComposer1)

'hide all the columns from the left split except col 0 and 1

Dim i As Integer

For i = 2 To Me.C1List1.Columns.Count - 1

Me.C1List1.Splits(0).DisplayColumns(i)_

.Visible = False

Next

'configure the left split to display 2 columns exactly

With Me.C1List1.Splits(0)

.SplitSizeMode = C1.Win.C1List.SizeModeEnum.NumberOfColumns

.SplitSize = 2

.AllowHorizontalSizing = False

End With

'make col 0 and 1 invisible in the right split

Me.C1List1.Splits(1).DisplayColumns(0).Visible = False

Me.C1List1.Splits(1).DisplayColumns(1).Visible = False

End Sub


Tutorial 12 - Creating Fixed, Nonscrolling Columns in List - Visual Basic2

Visual Basic

'make country & birth columns fixed

Me.C1List2.Splits(0).DisplayColumns("Birth").FixColumn(True)

Me.C1List2.Splits(0).DisplayColumns("Country").FixColumn(True, 1)


Tutorial 12 - Creating Fixed, Nonscrolling Columns in List - Visual Basic3

Visual Basic

'make country & birth columns unfixed

Me.C1List2.Splits(0).DisplayColumns("Country").FixColumn(False, 1)

Me.C1List2.Splits(0).DisplayColumns("Birth").FixColumn(False, 0)


Tutorial 13 - CheckBox Selection - C#

C#

this.OleDbDataAdapter1.Fill(this.DsContacts1);

//CheckBox selection

this.C1List1.SelectionMode = C1.Win.C1List.SelectionModeEnum.CheckBox;


Tutorial 13 - CheckBox Selection - Delphi

Delphi

Self.OleDbDataAdapter1.Fill(Me.DsContacts1);

// CheckBox selection;

Self.C1List1.SelectionMode := C1.Win.C1List.SelectionModeEnum.CheckBox;


Tutorial 13 - CheckBox Selection - Visual Basic

Visual Basic

Me.OleDbDataAdapter1.Fill(Me.DsContacts1)

'CheckBox selection

Me.C1List1.SelectionMode = C1.Win.C1List.SelectionModeEnum.CheckBox


Tutorial 14 - Displaying Bitmaps - C#

C#

//get image directory

string dir;

dir = Environment.CurrentDirectory;

dir = dir.Substring(0, dir.LastIndexOf("\"));

dir = dir.Substring(0, dir.LastIndexOf("\"));

dir = dir + "\Flags";

this.TextBox1.Text = dir;


Tutorial 14 - Displaying Bitmaps - C#2

C#

//Add the title

this.C1List1.AddItemTitles("File Name; Picture");

//extend the second column width

this.C1List1.ExtendRightColumn = true;

//enlarge the row height

this.C1List1.ItemHeight = 50;

//Add the items for the list

string dir, str, fileName;

dir = this.TextBox1.Text.Trim();

string[] strCol;

strCol = System.IO.Directory.GetFiles(dir, "*.bmp");

foreach ( str in strCol){

fileName = str.Substring(str.LastIndexOf("\") + 1);

this.C1List1.AddItem(fileName + ";");

} //

//fire FecthCellStyle event

this.C1List1.Splits[0].DisplayColumns[1].FetchStyle = true;


Tutorial 14 - Displaying Bitmaps - C#3

C#

private void C1List1_FetchCellStyle( object sender,

C1.Win.C1List.FetchCellStyleEventArgs e)

{

if ( e.Col == 1 ) {

//get the image name

string file;

file = this.C1List1.Splits[0].DisplayColumns[0].DataColumn.CellText(e.Row);

file = this.TextBox1.Text.Trim() + "\" + file;

e.CellStyle.ForeGroundPicturePosition = C1.Win.C1List.ForeGroundPicturePositionEnum.PictureOnly;

e.CellStyle.ForegroundImage = Image.FromFile(file);

}

}


Tutorial 14 - Displaying Bitmaps - Delphi

Delphi

var

dir: string;

begin

dir := Environment.CurrentDirectory;

dir := dir.Substring(0, dir.LastIndexOf('\'));

dir := dir + '\Flags';

textBox1.Text := dir;

end;


Tutorial 14 - Displaying Bitmaps - Delphi2

Delphi

procedure MainForm.button1_Click(Sender: System.Object; e: System.EventArgs);

var

I: Integer;

dir, fileName: string;

strCol: array of string;

begin

C1List1.AddItemTitles('File Name; Picture');

C1List1.ExtendRightColumn := true;

C1List1.ItemHeight := 50;

dir := textBox1.Text.Trim();

strCol := Directory.GetFiles(dir, '*.bmp');

for I := 0 to High(strCol) do

begin

fileName := strCol[I].SubString(strCol[I].LastIndexOf('\') + 1);

C1List1.AddItem(fileName + ';');

end;

//Fire FetchCellStyle event

C1List1.Splits[0].DisplayColumns[1].FetchStyle := true;

end;


Tutorial 14 - Displaying Bitmaps - Delphi3

Delphi

procedure MainForm.C1List1_FetchCellStyle(Sender: System.Object; e: C1.Win.C1List.FetchCellStyleEventArgs);

var

AFile: string;

begin

if e.Col = 1 then

begin

AFile := C1List1.Splits[0].DisplayColumns[0].DataColumn.CellText(e.Row);

AFile := textBox1.Text.Trim + '\' + AFile;

e.CellStyle.ForeGroundPicturePosition := C1.Win.C1List.ForeGroundPicturePositionEnum.PictureOnly;

e.CellStyle.ForegroundImage := Image.FromFile(AFile);

end;

end;


Tutorial 14 - Displaying Bitmaps - Visual Basic

Visual Basic

'Get image directory

Dim dir As String

dir = Environment.CurrentDirectory

dir = dir.Substring(0, dir.LastIndexOf("\"))

dir = dir.Substring(0, dir.LastIndexOf("\"))

dir = dir & "\Flags"

Me.TextBox1.Text = dir


Tutorial 14 - Displaying Bitmaps - Visual Basic2

Visual Basic

'Add the title

Me.C1List1.AddItemTitles("File Name; Picture")

'extend the second column width

Me.C1List1.ExtendRightColumn = True

'enlarge the row height

Me.C1List1.ItemHeight = 50

'Add the items for the list

Dim dir, str, fileName As String

dir = Me.TextBox1.Text.Trim()

Dim strCol As String()

strCol = System.IO.Directory.GetFiles(dir, "*.bmp")

For Each str In strCol

fileName = str.Substring(str.LastIndexOf("\") + 1)

Me.C1List1.AddItem(fileName & ";")

Next

'fire FecthCellStyle event

Me.C1List1.Splits(0).DisplayColumns(1).FetchStyle = True


Tutorial 14 - Displaying Bitmaps - Visual Basic3

Visual Basic

Private Sub C1List1_FetchCellStyle(ByVal sender As Object,_

ByVal e As C1.Win.C1List.FetchCellStyleEventArgs) Handles C1List1.FetchCellStyle

If e.Col = 1 Then

'Get the image name

Dim file As String

file = Me.C1List1.Splits(0).DisplayColumns(0)_

.DataColumn.CellText(e.Row)

file = Me.TextBox1.Text.Trim() & "\" & file

e.CellStyle.ForeGroundPicturePosition = C1.Win.C1List.ForeGroundPicturePositionEnum.PictureOnly

e.CellStyle.ForegroundImage = Image.FromFile(file)

End If

End Sub


Tutorial 15 - OwnerDraw List Cells - C#

C#

bh1, Brush bh2;

Font ft;


Tutorial 15 - OwnerDraw List Cells - C#2

C#

//fill the data

this.OleDbDataAdapter1.Fill(this.DsCustomer1);

//owner draw every column

int i;

for ( i = 0; i <= this.C1List1.Splits[1].DisplayColumns.Count - 1; i++)

this.C1List1.Splits[0].DisplayColumns[i] OwnerDraw = true;

//set the row height

this.C1List1.ItemHeight = 25;

//set the brushes and font

this.bh1 = new SolidBrush(Color.Pink);

this.bh2 = new SolidBrush(Color.Yellow);

FontFamily ff;

ff = new FontFamily("Arial");

this.ft = new Font(ff, 14, FontStyle.Regular, GraphicsUnit.Pixel);


Tutorial 15 - OwnerDraw List Cells - C#3

C#

private void C1List1_OwnerDrawCell( object sender,

C1.Win.C1List.OwnerDrawCellEventArgs e)

{ //draw alternative background

if ((e.Row % 2 == 0) ) {

e.Graphics.FillRectangle(this.bh1, e.CellRect);

} else {

e.Graphics.FillRectangle(this.bh2, e.CellRect);

}

e.Graphics.DrawString(e.Text, this.ft, new

SolidBrush(Color.Black), e.CellRect.Left, e.CellRect.Top);

e.Handled = true;

}


Tutorial 15 - OwnerDraw List Cells - Delphi

Delphi

var

ft: Font;

bh1: Brush;

bh2: Brush;


Tutorial 15 - OwnerDraw List Cells - Delphi2

Delphi

procedure MainForm.Form1_Load(Sender: System.Object; e: System.EventArgs);

var

I: Integer;

begin

oleDbDataAdapter1.Fill(dsCustomer, 'Customers');

C1List1.DataSource := dsCustomer.Tables[0];

//Owner draw every column

for I := 0 to C1List1.Splits[0].DisplayColumns.Count - 1 do

C1List1.Splits[0].DisplayColumns[I].OwnerDraw := True;

//Set the row height

C1List1.ItemHeight := 25;

//Set the brushes and font

bh1 := SolidBrush.Create(Color.Pink);

bh2 := SolidBrush.Create(Color.Yellow);

ft := System.Drawing.Font.Create('Arial', 14);

end;


Tutorial 15 - OwnerDraw List Cells - Delphi3

Delphi

procedure MainForm.C1List1_OwnerDrawCell(Sender: System.Object; e: C1.Win.C1List.OwnerDrawCellEventArgs);

begin

//Draw alternative background

if e.Row mod 2 = 0 then

e.Graphics.FillRectangle(bh1, e.CellRect)

else

e.Graphics.FillRectangle(bh2, e.CellRect);

e.Graphics.DrawString(e.Text, ft, SolidBrush.Create(Color.Black), e.CellRect.Left, e.CellRect.Top);

e.Handled := True;

end;


Tutorial 15 - OwnerDraw List Cells - Visual Basic

Visual Basic

Dim bh1, bh2 As Brush

Dim ft As Font


Tutorial 15 - OwnerDraw List Cells - Visual Basic2

Visual Basic

'fill the data

Me.OleDbDataAdapter1.Fill(Me.DsCustomer1)

'owner draw every column

Dim i As Integer

For i = 0 To Me.C1List1.Splits(0)_

.DisplayColumns.Count - 1

Me.C1List1.Splits(0).DisplayColumns(i)_

.OwnerDraw = True

Next

'set the row height

Me.C1List1.ItemHeight = 25

'set the brushes and font

Me.bh1 = New SolidBrush(Color.Pink)

Me.bh2 = New SolidBrush(Color.Yellow)

Dim ff As FontFamily

ff = New FontFamily("Arial")

Me.ft = New Font(ff, 14, FontStyle.Regular, GraphicsUnit.Pixel)


Tutorial 15 - OwnerDraw List Cells - Visual Basic3

Visual Basic

Private Sub C1List1_OwnerDrawCell(ByVal sender As Object,_

ByVal e As C1.Win.C1List.OwnerDrawCellEventArgs) Handles C1List1.OwnerDrawCell

'draw alternative background

If (e.Row Mod 2 = 0) Then

e.Graphics.FillRectangle(Me.bh1, e.CellRect)

Else

e.Graphics.FillRectangle(Me.bh2, e.CellRect)

End If

e.Graphics.DrawString(e.Text, Me.ft, New_

SolidBrush(Color.Black), e.CellRect.Left, e.CellRect.Top)

e.Handled = True

End Sub


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - C#

C#

this.OleDbDataAdapter1.Fill(this.DsCustomer1);


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - C#2

C#

DataTable tb //A copy of the data;

Color borderColor;

int bLeft, bTop, bRight, bBottom;

C1.Win.C1List.BorderTypeEnum bType;


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - C#3

C#

this.OleDbDataAdapter1.Fill(this.DataSet11);

tb = this.DsCustomer1.Tables[0].Copy();

this.C1List1.ItemHeight = 40;

//fill each combo

this.CheckBox2.Checked = true;

FillCombo(C1Combo1);

FillCombo(C1Combo2);

FillCombo(C1Combo3);

FillCombo(C1Combo4);

FillCombo5();

//init border size

this.bBottom = 1;

this.bTop = 1;

this.bLeft = 1;

this.bRight = 1;

this.bType = C1.Win.C1List.BorderTypeEnum.None;

}


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - C#4

C#

//fill each combo with numbers from 1 to 10

private void FillCombo

(C1.Win.C1List.C1Combo combo){

int i;

for ( i =1 ; i <= 10 ; i++) combo.AddItem(i.ToString());

combo.SelectedIndex = 0;

}

private void FillCombo5()

{

this.C1Combo5.AddItem("Fillet");

this.C1Combo5.AddItem("Flat");

this.C1Combo5.AddItem("Groove");

this.C1Combo5.AddItem("Inset");

this.C1Combo5.AddItem("InsetBevel");

this.C1Combo5.AddItem("None");

this.C1Combo5.AddItem("Raised");

this.C1Combo5.AddItem("RaisedBevel");

this.C1Combo5.SelectedIndex = 5;

}


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - C#5

C#

private void Button1_Click( System.object sender,

System.EventArgs e){

DialogResult result;

result = this.ColorDialog1.ShowDialog();

if ( result == DialogResult.OK ) {

this.borderColor = this.ColorDialog1.Color;

this.Button1.BackColor = this.borderColor;

}

UpdateBorder() ;

}


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - C#6

C#

private void UpdateBorder() {

if ( this.C1List1.Splits[0].DisplayColumns[this.C1List1.Col] == null ) return;

CellBorders borders = this.C1List1.Splits[0].DisplayColumns [this.C1List1.Col].Style.Borders;

borders.Color = this.borderColor;

borders.BorderType = this.bType;

borders.Bottom = this.bBottom;

borders.Left = this.bLeft;

borders.Right = this.bRight;

borders.Top = this.bTop;

}


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - C#7

C#

private void C1Combo1_RowChange( object sender, System.EventArgs e) {

this.bTop = this.C1Combo1.SelectedIndex + 1;

this.UpdateBorder();

}

private void C1Combo2_RowChange( object sender, System.EventArgs e) {

this.bBottom = this.C1Combo2.SelectedIndex + 1;

this.UpdateBorder();

}

private void C1Combo3_RowChange( object sender, System.EventArgs e) {

this.bLeft = this.C1Combo3.SelectedIndex + 1;

this.UpdateBorder();

}

private void C1Combo4_RowChange( object sender, System.EventArgs e) {

this.bRight = this.C1Combo4.SelectedIndex + 1;

this.UpdateBorder();

}

private void C1Combo5_RowChange( object sender, System.EventArgs e) {

switch (this.C1Combo5.Text) {

case "Fillet":

this.bType = C1.Win.C1List.BorderTypeEnum.Fillet;

break;

case "Flat":

this.bType = C1.Win.C1List.BorderTypeEnum.Flat;

break;

case "Groove":

this.bType = C1.Win.C1List.BorderTypeEnum.Groove;

break;

case "Inset":

this.bType = C1.Win.C1List.BorderTypeEnum.Inset;

break;

case "InsetBevel":

this.bType = C1.Win.C1List.BorderTypeEnum.InsetBevel;

break;

case "None":

this.bType = C1.Win.C1List.BorderTypeEnum.None;

break;

case "Raised":

this.bType = C1.Win.C1List.BorderTypeEnum.Raised;

break;

case "RaisedBevel":

this.bType = C1.Win.C1List.BorderTypeEnum.RaisedBevel;

break;

}

this.UpdateBorder();

}


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - C#8

C#

private void CheckBox1_Click( object sender,

System.EventArgs e){

this.C1List1.ScrollTips = this.CheckBox1.Checked;

}

private void CheckBox2_Click( object sender, System.EventArgs e){

this.C1List1.ScrollTrack = this.CheckBox2.Checked;

}

private void C1List1_FetchScrollTips( object sender,

C1.Win.C1List.FetchScrollTipsEventArgs e){

//set the ScrollTip depending on which scroll bar was moved

switch (e.ScrollBar) {

case C1.Win.C1List.ScrollBarEnum.Horizontal;

e.ScrollTip = this.C1List1.Columns[e.ColIndex].Caption;

break;

case C1.Win.C1List.ScrollBarEnum.Vertical;

e.ScrollTip = "Record: " + (e.Row + 1) + " of " + this.C1List1.ListCount_ + + "\n" + "\nCompany: " + this.tb.Rows[e.Row]["Company"] + "\n" + "User Code: " + this.tb.Rows[e.Row]["UserCode"];

break;

}

e.TipStyle.ForeColor = Color.Blue;

}


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Delphi

Delphi

Self.OleDbDataAdapter1.Fill(Me.DsCustomer1);


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Delphi2

Delphi

var

bType: C1.Win.C1List.BorderTypeEnum;

bBottom: Integer;

borderColor: Color;

tb: DataTable;


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Delphi3

Delphi

begin

oleDbDataAdapter1.Fill(dsCustomer, 'Customers');

C1List1.DataSource := dsCustomer.Tables[0];

FTable := dsCustomer.Tables[0].Copy;

C1List1.ItemHeight := 40;

checkBox2.Checked := True;

FillCombo(comboBox1);

FillCombo(comboBox2);

FillCombo(comboBox3);

FillCombo(comboBox4);

FillCombo5;

// init border size

bBottom := 1;

bTop := 1;

bLeft := 1;

bRight := 1;

bType := C1.Win.C1List.BorderTypeEnum.None; end;


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Delphi4

Delphi

procedure FillCombo(var comb: ComboBox);

var

I: Integer;

begin

for I := 1 to 10 do

comb.Items.Add(I.ToString);

comb.SelectedIndex := 0;

end;

procedure FillCombo5;

begin

with comboBox5 do

begin

Text := 'None';

Items.Add('Fillet');

Items.Add('Flat');

Items.Add('Groove');

Items.Add('Inset');

Items.Add('InsetBevel');

Items.Add('None');

Items.Add('Raised');

Items.Add('RaisedBevel');

end;

end;


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Delphi5

Delphi

procedure MainForm.button1_Click(Sender: System.Object; e: System.EventArgs);

begin

if (colorDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK) then

begin

borderColor := colorDialog1.Color;

button1.BackColor := borderColor;

UpdateBorder;

end;

end;


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Delphi6

Delphi

procedure MainForm.UpdateBorder;

begin

with C1List1.Splits[0].DisplayColumns[C1List1.Col].Style.Borders do

begin

Color := borderColor;

BorderType := bType;

Bottom := bBottom;

Left := bLeft;

Right := bRight;

Top := bTop;

end;

end;


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Delphi7

Delphi

procedure MainForm.comboBox1_SelectionChangeCommitted(Sender: System.Object; e: System.EventArgs);

begin

bTop := System.Int32.Parse(comboBox1.SelectedItem.ToString);

UpdateBorder;

end;

procedure MainForm.comboBox2_SelectionChangeCommitted(Sender: System.Object; e: System.EventArgs);

begin

bBottom := System.Int32.Parse(comboBox2.SelectedItem.ToString);

UpdateBorder;

end;

procedure MainForm.comboBox3_SelectionChangeCommitted(Sender: System.Object; e: System.EventArgs);

begin

bLeft := System.Int32.Parse(comboBox3.SelectedItem.ToString);

UpdateBorder;

end;

procedure MainForm.comboBox4_SelectionChangeCommitted(Sender: System.Object; e: System.EventArgs);

begin

bRight := System.Int32.Parse(comboBox4.SelectedItem.ToString);

UpdateBorder;

end;

procedure MainForm.comboBox5_SelectionChangeCommitted(Sender: System.Object; e: System.EventArgs);

begin

bType := C1.Win.C1List.BorderTypeEnum(Enum.Parse(typeof(C1.Win.C1List.BorderTypeEnum), string(comboBox5.SelectedItem)));

UpdateBorder;

end;


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Delphi8

Delphi

procedure MainForm.checkBox1_Click(Sender: System.Object; e: System.EventArgs);

begin

C1List1.ScrollTips := checkBox1.Checked;

end;

procedure MainForm.checkBox2_Click(Sender: System.Object; e: System.EventArgs);

begin

C1List1.ScrollTrack := checkBox2.Checked;

end;

procedure MainForm.C1List1_FetchScrollTips(Sender: System.Object; e: C1.Win.C1List.FetchScrollTipsEventArgs);

begin

case e.ScrollBar of

C1.Win.C1List.ScrollBarEnum.Horizontal:

begin

e.ScrollTip := C1List1.Columns[e.ColIndex].Caption;

end;

C1.Win.C1List.ScrollBarEnum.Vertical:

begin

e.ScrollTip := 'Record: ' + Integer(e.Row + 1).ToString + ' of ' + C1List1.ListCount.ToString + #10;

e.ScrollTip := e.ScrollTip + 'Company: ' + FTable.Rows[e.Row]['Company'].ToString + #10;

e.ScrollTip := e.ScrollTip + 'User Code: ' + FTable.Rows[e.Row]['UserCode'].ToString;

end;

end;

e.TipStyle.ForeColor := Color.Blue;

end;


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips -Visual Basic

Visual Basic

Me.OleDbDataAdapter1.Fill(Me.DsCustomer1)


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Visual Basic2

Visual Basic

Dim tb As DataTable 'A copy of the data

Dim borderColor As Color

Dim bLeft, bTop, bRight, bBottom As Integer

Dim bType As C1.Win.C1List.BorderTypeEnum


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Visual Basic3

Visual Basic

Me.OleDbDataAdapter1.Fill(Me.DataSet11)

tb = Me.DsCustomer1.Tables(0).Copy()

Me.C1List1.ItemHeight = 40

'fill each combo

Me.CheckBox2.Checked = True

FillCombo(C1Combo1)

FillCombo(C1Combo2)

FillCombo(C1Combo3)

FillCombo(C1Combo4)

FillCombo5()

'init border size

Me.bBottom = 1

Me.bTop = 1

Me.bLeft = 1

Me.bRight = 1

Me.bType = C1.Win.C1List.BorderTypeEnum.None

End Sub


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Visual Basic4

Visual Basic

'fill each combo with numbers from 1 to 10

Private Sub FillCombo_

(ByRef combo As C1.Win.C1List.C1Combo)

Dim i As Integer

For i = 1 To 10

combo.AddItem(i.ToString())

Next

combo.SelectedIndex = 0

End Sub

Private Sub FillCombo5()

With Me.C1Combo5

.AddItem("Fillet")

.AddItem("Flat")

.AddItem("Groove")

.AddItem("Inset")

.AddItem("InsetBevel")

.AddItem("None")

.AddItem("Raised")

.AddItem("RaisedBevel")

.SelectedIndex = 5

End With

End Sub


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Visual Basic5

Visual Basic

Private Sub Button1_Click(ByVal sender As System.Object,_

ByVal e As System.EventArgs)_

Handles Button1.Click

Dim result As DialogResult

result = Me.ColorDialog1.ShowDialog()

If result = DialogResult.OK Then

Me.borderColor = Me.ColorDialog1.Color

Me.Button1.BackColor = Me.borderColor

End If

UpdateBorder()

End Sub


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Visual Basic6

Visual Basic

Private Sub UpdateBorder()

If Me.C1List1.Splits(0).DisplayColumns(Me.C1List1.Col) Is Nothing Then

Exit Sub

End If

With Me.C1List1.Splits(0).DisplayColumns_

(Me.C1List1.Col).Style.Borders

.Color = Me.borderColor

.BorderType = Me.bType

.Bottom = Me.bBottom

.Left = Me.bLeft

.Right = Me.bRight

.Top = Me.bTop

End With

End Sub


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Visual Basic7

Visual Basic

Private Sub C1Combo1_RowChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1Combo1.RowChange

Me.bTop = Me.C1Combo1.SelectedIndex + 1

Me.UpdateBorder()

End Sub

Private Sub C1Combo2_RowChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1Combo2.RowChange

Me.bBottom = Me.C1Combo2.SelectedIndex + 1

Me.UpdateBorder()

End Sub

Private Sub C1Combo3_RowChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1Combo3.RowChange

Me.bLeft = Me.C1Combo3.SelectedIndex + 1

Me.UpdateBorder()

End Sub

Private Sub C1Combo4_RowChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1Combo4.RowChange

Me.bRight = Me.C1Combo4.SelectedIndex + 1

Me.UpdateBorder()

End Sub

Private Sub C1Combo5_RowChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1Combo5.RowChange

Select Case Me.C1Combo5.Text

Case "Fillet"

Me.bType = C1.Win.C1List.BorderTypeEnum.Fillet

Case "Flat"

Me.bType = C1.Win.C1List.BorderTypeEnum.Flat

Case "Groove"

Me.bType = C1.Win.C1List.BorderTypeEnum.Groove

Case "Inset"

Me.bType = C1.Win.C1List.BorderTypeEnum.Inset

Case "InsetBevel"

Me.bType = C1.Win.C1List.BorderTypeEnum.InsetBevel

Case "None"

Me.bType = C1.Win.C1List.BorderTypeEnum.None

Case "Raised"

Me.bType = C1.Win.C1List.BorderTypeEnum.Raised

Case "RaisedBevel"

Me.bType = C1.Win.C1List.BorderTypeEnum.RaisedBevel

End Select

Me.UpdateBorder()

End Sub


Tutorial 16 - Borders, Scroll Tracking and Scroll Tips - Visual Basic8

Visual Basic

Private Sub CheckBox1_Click(ByVal sender As Object,_

ByVal e As System.EventArgs) Handles CheckBox1.Click

Me.C1List1.ScrollTips = Me.CheckBox1.Checked

End Sub

Private Sub CheckBox2_Click(ByVal sender As Object,_

ByVal e As System.EventArgs) Handles CheckBox2.Click

Me.C1List1.ScrollTrack = Me.CheckBox2.Checked

End Sub

Private Sub C1List1_FetchScrollTips(ByVal sender As Object,_

ByVal e As C1.Win.C1List.FetchScrollTipsEventArgs) Handles C1List1.FetchScrollTips

'set the ScrollTip depending on which scroll bar was moved

Select Case e.ScrollBar

Case C1.Win.C1List.ScrollBarEnum.Horizontal

e.ScrollTip = Me.C1List1_

.Columns(e.ColIndex).Caption

Case C1.Win.C1List.ScrollBarEnum.Vertical

e.ScrollTip = "Record: " & CStr(e.Row + 1) & " of " & CStr(Me.C1List1.ListCount)_ & vbCrLf & "Company: " & Me.tb.Rows(e.Row).Item_

("Company") & vbCrLf & "User Code: " & Me.tb.Rows(e.Row).Item("UserCode")

End Select

e.TipStyle.ForeColor = Color.Blue

End Sub


Tutorial 17 - Conduct Searching using the Find Method - C#

C#

C1.Win.C1List.MatchCompareEnum matchCompare;

bool fromStart;


Tutorial 17 - Conduct Searching using the Find Method - C#2

C#

private void Form1_Load( System.object sender,

System.EventArgs e)

{ //Fill the dataset

this.OleDbDataAdapter1.Fill(this.DsCustomers1);

//Fill Combo1

this.C1Combo1.AddItem("Company");

this.C1Combo1.AddItem("Contacted");

this.C1Combo1.AddItem("CustType");

this.C1Combo1.AddItem("FirstName");

this.C1Combo1.AddItem("LastName");

this.C1Combo1.AddItem("Phone");

this.C1Combo1.AddItem("UserCode");

this.C1Combo1.SelectedIndex = 0;

//Fill Combo2

this.C1Combo2.AddItem("Partial Include");

this.C1Combo2.AddItem("Equal");

this.C1Combo2.AddItem("Less Than");

this.C1Combo2.AddItem("Greater Than");

this.C1Combo2.SelectedIndex = 0;

//Fill Combo3

this.C1Combo3.AddItem("Start From Beginning");

this.C1Combo3.AddItem("Start After Current Row");

this.C1Combo3.SelectedIndex = 0;

this.TextBox1.Text = "";

}


Tutorial 17 - Conduct Searching using the Find Method - C#3

C#

private void Button1_Click( System.object sender,

System.EventArgs e) {

//if ( no search string, do nothing

if ( this.TextBox1.Text.Trim() == "" ) {

return;

}

switch (this.C1Combo2.Text) {

case "Partial Include":

matchCompare = C1.Win.C1List.MatchCompareEnum.PartiallyEqual;

break;

case "Equal":

matchCompare = C1.Win.C1List.MatchCompareEnum.Equal;

break;

case "Less Than":

matchCompare = C1.Win.C1List.MatchCompareEnum.LessThan;

break;

case "Greater Than":

matchCompare = C1.Win.C1List.MatchCompareEnum.GreaterThan;

break;

}

switch (this.C1Combo3.Text) {

case "Start From Beginning":

this.fromStart = true;

break;

case "Start After Current Row":

this.fromStart = false;

break;

}

int found;

if ( this.fromStart ) {

found = this.C1List1.Find(this.TextBox1.Text.Trim(), this.matchCompare, true, 0, this.C1Combo1.Text);

} else {

found = this.C1List1.Find(this.TextBox1.Text.Trim(),

this.matchCompare, false, this.C1List1.Bookmark, this.C1Combo1.Text);

}

if ( found >= 0 ) {

this.C1List1.SelectedIndex = found;

} else {

MessageBox.Show("No further record is found", "List");

}

}


Tutorial 17 - Conduct Searching using the Find Method - C#4

C#

private void Button2_Click( System.object sender, System.EventArgs e) {

this.C1List1.ClearSelected();

}


Tutorial 17 - Conduct Searching using the Find Method - Delphi

Delphi

fromStart: Boolean;

matchCompare: C1.Win.C1List.MatchCompareEnum;


Tutorial 17 - Conduct Searching using the Find Method - Delphi2

Delphi

procedure MainForm.Form1_Load(Sender: System.Object; e: System.EventArgs);

begin

oleDbDataAdapter1.Fill(dsCustomers, 'Customers');

C1List1.DataSource := dsCustomers.Tables[0];

// Fill Combo1

with comboBox1 do

begin

Items.Add('Company');

Items.Add('Contacted');

Items.Add('CustType');

Items.Add('FirstName');

Items.Add('LastName');

Items.Add('Phone');

Items.Add('UserCode');

SelectedIndex := 0;

end;

// Fill Combo2

with comboBox2 do

begin

Items.Add('Partial Include');

Items.Add('Equal');

Items.Add('Less Than');

Items.Add('Greater Than');

SelectedIndex := 0;

end;

// Fill Combo3

with comboBox3 do

begin

Items.Add('Start From Beginning');

Items.Add('Start After Current Row');

SelectedIndex := 0;

end;

textBox1.Text := '';

end;


Tutorial 17 - Conduct Searching using the Find Method - Delphi3

Delphi

procedure MainForm.button2_Click(Sender: System.Object; e: System.EventArgs);

var

found: Integer;

begin

// If no search string, do nothing

if textBox1.Text.Trim() = '' then

exit;

if comboBox2.SelectedItem.ToString = 'Partial Include' then

matchCompare := C1.Win.C1List.MatchCompareEnum.PartiallyEqual

else

if comboBox2.SelectedItem.ToString = 'Equal' then

matchCompare := C1.Win.C1List.MatchCompareEnum.Equal

else

if comboBox2.SelectedItem.ToString = 'Less Than' then

matchCompare := C1.Win.C1List.MatchCompareEnum.LessThan

else

matchCompare := C1.Win.C1List.MatchCompareEnum.GreaterThan;

fromStart := comboBox3.SelectedItem.ToString = 'Start From Beginning';

if fromStart then

found := C1List1.Find(textBox1.Text, matchCompare, true, 0, comboBox1.SelectedItem.ToString)

else

found := C1List1.Find(textBox1.Text, matchCompare, false, C1List1.Bookmark, comboBox1.SelectedItem.ToString);

if found > 0 then

C1List1.SelectedIndex := found

else

MessageBox.Show('No further record is found', 'TDBList');

end;


Tutorial 17 - Conduct Searching using the Find Method - Delphi4

Delphi

procedure MainForm.button1_Click(Sender: System.Object; e: System.EventArgs);

begin

C1List1.ClearSelected;

end;


Tutorial 17 - Conduct Searching using the Find Method - Visual Basic

Visual Basic

Dim matchCompare As C1.Win.C1List.MatchCompareEnum

Dim fromStart As Boolean


Tutorial 17 - Conduct Searching using the Find Method - Visual Basic2

Visual Basic

Private Sub Form1_Load(ByVal sender As System.Object,_

ByVal e As System.EventArgs) Handles MyBase.Load

'Fill the dataset

Me.OleDbDataAdapter1.Fill(Me.DsCustomers1)

'Fill Combo1

With Me.C1Combo1

.AddItem("Company")

.AddItem("Contacted")

.AddItem("CustType")

.AddItem("FirstName")

.AddItem("LastName")

.AddItem("Phone")

.AddItem("UserCode")

.SelectedIndex = 0

End With

'Fill Combo2

With Me.C1Combo2

.AddItem("Partial Include")

.AddItem("Equal")

.AddItem("Less Than")

.AddItem("Greater Than")

.SelectedIndex = 0

End With

'Fill Combo3

With Me.C1Combo3

.AddItem("Start From Beginning")

.AddItem("Start After Current Row")

.SelectedIndex = 0

End With

Me.TextBox1.Text = ""

End Sub


Tutorial 17 - Conduct Searching using the Find Method - Visual Basic3

Visual Basic

Private Sub Button1_Click(ByVal sender As System.Object,_

ByVal e As System.EventArgs) Handles Button1.Click

'If no search string, do nothing

If Me.TextBox1.Text.Trim() = "" Then

Exit Sub

End If

Select Case Me.C1Combo2.Text

Case "Partial Include"

matchCompare = C1.Win.C1List.MatchCompareEnum.PartiallyEqual

Case "Equal"

matchCompare = C1.Win.C1List.MatchCompareEnum.Equal

Case "Less Than"

matchCompare = C1.Win.C1List.MatchCompareEnum.LessThan

Case "Greater Than"

matchCompare = C1.Win.C1List.MatchCompareEnum.GreaterThan

End Select

Select Case Me.C1Combo3.Text

Case "Start From Beginning"

Me.fromStart = True

Case "Start After Current Row"

Me.fromStart = False

End Select

Dim found As Integer

If Me.fromStart Then

found = Me.C1List1.Find(Me.TextBox1.Text.Trim(),_

Me.matchCompare, True, 0, Me.C1Combo1.Text)

Else

found = Me.C1List1.Find(Me.TextBox1.Text.Trim(),_

Me.matchCompare, False, Me.C1List1.Bookmark, Me.C1Combo1.Text)

End If

If found >= 0 Then

Me.C1List1.SelectedIndex = found

Else

MessageBox.Show("No further record is found", "List")

End If

End Sub


Tutorial 17 - Conduct Searching using the Find Method - Visual Basic4

Visual Basic

Private Sub Button2_Click(ByVal sender As System.Object,_

ByVal e As System.EventArgs) Handles Button2.Click

Me.C1List1.ClearSelected()

End Sub


Tutorial 18 - Search Using MatchEntry - C#

C#

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

//Fill the dataset

this.OleDbDataAdapter1.Fill(this.DsCustomers1);

//Fill Combo1

this.C1Combo1.AddItem("Current Mouse Position");

this.C1Combo1.AddItem("DisplayMember");

this.C1Combo1.AddItem("Current Selected Col");

this.C1Combo1.SelectedIndex = 0;

//Fill Combo2

this.C1Combo2.AddItem("Partial Include");

this.C1Combo2.AddItem("Equal");

this.C1Combo2.AddItem("Less Than");

this.C1Combo2.AddItem("Greater Than");

this.C1Combo2.SelectedIndex = 0;

//Fill Combo3

this.C1Combo3.AddItem("Standard");

this.C1Combo3.AddItem("Extended");

this.C1Combo3.SelectedIndex = 0;

//Fill combo4

this.C1Combo4.AddItem("2000");

this.C1Combo4.AddItem("1000");

this.C1Combo4.AddItem("3000");

this.C1Combo4.SelectedIndex = 0;

//Start

this.C1List1.MatchCol = C1.Win.C1List.MatchColEnum.CurrentMousePos;

this.C1List1.MatchCompare = C1.Win.C1List.MatchCompareEnum.PartiallyEqual;

this.C1List1.MatchEntry = C1.Win.C1List.MatchEntryEnum.Standard;

this.C1List1.MatchEntryTimeout = 2000;

}


Tutorial 18 - Search Using MatchEntry - C#2

C#

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

{

switch (this.C1Combo1.Text)

{

case "Current Mouse Position":

this.C1List1.MatchCol = C1.Win.C1List.MatchColEnum.CurrentMousePos;

break;

case "ListField":

this.C1List1.MatchCol = C1.Win.C1List.MatchColEnum.DisplayMember;

break;

case "Current Selected Col":

this.C1List1.MatchCol = C1.Win.C1List.MatchColEnum.CurrentSelectedCol;

break;

}

}

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

{

switch (this.C1Combo2.Text)

{

case "Partial Include":

this.C1List1.MatchCompare = C1.Win.C1List.MatchCompareEnum.PartiallyEqual;

break;

case "Equal":

this.C1List1.MatchCompare = C1.Win.C1List.MatchCompareEnum.Equal;

break;

case "Less Than":

this.C1List1.MatchCompare = C1.Win.C1List.MatchCompareEnum.LessThan;

break;

case "Greater Than":

this.C1List1.MatchCompare = C1.Win.C1List.MatchCompareEnum.GreaterThan;

break;

}

}

private void C1Combo3_Change( object sender, System.EventArgs e) {

switch (this.C1Combo3.Text) {

case "Standard";

this.C1List1.MatchEntry = C1.Win.C1List.MatchEntryEnum.Standard;

break;

case "Extended";

this.C1List1.MatchEntry = C1.Win.C1List.MatchEntryEnum.Extended;

break;

}

}

private void C1Combo4_Change( object sender, System.EventArgs e) {

switch (this.C1Combo4.Text) {

case "2000";

this.C1List1.MatchEntryTimeout = 2000;

break;

case "1000";

this.C1List1.MatchEntryTimeout = 1000;

break;

case "3000";

this.C1List1.MatchEntryTimeout = 3000;

break;

}

}


Tutorial 18 - Search Using MatchEntry - Delphi

Delphi

procedure MainForm.Form1_Load(Sender: System.Object; e: System.EventArgs);

begin

oleDbDataAdapter1.Fill(dsCustomers, 'Customers');

C1List1.DataSource := dsCustomers.Tables[0];

// Fill Combo1

with comboBox1 do

begin

Items.Add('Current Mouse Position');

Items.Add('DisplayMember');

Items.Add('Current Selected Col');

SelectedIndex := 0;

end;

// Fill Combo2

with comboBox2 do

begin

Items.Add('Partial Include');

Items.Add('Equal');

Items.Add('Less Than');

Items.Add('Greater Than');

SelectedIndex := 0;

end;

// Fill Combo3

with comboBox3 do

begin

Items.Add('Standard');

Items.Add('Extended');

SelectedIndex := 0;

end;

// Fill Combo4

with comboBox4 do

begin

Items.Add('2000');

Items.Add('1000');

Items.Add('3000');

SelectedIndex := 0;

end;

//Start

C1List1.MatchCol := C1.Win.C1List.MatchColEnum.CurrentMousePos;

C1List1.MatchCompare := C1.Win.C1List.MatchCompareEnum.PartiallyEqual;

C1List1.MatchEntry := C1.Win.C1List.MatchEntryEnum.Standard;

C1List1.MatchEntryTimeout := 2000;

end;


Tutorial 18 - Search Using MatchEntry - Delphi2

Delphi

procedure MainForm.comboBox1_SelectionChangeCommitted(Sender: System.Object; e: System.EventArgs);

begin

with comboBox1.SelectedItem do

if ToString = 'Current Mouse Position' then

C1List1.MatchCol := C1.Win.C1List.MatchColEnum.CurrentMousePos

else

if ToString = 'DisplayMember' then

C1List1.MatchCol := C1.Win.C1List.MatchColEnum.DisplayMember

else

C1List1.MatchCol := C1.Win.C1List.MatchColEnum.CurrentSelectedCol;

end;

procedure MainForm.comboBox2_SelectionChangeCommitted(Sender: System.Object; e: System.EventArgs);

begin

with comboBox2.SelectedItem do

if ToString = 'Partial Include' then

C1List1.MatchCompare := C1.Win.C1List.MatchCompareEnum.PartiallyEqual

else

if ToString = 'Equal' then

C1List1.MatchCompare := C1.Win.C1List.MatchCompareEnum.Equal

else

if ToString = 'Less Than' then

C1List1.MatchCompare := C1.Win.C1List.MatchCompareEnum.LessThan

else

C1List1.MatchCompare := C1.Win.C1List.MatchCompareEnum.GreaterThan;

end;

procedure MainForm.comboBox3_SelectionChangeCommitted(Sender: System.Object; e: System.EventArgs);

begin

if comboBox3.SelectedItem.ToString = 'Standard' then

C1List1.MatchEntry := C1.Win.C1List.MatchEntryEnum.Standard

else

C1List1.MatchEntry := C1.Win.C1List.MatchEntryEnum.Extended;

end;

procedure MainForm.comboBox4_SelectionChangeCommitted(Sender: System.Object; e: System.EventArgs);

begin

C1List1.MatchEntryTimeout := System.Int32.Parse(comboBox4.SelectedItem.ToString);

end;


Tutorial 18 - Search Using MatchEntry - Visual Basic

Visual Basic

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

'Fill the dataset

Me.OleDbDataAdapter1.Fill(Me.DsCustomers1)

'Fill Combo1

With Me.C1Combo1

.AddItem("Current Mouse Position")

.AddItem("DisplayMember")

.AddItem("Current Selected Col")

.SelectedIndex = 0

End With

'Fill Combo2

With Me.C1Combo2

.AddItem("Partial Include")

.AddItem("Equal")

.AddItem("Less Than")

.AddItem("Greater Than")

.SelectedIndex = 0

End With

'Fill Combo3

With Me.C1Combo3

.AddItem("Standard")

.AddItem("Extended")

.SelectedIndex = 0

End With

'Fill combo4

With Me.C1Combo4

.AddItem("2000")

.AddItem("1000")

.AddItem("3000")

.SelectedIndex = 0

End With

'Start

With Me.C1List1

.MatchCol = C1.Win.C1List.MatchColEnum.CurrentMousePos

.MatchCompare = C1.Win.C1List.MatchCompareEnum.PartiallyEqual

.MatchEntry = C1.Win.C1List.MatchEntryEnum.Standard

.MatchEntryTimeout = 2000

End With

End Sub


Tutorial 18 - Search Using MatchEntry - Visual Basic2

Visual Basic

Private Sub C1Combo1_Change(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1Combo1.Change

Select Case Me.C1Combo1.Text

Case "Current Mouse Position"

Me.C1List1.MatchCol = C1.Win.C1List.MatchColEnum.CurrentMousePos

Case "ListField"

Me.C1List1.MatchCol = C1.Win.C1List.MatchColEnum.DisplayMember

Case "Current Selected Col"

Me.C1List1.MatchCol = C1.Win.C1List.MatchColEnum.CurrentSelectedCol

End Select

End Sub

Private Sub C1Combo2_Change(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1Combo2.Change

Select Case Me.C1Combo2.Text

Case "Partial Include"

Me.C1List1.MatchCompare = C1.Win.C1List.MatchCompareEnum.PartiallyEqual

Case "Equal"

Me.C1List1.MatchCompare = C1.Win.C1List.MatchCompareEnum.Equal

Case "Less Than"

Me.C1List1.MatchCompare = C1.Win.C1List.MatchCompareEnum.LessThan

Case "Greater Than"

Me.C1List1.MatchCompare = C1.Win.C1List.MatchCompareEnum.GreaterThan

End Select

End Sub

Private Sub C1Combo3_Change(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1Combo3.Change

Select Case Me.C1Combo3.Text

Case "Standard"

Me.C1List1.MatchEntry = C1.Win.C1List.MatchEntryEnum.Standard

Case "Extended"

Me.C1List1.MatchEntry = C1.Win.C1List.MatchEntryEnum.Extended

End Select

End Sub

Private Sub C1Combo4_Change(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1Combo4.Change

Select Case Me.C1Combo4.Text

Case "2000"

Me.C1List1.MatchEntryTimeout = 2000

Case "1000"

Me.C1List1.MatchEntryTimeout = 1000

Case "3000"

Me.C1List1.MatchEntryTimeout = 3000

End Select

End Sub


Tutorial 19 - Using the LookUp Feature - C#

C#

this.OleDbConnection1.Open();

DataSet ds;

ds = DataSet11.GetChanges(DataRowState.Modified);

if (ds != null) {

try {

this.OleDbDataAdapter1.Update(ds);

this.OleDbDataAdapter2.Update(ds);

}

catch (Exception eU) {

MessageBox.Show(eU.Message);

}

}

this.OleDbConnection1.Close();


Tutorial 19 - Using the LookUp Feature - C#2

C#

this.OleDbConnection1.Open();

DataSet ds;

ds = DataSet11.GetChanges(DataRowState.Modified);

if ((ds != null) ) {

try {

this.OleDbDataAdapter1.Update(ds);

this.OleDbDataAdapter2.Update(ds);

}

catch (Exception eU) {

MessageBox.Show(eU.Message);

}

}

this.OleDbConnection1.Close();


Tutorial 19 - Using the LookUp Feature - Delphi

Delphi

procedure MainForm.Form1_Load(Sender: System.Object; e: System.EventArgs);

var

parentCol, childCol: DataColumn;

relCustType: DataRelation;

begin

oleDbDataAdapter1.Fill(dataSet11, 'Customers');

oleDbDataAdapter2.Fill(dataSet11, 'CustType');

dataGrid1.DataSource := dataSet11.Tables['Customers'];

c1Combo1.DataSource := dataSet11.Tables['CustType'];

//Add a relation

parentCol := dataSet11.Tables['CustType'].Columns['TypeId'];

childCol := dataSet11.Tables['Customers'].Columns['CustType'];

relCustType := DataRelation.Create('CustomersType', parentCol, childCol);

dataSet11.Relations.Add(relCustType);

//Bind the SelectedValue property

c1Combo1.DataBindings.Add('SelectedValue', dataSet11.Tables['Customers'], 'CustType');

end;


Tutorial 19 - Using the LookUp Feature - Delphi2

Delphi

procedure MainForm.button1_Click(Sender: System.Object; e: System.EventArgs);

var

ds: DataSet;

begin

oleDbConnection1.Open;

ds := dataSet11.GetChanges(DataRowState.Modified);

if ds <> nil then

begin

try

oleDbDataAdapter1.Update(ds);

oleDbDataAdapter2.Update(ds);

except

on e: Exception do

MessageBox.Show(e.Message);

end;

end;

oleDbConnection1.Close;

end;


Tutorial 19 - Using the LookUp Feature - Visual Basic

Visual Basic

'fill the dataset

Me.OleDbDataAdapter1.Fill(Me.DataSet11)

Me.OleDbDataAdapter2.Fill(Me.DataSet11)

'add a relation

Dim parentCol, childCol As DataColumn

Dim relCustType As DataRelation

parentCol =_

DataSet11.Tables("CustType").Columns("TypeId")

childCol = DataSet11.Tables("Customers").Columns("CustType")

relCustType = New DataRelation("CustomersType", parentCol, childCol)

DataSet11.Relations.Add(relCustType)

'bind SelectedValue property

C1Combo1.DataBindings.Add("SelectedValue",_

DataSet11.Tables("Customers"), "CustType")


Tutorial 19 - Using the LookUp Feature - Visual Basic2

Visual Basic

Me.OleDbConnection1.Open()

Dim ds As DataSet

ds = DataSet11.GetChanges(DataRowState.Modified)

If (Not ds Is Nothing) Then

Try

Me.OleDbDataAdapter1.Update(ds)

Me.OleDbDataAdapter2.Update(ds)

Catch eU As Exception

MessageBox.Show(eU.Message)

End Try

End If

Me.OleDbConnection1.Close()


Tutorial 20 - Using the LimitToList Feature - C#

C#

//Fill the dataset

this.OleDbDataAdapter1.Fill(this.DataSet11);

//some settings

this.C1Combo1.SelectedIndex = 0;

this.C1Combo1.DropdownWidth = 500;

this.C1Combo1.MaxDropDownItems = 10;


Tutorial 20 - Using the LimitToList Feature - C#2

C#

private void Button1_Click( System.object sender, System.EventArgs e) {

//Prevent MisMatch

this.C1Combo1.LimitToList = true;

this.C1Combo1.AutoCompletion = true;

this.C1Combo1.SuperBack = true;

}


Tutorial 20 - Using the LimitToList Feature - Delphi

Delphi

// Fill the dataset

Self.OleDbDataAdapter1.Fill(Me.DataSet11);

// some settings

with Me.C1Combo1 do

begin

SelectedIndex = 0;

DropdownWidth = 500;

MaxDropDownItems = 10;

end;


Tutorial 20 - Using the LimitToList Feature - Delphi2

Delphi

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

begin

// Prevent MisMatch

with Self.C1Combo1 do

LimitToList := True;

AutoCompletion := True;

SuperBack := True;

end;

end;


Tutorial 20 - Using the LimitToList Feature - Visual Basic

Visual Basic

'Fill the dataset

Me.OleDbDataAdapter1.Fill(Me.DataSet11)

'some settings

With Me.C1Combo1

.SelectedIndex = 0

.DropdownWidth = 500

.MaxDropDownItems = 10

End With


Tutorial 20 - Using the LimitToList Feature - Visual Basic2

Visual Basic

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'Prevent MisMatch

With Me.C1Combo1

.LimitToList = True

.AutoCompletion = True

.SuperBack = True

End With

End Sub


Tutorial 21 - C#

C#

this.C1Combo1.HoldFields();

this.C1Combo1.AddItem("Greg Daryll;0");

this.C1Combo1.AddItem("Jane Lambert;1");

this.C1Combo1.AddItem("Allen Clark;1");

this.C1Combo1.AddItem("David Elkins;1");

this.C1Combo1.AddItem("Carl Ziegler;0");

this.C1Combo1.AddItem("William Yahner;1");


Tutorial 21 - C#2

C#

this.C1Combo1.HoldFields();

this.C1Combo1.SuspendBinding();

this.C1Combo1.AddItem ("Greg Daryll;0");

this.C1Combo1.AddItem ("Jane Lambert;1");

this.C1Combo1.AddItem ("Allen Clark;1");

this.C1Combo1.AddItem ("David Elkins;1");

this.C1Combo1.AddItem ("Carl Ziegler;0");

this.C1Combo1.AddItem ("William Yahner;1");

this.C1Combo1.ResumeBinding();


Tutorial 21 - Delphi

Delphi

with Self.C1Combo1 do

begin

HoldFields;

AddItem(‘Greg Daryll;0’);

AddItem(‘Jane Lambert;1’);

AddItem(‘Allen Clark;1’);

AddItem(‘David Elkins;1’);

AddItem(‘Carl Ziegler;0’);

AddItem(‘William Yahner;1’);

end;


Tutorial 21 - Delphi2

Delphi

with Self.C1Combo1 do

begin

HoldFields;

AddItemBegin;

AddItemF(‘Greg Daryll;0’);

AddItemF(‘Jane Lambert;1’);

AddItemF(‘Allen Clark;1’);

AddItemF(‘David Elkins;1’);

AddItemF(‘Carl Ziegler;0’);

AddItemF(‘William Yahner;1’);

AddItemEnd;

end;


Tutorial 21 -Visual Basic

Visual Basic

With Me.C1Combo1

.HoldFields()

.AddItem("Greg Daryll;0")

.AddItem("Jane Lambert;1")

.AddItem("Allen Clark;1")

.AddItem("David Elkins;1")

.AddItem("Carl Ziegler;0")

.AddItem("William Yahner;1")

End With


Tutorial 21 - Visual Basic2

Visual Basic

With Me.C1Combo1

.HoldFields()

.SuspendBinding ()

.AddItem ("Greg Daryll;0")

.AddItem ("Jane Lambert;1")

.AddItem ("Allen Clark;1")

.AddItem ("David Elkins;1")

.AddItem ("Carl Ziegler;0")

.AddItem ("William Yahner;1")

.ResumeBinding ()

End With


Using the C1DataColumn Collection Editor - C#

C#

this.C1List1.Columns[0].DataField = “CompanyName”;


Using the C1DataColumn Collection Editor - Delphi

Delphi

Self.C1List1.Columns[0].DataField := ’CompanyName’;


Using the C1DataColumn Collection Editor - Visual Basic

Visual Basic

Me.C1List1.Columns(0).DataField = “CompanyName”


Using the C1DisplayColumn Collection Editor - C#

C#

this.C1List1.Splits[0].DisplayColumns[0].Width = 50;


Using the C1DisplayColumn Collection Editor - Delphi

Delphi

Self.C1List1.Splits[0].DisplayColumns[0].Width := 50;


Using the C1DisplayColumn Collection Editor - Visual Basic

Visual Basic

Me.C1List1.Splits(0).DisplayColumns(0).Width = 50


Using the Split Collection Editor - C#

C#

this.C1List.Splits[0].AllowColMove = true;


Using the Split Collection Editor - Delphi

Delphi

Self.C1List.Splits[0].AllowColMove := True;


Using the Split Collection Editor - Visual Basic

Visual Basic

Me.C1List.Splits(0).AllowColMove = True


Using the Style Collection Editor - C#

C#

this.C1List1.Styles[“Normal”].WrapText = false;


Using the Style Collection Editor - Delphi

Delphi

Self.C1List1.Styles[’Normal’].WrapText := False;


Using the Style Collection Editor - Visual Basic

Visual Basic

Me.C1List1.Styles(“Normal”).WrapText = False


Using the ValueItem Collection Editor - C#

C#

this.C1List1.Columns[0].ValueItems.Values;


Using the ValueItem Collection Editor - Delphi

Delphi

Self.C1List1.Columns[0].ValueItems.Values;


Using the ValueItem Collection Editor - Visual Basic

Visual Basic

Me.C1List1.Columns(0).ValueItems.Values


ValueItemCollection Object - C#

C#

this.C1List1.Columns[0].ValueItems.Values[0].DisplayValue = “Canada”;


ValueItemCollection Object - Delphi

Delphi

Self.C1List1.Columns[0].ValueItems.Values[0].DisplayValue := Canada;


ValueItemCollection Object - Visual Basic

Visual Basic

Me.C1List1.Columns(0).ValueItems.Values(0).DisplayValue = “Canada”


ValueItems Object - C#

C#

this.C1List1.Columns(0).ValueItems.Values;


ValueItems Object - Delphi

Delphi

Self.C1List1.Columns(0).ValueItems.Values;


ValueItems Object - Visual Basic

Visual Basic

Me.C1List1.Columns(0).ValueItems.Values


ValueMember Property - C#

C#

C1Combo1.ValueMember = “TypeId”;


ValueMember Property (C1Combo) - C#

C#

C1Combo1.ValueMember = “TypeId”;


ValueMember Property (C1Combo) - Delphi

Delphi

begin

C1Combo1.ValueMember := TypeId;

end;


ValueMember Property (C1Combo) - Visual Basic

Visual Basic

C1Combo1.ValueMember = “TypeId”


ValueMember Property - Delphi

Delphi

begin

C1Combo1.ValueMember := ‘TypeId’;

end;


ValueMember Property - Visual Basic

Visual Basic

C1Combo1.ValueMember = “TypeId”


Vertical Scrolling and Split Groups - C#

C#

this.C1List1.InsertHorizontalSplit(0) //Create a Split at the left;

this.C1List1.InsertHorizontalSplit(0) // Create another;


Vertical Scrolling and Split Groups - C#2

C#

this.C1List1.Splits.Item[0,1].HorizontalScrollGroup = 2;


Vertical Scrolling and Split Groups - Delphi

Delphi

Self.C1List1.InsertHorizontalSplit(0) // Create a Split at the left;

Self.C1List1.InsertHorizontalSplit(0) // Create another;


Vertical Scrolling and Split Groups - Delphi2

Delphi

Self.C1List1.Splits[0,1].HorizontalScrollGroup := 2;


Vertical Scrolling and Split Groups - Visual Basic

Visual Basic

Me.C1List1.InsertHorizontalSplit(0) 'Create a Split at the left

Me.C1List1.InsertHorizontalSplit(0) ' Create another


Vertical Scrolling and Split Groups - Visual Basic2

Visual Basic

Me.C1List1.Splits.Item(0,1).HorizontalScrollGroup = 2


Working with collections - C#

C#

// Read a Split object property

variable = this.C1List1.Splits[0].Property;

// set a Split object property

this.C1List1.Splits[0]. = variable;


Working with collections - C#2

C#

// Declare Split0 as a Split object

C1.Win.C1List.Split Split0;

// set Split0 to reference the first Split in the collection

Split0 = this.C1List1.Splits[0];


Working with collections - C#3

C#

// Declare Split0 as a Split object

C1.Win.C1List.Split Split0;

// set Split0 to reference the first Split in the collection

Split0 = this.C1List1.Splits[0];


Working with collections - C#4

C#

variable = Split0.Property; // Read a Split object property;

{Split0.Property = variable; // set a Split object property;

{Split0.Method (arg1, arg2, ...); // Execute a Split object method;


Working with collections - C#5

C#

// Read a Split object's properties

variable1 = this.C1List1.Splits[0,0].Property1;

variable2 = this.C1List1.Splits[0,0].Property2;

// set a Split object's properties

this.C1List1.Splits[0,0].Property1 = variable1;

this.C1List1.Splits[0,0].Property2 = variable2;


Working with collections - C#6

C#

// Declare Split0 as a Split

C1List.Split Split0;

// set Split0 to reference the first Split in the collection

Split0 = this.C1List1.Splits[0,0];

// Read a Split object's properties

variable1 = Split0.Property1;

variable2 = Split0.Property2;

// set a Split object's properties

Split0.Property1 = variable1;

Split0.Property2 = variable2;


Working with collections - C#7

C#

// Declare Cols as a Columns collection object, then set it
// to reference C1List1's C1DataColumnCollection object.

C1List.C1DataColumnCollection Cols;

Cols = this.C1List1.Columns;

// Declare Col0 as a DataColumn object, then set it to
// reference the first Column object in the collection.

C1List.C1DataColumn Col0;

Col0 = Cols[0];

// Read and set the DataColumn object's Property1

variable1 = Col0.Property1;

Col0.Property1 = variable1;

// Execute the DataColumn object's Method1 (declared as a Sub)

Col0.Method1 (arg1, arg2, ...);

// Execute the DataColumn object's Method2 (declared as a Function)

variable2 = Col0.Method2(arg1);


Working with collections - C#8

C#

this.C1List1.Columns[0].Property1 = variable1;

this.C1List1.Columns[0].Property2 = variable2;


Working with collections - Delphi

Delphi

// Read a Split object property;

// Set a Split object property;

begin

variable := Self.C1List1.Splits[0].&Property;

Self.C1List1.Splits[0]. := variable;

end;


Working with collections - Delphi2

Delphi

// Declare Split0 as a Split object;

// Set Split0 to reference the first Split in the collection;

var

Split0: C1.Win.C1List.Split;

begin

Split0 := Self.C1List1.Splits[0];

end;


Working with collections - Delphi3

Delphi

// Declare Split0 as a Split object

// set Split0 to reference the first Split in the collection

var

Split0: C1.Win.C1List.Split;

begin

Split0 := Self.C1List1.Splits[0];

end;


Working with collections - Delphi4

Delphi

begin

variable := Split0.&Property;

Split0.&Property := variable;

Split0.Method;

end;


Working with collections - Delphi5

Delphi

begin

variable1 := Self.C1List1.Splits[0, 0].Property1;

variable2 := Self.C1List1.Splits[0, 0].Property2;

Self.C1List1.Splits[0, 0].Property1 := variable1;

Self.C1List1.Splits[0, 0].Property2 := variable2;

end;


Working with collections - Delphi6

Delphi

var

Split0: C1List.Split;

begin

Split0 := Self.C1List1.Splits[0, 0];

variable1 := Split0.Property1;

variable2 := Split0.Property2;

Split0.Property1 := variable1;

Split0.Property2 := variable2;

end;


Working with collections - Delphi7

Delphi

var

Col0: C1List.C1DataColumn;

Cols: C1List.C1DataColumnCollection;

begin

Cols := Self.C1List1.Columns;

Col0 := Cols(0);

variable1 := Col0.Property1;

Col0.Property1 := variable1;

Col0.Method1;

variable2 := Col0.Method2(arg1);

end;


Working with collections - Delphi8

Delphi

begin

Self.C1List1.Columns(0);

end;


Working with collections - Visual Basic

Visual Basic

' Read a Split object property

variable = Me.C1List1.Splits(0).Property

' Set a Split object property

Me.C1List1.Splits(0).Property = variable


Working with collections - Visual Basic2

Visual Basic

' Declare Split0 as a Split object

Dim Split0 As C1.Win.C1List.Split

' Set Split0 to reference the first Split in the collection

Split0 = Me.C1List1.Splits.Item(0)


Working with collections - Visual Basic3

Visual Basic

' Declare Split0 as a Split object

Dim Split0 As C1.Win.C1List.Split

' Set Split0 to reference the first Split in the collection

Split0 = Me.C1List1.Splits(0)


Working with collections - Visual Basic4

Visual Basic

variable = Split0.Property ' Read a Split object property

Split0.Property = variable ' Set a Split object property

Split0.Method (arg1, arg2, ...) ' Execute a Split object method


Working with collections - Visual Basic5

Visual Basic

' Read a Split object's properties

variable1 = Me.C1List1.Splits(0,0).Property1

variable2 = Me.C1List1.Splits(0,0).Property2

' Set a Split object's properties

Me.C1List1.Splits(0,0).Property1 = variable1

Me.C1List1.Splits(0,0).Property2 = variable2


Working with collections - Visual Basic6

Visual Basic

' Declare Split0 as a Split

Dim Split0 As C1List.Split

' Set Split0 to reference the first Split in the collection

Split0 = Me.C1List1.Splits.Item(0,0)

' Read a Split object's properties

variable1 = Split0.Property1

variable2 = Split0.Property2

' Set a Split object's properties

Split0.Property1 = variable1

Split0.Property2 = variable2


Working with collections - Visual Basic7

Visual Basic

' Declare Cols as a Columns collection object, then set it
' to reference C1List1's C1DataColumnCollection object.

Dim Cols As C1List.C1DataColumnCollection

Cols = Me.C1List1.Columns

' Declare Col0 as a DataColumn object, then set it to
' reference the first Column object in the collection.

Dim Col0 As C1List.C1DataColumn

Col0 = Cols(0)

' Read and set the DataColumn object's Property1

variable1 = Col0.Property1

Col0.Property1 = variable1

' Execute the DataColumn object's Method1 (declared as a Sub)

Col0.Method1 (arg1, arg2, ...)

' Execute the DataColumn object's Method2 (declared as a Function)

variable2 = Col0.Method2(arg1)


Working with collections - Visual Basic8

Visual Basic

With Me.C1List1.Columns(0)

.Property1 = variable1

.Property2 = variable2

End With


Working with Columns in Splits - C#

C#

this.C1List1.Splits[1].DisplayColumns["LastName"].Visible = true;


Working with Columns in Splits - Delphi

Delphi

Self.C1List1.Splits[1].DisplayColumns['LastName'];


Working with Columns in Splits - Visual Basic

Visual Basic

Me.C1List1.Splits(1).DisplayColumns("LastName").Visible = True


Working with the Count property - C#

C#

// set a variable equal to the number of Splits in C1List1

variable = this.C1List1.Splits.Count;


Working with the Count property - C#2

C#

for ( int n = 0; n <= this.C1List1.Columns.Count – 1; n++) {

Console.WriteLine(this.C1List1.Columns[n].Caption);

}


Working with the Count property - C#3

C#

// Determine how many columns there are

int NumCols;

NumCols = this.C1List1.Columns.Count;

// Append a column to the end of the Columns collection

C1List.C1DataColumn C = new C1List.C1DataColumn();

this.C1List1.Columns.Insert(NumCols, C);

// The following loop removes all columns from the list

while ( this.C1List1.Columns.Count)

this.C1List1.Columns.RemoveAt(0);


Working with the Count property - C#4

C#

C1List.C1DataColumn C;

foreach ( C in this.C1List1.Columns )

Console.WriteLine(C.Caption);

}


Working with the Count property - Delphi

Delphi

begin

variable := Self.C1List1.Splits.Count;

end;


Working with the Count property - Delphi2

Delphi

begin

while n <= Self.C1List1.Columns.Count do

begin

Console.WriteLine(Self.C1List1.Columns[n].Caption);

Inc(n);

end;

end;


Working with the Count property - Delphi3

Delphi

var

C: C1List.C1DataColumn;

NumCols: Integer;

begin

// Determine how many columns there are

NumCols := Self.C1List1.Columns.Count;

// Append a column to the end of the Columns collection

Self.C1List1.Columns.Insert(NumCols, C);

// Make the new column visible, since columns created

// at run time are invisible by default

Self.C1List1.VisibleCols(NumCols);

// The following loop removes all columns from the list

while Self.C1List1.Columns.Count > 0 do

begin

Self.C1List1.Columns.RemoveAt(0);

end;

end;


Working with the Count property - Delphi4

Delphi

var

I: Integer;

begin

for I := 0 to C1List1.Columns.Count – 1 do

Console.WriteLine(C1List1.Columns[I].Caption);

end;


Working with the Count property - Visual Basic

Visual Basic

' Set a variable equal to the number of Splits in C1List1

variable = Me.C1List1.Splits.Count


Working with the Count property - Visual Basic2

Visual Basic

For n = 0 To Me.C1List1.Columns.Count - 1

Debug.WriteLine(Me.C1List1.Columns(n).Caption)

Next n


Working with the Count property - Visual Basic3

Visual Basic

' Determine how many columns there are

Dim NumCols As Integer

NumCols = Me.C1List1.Columns.Count

' Append a column to the end of the Columns collection

Dim C As New C1List.C1DataColumn()

Me.C1List1.Columns.Insert(NumCols, C)

' The following loop removes all columns from the list

While Me.C1List1.Columns.Count

Me.C1List1.Columns.RemoveAt(0)

Wend


Working with the Count property - Visual Basic4

Visual Basic

Dim C As C1List.C1DataColumn

For Each C In Me.C1List1.Columns

Debug.WriteLine(C.Caption)

Next S


Untitled Document


Untitled Document

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