FlexView FlexView2 { X = 13; Y = 306; Width = 435; Height = 238; Border = $TRUE; number test1_row; ⁄* 行NOを覚えておくため *⁄ number test2_flg; ⁄* 削除と追加を判断するため *⁄ FlexRecord FlexRecord1 { FlexCheckButton FlexCheckButton1; FlexTextBox FlexTextBox1; FlexButton FlexButton1 { Width=40; Title="削除"; Function OnPushed( e ) { FlexView2.MessageBox("削除しますか?","確認",$YESNO); FlexView2.test1_row = e.row.position; FlexView2.test2_flg = 0; } } FlexTextBox FlexTextBox2; FlexButton FlexButton2 { Width=40; Title="追加"; Function OnPushed( e ) { FlexView2.MessageBox("追加しますか?","確認",$YESNO); FlexView2.test1_row = e.row.position; FlexView2.test2_flg = 1; } } } Function OnYesSelected(e){ if (FlexView2.test2_flg==0){ FlexView2.DeleteRow(test1_row); } if (FlexView2.test2_flg==1){ FlexView2.InsertRow(1,test1_row); } }
CvnetFlexView CvnetFlexView1 { ⁄* Class化されたFlexView *⁄ X = 13; Y = 39; Width = 435; Height = 218; Border = $TRUE; CvnetFlexRecord FlexRecord1 { FlexCheckButton FlexCheckButton1; FlexTextBox FlexTextBox1; CvnetFlexBtIns CvnetFlexBtIns1; CvnetFlexBtDel CvnetFlexBtDel1; FlexTextBox FlexTextBox2; } }