PDA

View Full Version : Tap, Double Tap and Long Press



RCN
Mar 05, 2015, 11:28 AM
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">

<script type="text/javascript">
var ToggleFirstTrigger = function (tfd) {
var trigger = tfd.getTrigger(0);

trigger[trigger.hidden ? 'show' : 'hide']();
}
</script>
</head>
<body>
<ext:ResourceManager Theme="Crisp" runat="server" />
<ext:FormPanel Title="Ext.Net" Layout="AnchorLayout" DefaultAnchor="100%" Width="200" runat="server">
<FieldDefaults LabelAlign="Top" />
<Items>
<ext:TextField FieldLabel="Tap" runat="server">
<Listeners>
<Tap Handler="ToggleFirstTrigger(this.component);" />
</Listeners>
<Triggers>
<ext:FieldTrigger Hidden="true" Icon="Search" />
</Triggers>
</ext:TextField>
<ext:TextField FieldLabel="Double Tap" runat="server">
<Listeners>
<DoubleTap Handler="ToggleFirstTrigger(this.component);" />
</Listeners>
<Triggers>
<ext:FieldTrigger Hidden="true" Icon="Search" />
</Triggers>
</ext:TextField>
<ext:TextField FieldLabel="Long Press" runat="server">
<Listeners>
<LongPress Handler="ToggleFirstTrigger(this.component);" />
</Listeners>
<Triggers>
<ext:FieldTrigger Hidden="true" Icon="Search" />
</Triggers>
</ext:TextField>
</Items>
</ext:FormPanel>
</body>
</html>