コントロールの値が null (VB では Nothing) の場合、コントロールはデフォルトで空の文字列を表示します。NullText プロパティによって、開発者は null 値 (たとえば、「(NULL)」または「(none)」) に表示されるテキストを変更できます。
Imports Infragistics.Win Imports Infragistics.Win.UltraWinEditors Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Set the Nullable property to true so the control's Value property ' can be set to Nothing Me.UltraDateTimeEditor1.Nullable = True ' Set the NullText property so the end user knows that there is ' no valid date selected Me.UltraDateTimeEditor1.NullText = "[no date selected]" End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinEditors; private void button1_Click(object sender, System.EventArgs e) { // Set the Nullable property to true so the control's Value property // can be set to null this.ultraDateTimeEditor1.Nullable = true; // Set the NullText property so the end user knows that there is // no valid date selected this.ultraDateTimeEditor1.NullText = "[no date selected]"; }