You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

ItemGotFocusAcceptはアイテムがフォーカスされた時に発生します
ツリービュー (PRIM_TRVW) のメンバ

パラメータ

名前

タイプ

データタイプ

記述

Accept

*Both

ブール値

FALSEに設定して、イベントが続行するのを防ぎます

Reason

*Input

列挙

イベントを発生させたアクション

詳細


ItemGotFocusAccept イベントは、 ItemGotFocus イベントの直前に起動します。
これは、 ItemGotFocus イベントの代わりではなく、フォーカス処理を中断する機会を提供します。
フォーカスが変化しないようにするには、 Accept パラメーターを False に設定します。


この例では、チェックボックスをオンにするとフォーカスを設定できます。
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Height(469) Left(228) Top(220) Width(686) Clientwidth(670) Clientheight(430)
Define_Com Class(#PRIM_LTVW) Name(#ListView) Columnbuttonheight(19) Componentversion(2) Displayposition(1) Fullrowselect(True) Keyboardpositioning(SortColumn) Left(8) Parent(#COM_OWNER) Showsortarrow(True) Tabposition(1) Top(8) Height(377) Width(657)
Define_Com Class(#PRIM_LVCL) Name(#LVCL1) Displayposition(1) Parent(#ListView) Source(#EMPNO) Width(33)
Define_Com Class(#PRIM_LVCL) Name(#LVCL2) Displayposition(2) Parent(#ListView) Source(#SURNAME) Width(36)
Define_Com Class(#PRIM_LVCL) Name(#LVCL3) Displayposition(3) Parent(#ListView) Source(#GIVENAME) Width(25)
Define_Com Class(#PRIM_CKBX) Name(#AllowFocusChange) Caption('Allow Focus Change?') Displayposition(2) Left(8) Marginleft(2) Parent(#COM_OWNER) Tabposition(2) Top(391) Width(161) Buttonstate(Checked)
Evtroutine Handling(#Com_owner.CreateInstance)
Select Fields(#ListView) From_File(pslmst)
Add_Entry To_List(#ListView)
Endselect
Endroutine
Evtroutine Handling(#ListView.ItemGotFocusAccept) Accept(#Accept)
#Accept := (#AllowFocusChange.buttonState = Checked)
Endroutine
Evtroutine Handling(#ListView.ItemGotFocus)
#Com_owner.Caption += (#Empno + " ")
Endroutine
End_Com

参照

すべてのコンポーネント クラス
テクニカルリファレンス

  • No labels