Fired when prompt icon is pressed
Member of Edit Field (PRIM_MD.Edit)
Name | Type | Data Type | Description |
---|---|---|---|
Origin | *Input | PRIM_CTRL | Reference to the control on which the event was initially fired |
Handled | *Both | Boolean | Set to true to stop the key being processed automatically |
The PromptIconClick event is fired when the user clicks on the Icon or IconImage The PromptIconClick event is a routed event. This means that it can be detected on the control that was under the mouse pointer at the time of the click, as well as other controls in the parent chain. The Origin and Handled parameters of the event provide the source of the event and a means to prevent propagation up the parent chain respectively
This example shows how the click events are routed through the various component levels. Clicking on the field PromptIcon or Icon will fire a click at all levels. However, if the checkbox is checked, the event will not go beyond the 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_MD.List) Name(#List) DisplayPosition(1) LayoutManager(#Layout) Left(16) Parent(#COM_OWNER) RowHeight(48) TabPosition(1) TabStop(False) ThemeDrawStyle('Card') Top(176) 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.CheckBox) Name(#HandleIconClick) Caption('Handle Icon Click') CheckState(Checked) DisplayPosition(2) Left(304) Parent(#COM_OWNER) TabPosition(2) Top(176) Width(241) Height(33) Define_Com Class(#PRIM_MD.Edit) Name(#Check) DisplayPosition(1) Label('Check') Left(16) Parent(#Panel) TabPosition(1) Top(15) Icon('Check') PromptIcon('search') Define_Com Class(#PRIM_PANL) Name(#Panel) DisplayPosition(3) Height(140) Left(8) Parent(#COM_OWNER) TabPosition(3) TabStop(False) Top(5) Width(441) ThemeDrawStyle('AlternateItem') Define_Com Class(#Prim_timr) Name(#Timer) Interval(2000) Startup(Manual) Evtroutine Handling(#Check.IconClick) Handled(#Handled) #Handled := (#HandleIconClick.CheckState = Checked) #Com_self.AddEntry( "Check IconClick" ) Endroutine Evtroutine Handling(#Check.PromptIconClick) Handled(#Handled) #Handled := (#HandleIconClick.CheckState = Checked) #Com_self.AddEntry( "Check PromptIconClick" ) Endroutine Evtroutine Handling(#Panel.Click) #Com_self.AddEntry( "Panel" ) 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
V14SP2 April 2018