ItemChangedAccept イベントはアイテムが変更されようとしている時に起動します
ツリー ビュー (PRIM_TRVW) のメンバ
名前 | タイプ | データ タイプ | 記述 |
---|---|---|---|
Accept | *Both | ブール値 | FALSE に設定して、イベントが続行するのを防ぎます |
Reason | *Input | 列挙 | イベントを発生させたアクション |
Continue | *Both | ブール値 | FALSE に設定して、フォーカスが別のアイテムに移動しないようにします |
Value | *Input | バリアント | 変更時のアイテムの値 |
ItemChangedAccept イベントは、基になるリスト項目の更新直前に起動します。 これは、 ItemChanged イベントの代わりではなく、編集処理を中断する機会を提供します。 フォーカスが変化しないようにするには、 Accept パラメーターを False に設定します。 さまざまなユーザーアクションによって、 ItemChangedAccept が起動することがあります。Reason パラメータには、原因に関するフィードバックを提供する列挙体が含まれています。
この例では、 accept および continue パラメータが、 grid内の動作にどのように影響するかを示します。
Function Options(*DIRECT) Begin_Com Role(*EXTENDS #PRIM_FORM) Clientwidth(792) Clientheight(394) Componentversion(2) Top(227) Left(222) Define_Com Class(#PRIM_GRID) Name(#Grid) Captionnoblanklines(True) Columnscroll(False) Componentversion(1) Displayposition(1) Height(337) Left(0) Parent(#COM_OWNER) Showselection(True) Showselectionhilight(False) Showsortarrow(True) Tabposition(1) Top(0) Width(792) Columnbuttonheight(25) Rowheight(28) Columnbuttonpress(True) Columnellipses(End) Frozencolumns(3) Define_Com Class(#PRIM_GDCL) Name(#GridColumn1) Displayposition(1) Parent(#Grid) Source(#EMPNO) Width(10) Widthtype(Fixed) Define_Com Class(#PRIM_GDCL) Name(#GridColumn2) Displayposition(2) Parent(#Grid) Source(#SURNAME) Width(18) Widthtype(Fixed) Readonly(False) Define_Com Class(#PRIM_GDCL) Name(#GridColumn3) Displayposition(3) Parent(#Grid) Source(#GIVENAME) Widthtype(Fixed) Readonly(False) Define_Com Class(#PRIM_CKBX) Name(#Accept) Caption('Accept value change?') Displayposition(2) Left(11) Marginleft(2) Parent(#COM_OWNER) Tabposition(2) Top(352) Width(214) Define_Com Class(#PRIM_CKBX) Name(#Continue) Caption('Continue to the next item?') Displayposition(3) Left(232) Marginleft(2) Parent(#COM_OWNER) Tabposition(3) Top(352) Width(241) Evtroutine Handling(#Com_Owner.CreateInstance) Select Fields(#Grid) From_File(pslmst) Add_Entry To_List(#Grid) Endselect Endroutine Evtroutine Handling(#Grid.ItemChangedAccept) Accept(#AcceptChange) Continue(#ContinueChange) #AcceptChange := #Accept.ButtonState = Checked #ContinueChange := #Continue.ButtonState = Checked Endroutine End_Com
2018 - V14SP1