持ち上げ型ボタン - Clickイベント 

コントロール上でマウスがクリックされた時に起動されます 

持ち上げ型ボタン (PRIM_MD.RaisedButton) のメンバ

パラメータ

名前

タイプ

データタイプ

記述

Origin

*Input

PRIM_CTRL

イベントが最初に起動されたコントロールへの参照

Handled

*Both

ブール値

TRUEに設定して、イベントが親のコントロールに伝達されないようにします

詳細

Click イベントは、マウスが同じコントロールの境界内にあり、ユーザーがマウスの左ボタンを押し、解放する時に起動します。 

Click イベントはルーティング イベントです。つまり、クリック時にマウスポインタの配下にあるコントロールとともに、親チェーンにある別のコントロールでも検知されるということです。 

このイベントの Origin パラメータは、イベントのソースを提供し、Handled パラメータは、親チェーンへの伝達を防ぎます。 

以下の例には 2 つのクリック可能なボタンが存在します。Button2 がクリックされると、Click イベントは handled が True としてフラグされます。 

そうでなければ、このページの Click イベントが起動します。 

     Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME) 

Define_Com Class(#PRIM_TBLO) Name(#Layout)
Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutRow1) DisplayPosition(1) Parent(#Layout)
Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutColumn1) DisplayPosition(1) Parent(#Layout)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem1) Alignment(CenterLeft) Column(#LayoutRow1) Manage(#ListPrimaryText) MarginLeft(16) MarginRight(16) Parent(#Layout) Row(#LayoutColumn1) Sizing(ContentHeightFitToWidth)

Define_Com Class(#PRIM_MD.RaisedButton) Name(#Check) DisplayPosition(1) Left(64) Parent(#COM_OWNER) TabPosition(1) Top(56) ButtonDefault(True) Icon('check') ThemeDrawStyle('MediumTitle')
Define_Com Class(#PRIM_MD.RaisedButton) Name(#Cross) DisplayPosition(2) Left(176) Parent(#COM_OWNER) TabPosition(2) Top(56) ButtonCancel(True) Icon('close') ThemeDrawStyle('MediumTitle')
Define_Com Class(#PRIM_MD.List) Name(#List) DisplayPosition(3) LayoutManager(#Layout) Left(64) Parent(#COM_OWNER) RowHeight(48) TabPosition(3) TabStop(False) ThemeDrawStyle('Card') Top(104) Height(249)
Define_Com Class(#PRIM_MD.ListLabel) Name(#ListPrimaryText) Caption('Single line item') CaptionAlignment(CenterLeft) DisplayPosition(3) Height(19) Left(16) Parent(#List) TabPosition(3) TabStop(False) ThemeDrawStyle('Heading3') Top(15) Width(246)

Evtroutine Handling(#Check.Click) Handled(#Handled)

#Handled := True

Clr_List Named(#List)
#Com_self.AddEntry( "Check" )

Endroutine

Evtroutine Handling(#Cross.Click)

Clr_List Named(#List)
#Com_self.AddEntry( "Cross" )

Endroutine

Evtroutine Handling(#Com_Owner.Click) Origin(#Origin)

If (#Origin *IsEqualTo #Com_owner)

Clr_List Named(#List)

Endif

#Com_self.AddEntry( "Page" )

Endroutine

Mthroutine Name(AddEntry)
Define_Map For(*Input) Class(#Prim_str) Name(#Text)

Add_Entry To_List(#List)
#ListPrimaryText.CurrentItem.Caption := #Text

Endroutine

End_Com


参照

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