アプリケーションバー - IconClickイベント 

アイコンがクリックされると起動

アプリケーションバー (PRIM_MD.AppBar) のメンバ

パラメータ

名前

タイプ

データタイプ

記述

Origin

*Input

PRIM_CTRL

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

Handled

*Both

ブール値

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

詳細

IconClick イベントは、ユーザーが アイコン または アイコンイメージ をクリックすると起動します。

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

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

次の例は、様々なコンポーネント レベル経由でクリック・イベントがどのようにルーティングされるかを示しています。 

appbar アイコンをクリックすることで、全てのレベルでクリックが起動されます。ですが、チェックボックスがチェックされると、イベントは IconClick より先には伝わりません。 

     Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME) Height(592) Width(744) LayoutManager(#Layout1) 

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_TBLO) Name(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Layout1Row1) DisplayPosition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Layout1Column1) DisplayPosition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#Layout1Item1) Alignment(TopCenter) Column(#Layout1Column1) Manage(#Appbar) Parent(#Layout1) Row(#Layout1Row1) Sizing(FitToWidth)

Define_Com Class(#PRIM_MD.List) Name(#List) DisplayPosition(2) LayoutManager(#Layout) Left(16) Parent(#COM_OWNER) RowHeight(48) TabPosition(2) TabStop(False) ThemeDrawStyle('Card') Top(72) 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)

Define_Com Class(#PRIM_MD.AppBar) Name(#Appbar) DisplayPosition(1) Parent(#COM_OWNER) TabPosition(1) TabStop(False) Width(744) Height(57)
Define_Com Class(#PRIM_MD.CheckBox) Name(#HandleIconClick) Caption('Handle Icon Click') CheckState(Checked) DisplayPosition(3) Left(304) Parent(#COM_OWNER) TabPosition(3) Top(72) Width(241) Height(33)

Define_Com Class(#Prim_timr) Name(#Timer) Interval(2000) Startup(Manual)

Evtroutine Handling(#Appbar.IconClick) Handled(#Handled)

#Handled := (#HandleIconClick.CheckState = Checked)
#Com_self.AddEntry( "AppBar IconClick" )

Endroutine

Evtroutine Handling(#Appbar.Click)

#Com_self.AddEntry( "AppBar" )

Endroutine

Evtroutine Handling(#Com_Owner.Click)

#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

#Timer.Start

Endroutine

Evtroutine Handling(#Timer.Tick)

#Timer.Stop
Clr_List Named(#List)

Endroutine

End_Com


参照

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