[サンプルコード]
下記はDateEdit オブジェクトに値を入力し、ボタンの押下によって値を確定する例です。
入力値がDate型でない場合、文字色を赤く表示します。
Form Form1 {
X = 0;
Y = 0;
Width = 250;
Height = 150;
DateEdit DateEdit1 {
X = 10;
Y = 10;
Width = 100;
Height = 30;
/*Date型でない場合、文字色を赤くします*/
UndecidedStyle = $FgColor;
}
Button Button1 {
X = 10;
Y = 50;
Width = 100;
Height = 30;
Title = "ボタン";
Function OnTouch( e ) {
MessageBox(Form1.DateEdit1.Value);
}
}
} |