ComponentOne True DBInput Pro 8.0
Tutorial 4 - Selection in TDBCalendar

In this tutorial, you will learn how to use features related to selection, such as whether to use multiple or single selection, the types of selectors to use, and which selection attributes to use in the control.

  1. Start a new project.

  2. From the Visual Basic Project menu, select Components, then check the box labeled ComponentOne True DBCalendar 8.0. Click OK to add the TDBCalendar control icons to the Toolbox.

  3. Place a True DBCalendar control (TDBCalendar1) on the form (Form1) as shown in the following figure.

  4. Using the General property page of TDBCalendar1, set the MultiSelect to 1- Simple.

  5. Place the following into the Form_Load:

    Example Title
    Copy Code
    TDBCalendar1.Selections.Add CDate(“1998/2/9”)
    
    TDBCalendar1.Selections.Add CDate(“1998/3/9”)
    
    TDBCalendar1.Selections.Add CDate(“1998/4/9”)
    

    Since the control is set to multiple selection, 2/9, 3/9 and 4/9 can be selected beforehand.

  6. Using the Attributes property page of TDBCalendar1, set it to the SelAttrib, choose the Colors button to set the BackColor to Blue and the ForeColor to White.

  7. Using the General property page of TDBCalendar1, set SelectStyle to 1 - Box.

  8. Using the Appearance property page of TDBCalendar1, set MonthCols to 2, and MonthRows to 2.

Run the program and observe the following:

This concludes Tutorial 4.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback