Page History
IContextualSubject (PRIM_DC.IContextualSubject)
| Panel | ||
|---|---|---|
| ||
フィールドビジュアライゼーションを提供している再利用可能パーツに現在のコンテキストを決定することを許可するインターフェース |
...
祖先 - なし
詳細
PRIM_DC.IContextualSubject は、 Visual Host フィールドの視覚化として機能する再利用可能な部分によって実装されます。 フィールドの視覚化として機能する再利用可能な部分によって実装されます。
OnContextChanged メソッドは、ホスティング Field や Grid Column の面に変更があるたびに実行されます。
例
次の例では 次の例では iMonitorSubject と iContextualSubject インターフェイスを使用して、フィールドの視覚化 (この場合は SURNAME のオートコンプリート機能) としての使用をサポートしています。
Function Options(*DIRECT)
...
Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_dc.iMonitorSubject #Prim_dc.iContextualSubject) Defaultpty(Value) Displayposition(1) Height(19) Layoutmanager(#TableLayout_1) Left(0) Tabposition(1) Tabstop(False) Top(0) Width(418)
...
Define_Com Class(#Surname.Visualedit) Name(#Surname) Displayposition(1) Height(19) Marginleft(0) Parent(#COM_OWNER) Tabposition(1) Width(418)
...
Define_Com Class(#PRIM_TBLO) Name(#TableLayout_1)
...
Define_Com Class(#PRIM_TBLO.Row) Name(#Row_1) Displayposition(1) Parent(#TableLayout_1)
...
Define_Com Class(#PRIM_TBLO.Column) Name(#Column_1) Displayposition(1) Parent(#TableLayout_1)
...
Define_Com Class(#PRIM_TBLO.Item) Name(#Item_1) Column(#Column_1) Manage(#Surname) Parent(#TableLayout_1) Row(#Row_1)
...
* Default property of the Value to allow data values to beset/retrieved Define_Pty Name(Value) Get(*auto #Surname) Set(*auto #Surname)
...
Mthroutine Name(OnContextChanged) Options(*redefine)
...
* If being hosted in a field If (#Context *Is #prim_evp) * Match the edit to the component field state #Surname.ReadOnly := (#Context *As #prim_evp).ReadOnly
...
#Surname.ShowError := (#Context *As #prim_evp).ShowError
...
Endif Endroutine Evtroutine Handling(#Surname.Changed)
...
Signal Event(ValueChanged)
...
Endroutine Evtroutine Handling(#Surname.AutoCompleting) Value(#Value)
...
* Find the first record matching the entered value Select Fields(#Surname) From_File(pslmst2) With_Key(#Value) Generic(*yes)
...
#Value :=
...
#Surname Leave Endselect Endroutine End_Com
メソッド
名前 | 記述 |
|---|---|
データクラスのコンテキストが変更されました。 Context |