Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

[ Image Removed |../../index.htm#lansa/l4wdev03_0375.htm]
現在地:

...

フィールド名

STD_NUM

説明

STD_NUMフィールドを例として、NoMatchActionの動作を説明します。

詳細

NoMatchActionはPRIM_PKLTコンポーネントのプロパティです。ピックリストに定義されていない値がフィールドに設定されたときの、ピックリストの動作を定義するために使います。プロパティ値によってどのように動作が変わるかを以下に示します。

フィールド・ソース(NoMatchAction = Blanksの場合)

Begin_

...

Com Role(*

...

EXTENDS #PRIM_OBJT)

...

Begin_

...

Com Role(*

...

Visual #PRIM_EVEF)

...

Name(#VisualEdit)

...

Height(19)

...

Usepicklist(False)

...

Width(262)

...


End_Com

...


Begin_

...

Com Role(*

...

Visual #PRIM_EVSE)

...

Name(#VisualSpinEdit)

...

Defaultvisual(True)

...

Height(19)

...

Usepicklist(False)

...

Width(262)

...


End_Com

...


Begin_

...

Com Role(*picklist)

...

Name(#Picklist)

...

Nomatchaction(Blanks)

...


Define_

...

Com Class(#PRIM_PKIT)

...

Name(#Item_1)

...

Caption('

...

Item 1')

...

Default(True)

...

Parent(#Picklist)

...

Value(1)
Define_

...

Com Class(#PRIM_PKIT)

...

Name(#Item_2)

...

Caption('

...

Item 2')

...

Parent(#Picklist)

...

Value(2)
Define_

...

Com Class(#PRIM_PKIT)

...

Name(#Item_3)

...

Caption('

...

Item 3')

...

Parent(#Picklist)

...

Value(3)
Define_

...

Com Class(#PRIM_PKIT)

...

Name(#Item_4)

...

Caption('

...

Item 4')

...

Parent(#Picklist)

...

Value(4)
Define_

...

Com Class(#PRIM_PKIT)

...

Name(#Item_5)

...

Caption('

...

Item 5')

...

Parent(#Picklist)

...

Value(5)

...


End_Com

...


End_Com

...

フォーム・ソース(NoMatchAction = Blanksの場合)

...

Function Options(*DIRECT)

...

Begin_

...

Com Role(*

...

EXTENDS #PRIM_FORM)

...

Clientheight(108)

...

Clientwidth(492)

...

Height(135)

...

Left(357)

...

Top(148)

...


Define_

...

Com Class(#STD_NUM.Visual)

...

Name(#STD_NUM)

...

Displayposition(1)

...

Left(96)

...

Parent(#COM_OWNER)

...

Tabposition(1)

...

Top(32)

...

Usepicklist(True)
Define_

...

Com Class(#PRIM_PHBN)

...

Name(#PHBN_1)

...

Caption('

...

Set Invalid Value')

...

Displayposition(2)

...

Left(248)

...

Parent(#COM_OWNER)

...

Tabposition(2)

...

Top(72)

...

Width(114)

...


Evtroutine Handling(#PHBN_1.Click)

...


*

...

As UsePicklist=TRUE the only allowable values for the STD_NUM field are the values defined in the picklist.
* The value 1234 is not in the Picklist for STD_NUM so 1234 is an invalid value.The NoMatchAction setting will
* then take presedence
Change Field(#STD_NUM)

...

To(1234)

...


Endroutine
End_Com

...

外観(NoMatchAction = Blanksの場合)

Image RemovedImage Added

フィールド・ソース(NoMatchAction = ShowValueの場合)

Begin_

...

Com Role(*

...

EXTENDS #PRIM_OBJT)

...

Begin_

...

Com Role(*

...

Visual #PRIM_EVEF)

...

Name(#VisualEdit)

...

Height(19)

...

Usepicklist(False)

...

Width(262)

...


End_Com

...


Begin_

...

Com Role(*

...

Visual #PRIM_EVSE)

...

Name(#VisualSpinEdit)

...

Defaultvisual(True)

...

Height(19)

...

Usepicklist(False)

...

Width(262)

...


End_Com

...


Begin_

...

Com Role(*picklist)

...

Name(#Picklist)

...

Nomatchaction(ShowValue)

...


Define_

...

Com Class(#PRIM_PKIT)

...

Name(#Item_1)

...

Caption('

...

Item 1')

...

Default(True)

...

Parent(#Picklist)

...

Value(1)
Define_

...

Com Class(#PRIM_PKIT)

...

Name(#Item_2)

...

Caption('

...

Item 2')

...

Parent(#Picklist)

...

Value(2)
Define_

...

Com Class(#PRIM_PKIT)

...

Name(#Item_3)

...

Caption('

...

Item 3')

...

Parent(#Picklist)

...

Value(3)
Define_

...

Com Class(#PRIM_PKIT)

...

Name(#Item_4)

...

Caption('

...

Item 4')

...

Parent(#Picklist)

...

Value(4)
Define_

...

Com Class(#PRIM_PKIT)

...

Name(#Item_5)

...

Caption('

...

Item 5')

...

Parent(#Picklist)

...

Value(5)

...


End_Com

...


End_Com

...

フォーム・ソース(NoMatchAction = ShowValueの場合)

...

Function Options(*DIRECT)

...

Begin_

...

Com Role(*

...

EXTENDS #PRIM_FORM)

...

Clientheight(108)

...

Clientwidth(492)

...

Height(135)

...

Left(357)

...

Top(148)

...


Define_

...

Com Class(#STD_NUM.Visual)

...

Name(#STD_NUM)

...

Displayposition(1)

...

Left(96)

...

Parent(#COM_OWNER)

...

Tabposition(1)

...

Top(32)

...

Usepicklist(True)
Define_

...

Com Class(#PRIM_PHBN)

...

Name(#PHBN_1)

...

Caption('

...

Set Invalid Value')

...

Displayposition(2)

...

Left(248)

...

Parent(#COM_OWNER)

...

Tabposition(2)

...

Top(72)

...

Width(114)

...


Evtroutine Handling(#PHBN_1.Click)

...


*

...

As UsePicklist=TRUE the only allowable values for the STD_NUM field are the values defined in the picklist.
* The value 1234 is not in the Picklist for STD_NUM so 1234 is an invalid value.The NoMatchAction setting will
* then take presedence
Change Field(#STD_NUM)

...

To(1234)

...


Endroutine
End_Com

...

外観(NoMatchAction = ShowValueの場合)

Image RemovedImage Added

フィールド・ソース(NoMatchAction = DefaultItemの場合)

Begin_Com RoleCom Role(*EXTENDS #PRIMEXTENDS #PRIM_OBJT)
  Begin_Com RoleCom Role(*Visual #PRIMVisual #PRIM_EVEF)  NameName(#VisualEdit)  HeightHeight(19)  UsepicklistUsepicklist(False)  WidthWidth(262)  
End_Com  
Begin_Com RoleCom Role(*Visual #PRIMVisual #PRIM_EVSE)  NameName(#VisualSpinEdit)  DefaultvisualDefaultvisual(True)  HeightHeight(19)  UsepicklistUsepicklist(False)  WidthWidth(262)  
End_Com  
Begin_Com RoleCom Role(*picklist)  NameName(#Picklist)  
Define_Com ClassCom Class(#PRIM_PKIT)  NameName(#Item_1)  CaptionCaption('Item 1Item 1')  DefaultDefault(True)  ParentParent(#Picklist)  ValueValue(1)
Define_Com ClassCom Class(#PRIM_PKIT)  NameName(#Item_2)  CaptionCaption('Item 2Item 2')  ParentParent(#Picklist)  ValueValue(2)
Define_Com ClassCom Class(#PRIM_PKIT)  NameName(#Item_3)  CaptionCaption('Item 3Item 3')  ParentParent(#Picklist)  ValueValue(3)
Define_Com ClassCom Class(#PRIM_PKIT)  NameName(#Item_4)  CaptionCaption('Item 4Item 4')  ParentParent(#Picklist)  ValueValue(4) Define_Com ClassCom Class(#PRIM_PKIT)  NameName(#Item_5)  CaptionCaption('Item 5Item 5')  ParentParent(#Picklist)  ValueValue(5)   End_Com   End_Com
 
フォーム・ソース(NoMatchAction = DefaultItemの場合)
Function Options(*DIRECT)
  Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(108) Clientwidth(492) Height(135) Left(357) Top(148)   Define_Com Class(#STD_NUM.Visual) Name(#STD_NUM) Displayposition(1) Left(96) Parent(#COM_OWNER) Tabposition(1) Top(32) Usepicklist(True) Define_Com Class(#PRIM_PHBN) Name(#PHBN_1) Caption('Set Invalid Value') Displayposition(2) Left(248) Parent(#COM_OWNER) Tabposition(2) Top(72) Width(114)   Evtroutine Handling(#PHBN_1.Click)   * As UsePicklist=TRUE the only allowable values for the STD_NUM field are the values defined in the picklist. * The value 1234 is not in the Picklist for STD_NUM so 1234 is an invalid value.The NoMatchAction setting will * then take presedence   Change Field(#STD_NUM) To(1234)   Endroutine End_Com
 
外観(NoMatchAction = DefaultItemの場合)

注:NoMatchActionプロパティは、UsePicklist=TRUEの場合にのみ意味を持ちます。
[ |../../index.htm#lansa/l4wdev03_0375.htm]