Jan 30, 2012, 4:40 AM
[CLOSED] TextField: Help with Remove SelectedText on Blur event
Hi,
What I need to happen is that when the user has typed something on the TextField (TextField1) and highlighted the text, and then clicked (or tabbed) onto the GridPanel (GridPanel1), the highlight should disappear (this is to avoid confusion for the user).
When I try Listener = Blur, the problem is that the selected control keeps going back to the TextField. What I am looking for is something like a "before Blur" event. Is there any possible solution for this?
Thanks!
What I need to happen is that when the user has typed something on the TextField (TextField1) and highlighted the text, and then clicked (or tabbed) onto the GridPanel (GridPanel1), the highlight should disappear (this is to avoid confusion for the user).
When I try Listener = Blur, the problem is that the selected control keeps going back to the TextField. What I am looking for is something like a "before Blur" event. Is there any possible solution for this?
Thanks!
<ext:TextField ID="TextField1" runat="server" FieldLabel="Label" Width="500">
<Listeners>
<Blur Handler="#{TextField1}.selectText(0,0);" />
</Listeners>
</ext:TextField>
<ext:GridPanel ID="GridPanel1" runat="server">
<Store>
<ext:Store ID="Store1" runat="server" WarningOnDirty="false" >
<Reader>
<ext:ArrayReader>
<Fields>
<ext:RecordField Name="Column1" Type="String" />
<ext:RecordField Name="Column2" Type="Int" />
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:TemplateColumn DataIndex="Column1" Resizable="false" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="false" />
</SelectionModel>
</ext:GridPanel>
Last edited by Daniil; Jan 31, 2012 at 7:26 AM.
Reason: [CLOSED]