Jan 25, 2013, 9:54 PM
[CLOSED] Can not change EmptyText
When you set EmptyText, it injects the old EmptyText as the text value of the textfield. It's very subtle but after you press Change Empty Text, put your cursor in the textbox.
The only workaround is to set the Empty Text and if the textfield was empty in hte first place, clear it.
The only workaround is to set the Empty Text and if the textfield was empty in hte first place, clear it.
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<style type="text/css">
</style>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" ScriptMode="Debug" Theme="Gray"
DisableViewState="true" />
<ext:TextField runat="server" ID="txtField" EmptyText="Initial Empty Text" Width="300">
</ext:TextField>
<ext:Button runat="server" Text="Change Empty Text">
<Listeners>
<Click Handler="#{txtField}.emptyText = 'New Empty Text';">
</Click>
</Listeners>
</ext:Button>
</form>
</body>
</html>
Last edited by Daniil; Jan 31, 2013 at 3:43 AM.
Reason: [CLOSED]