Example Code

Correctly Sized .NET Month Calendar Example Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

LabVIEW 2012 and 2013 have a known issue that automatically incorrectly resizes the MonthCalendar .NET control when the VI is running. The example uses the Container Bounds of the MonthCalendar Property Node to correctly resize the MonthCalendar when the VI is running.

 

Description

The example provides a correctly sized MonthCalendar .NET Control. In addition, a Property Node is used to circle the current date on the calendar, number the weeks, bold chosen dates annually, and allow the users to set the first day of the week they would like to set for the calendar.

In general, to create a correctly sized MonthCalendar .NET Control, create a MonthCalendar Property Node and set it to Container Bounds>> All Elements. Then wire a constant (approximately 200) that will show the full calendar when the VI is running.

 

Requirements

  • LabVIEW 2013 (or compatible)

 

Steps to Implement or Execute Code

  1. Download the VI.
  2. Run the VI

Additional Information or References

VI Block Diagram

Calendar.PNG

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.