我转载了 kakarot-java 永久域名 http://kakarot-java.javaeye.com 的文章

本文介绍了一种在 ExtForm 中动态更改 fieldLabel 的简单方法。通过为需要动态赋值的字段设置 ID,并使用 Ext.DomQuery.selectNode 选择器来定位对应的 label 元素并更新其内容。
在Ext form 中的 field 中的fieldLabel,只提供了初始化赋值,并没有提供动态改变其值的方法,经过大量的实验,终于找出了一个比较简单的解决方案,
1.首先,需要动态赋值的field需要有个id (如果没有手动指定,则EXT会自动生成一个,可以获取到)
2.Ext.DomQuery.selectNode('label[for=pass]').innerHTML='密码';
这句话的意思是找到 for ID为pass的label,并改变其内容为 "密码",这里的pass是一个变量指的是第一步中field的ID
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\youxi\longzhu\GAME28\AT\Content\Paks\~mods\pakchunk3-WindowsNoEditor.pak'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost) at System.IO.File.Copy(String sourceFileName, String destFileName) at DBZKModManager.MainForm.AddBtn_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- DBZKModManager Assembly Version: 3.0.0.0 Win32 Version: 3.0.0.0 CodeBase: file:///E:/%E8%BF%85%E9%9B%B7%E4%BA%91%E7%9B%98/ALI213-DBZK.DBZKakarotModManager-209313/DBZ%20Kakarot%20Mod%20Manager-34-3-0-1582381108/DBZKModManager.exe ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.8.9172.0 built by: NET481REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- MaterialSkin Assembly Version: 2.1.2.0 Win32 Version: 3.0.0.0 CodeBase: file:///E:/%E8%BF%85%E9%9B%B7%E4%BA%91%E7%9B%98/ALI213-DBZK.DBZKakarotModManager-209313/DBZ%20Kakarot%20Mod%20Manager-34-3-0-1582381108/DBZKModManager.exe ---------------------------------------- System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- DBZKModManager.resources Assembly Version: 3.0.0.0 Win32 Version: 3.0.0.0 CodeBase: file:///E:/%E8%BF%85%E9%9B%B7%E4%BA%91%E7%9B%98/ALI213-DBZK.DBZKakarotModManager-209313/DBZ%20Kakarot%20Mod%20Manager-34-3-0-1582381108/DBZKModManager.exe ---------------------------------------- DBZKModManager.resources Assembly Version: 3.0.0.0 Win32 Version: 3.0.0.0 CodeBase: file:///E:/%E8%BF%85%E9%9B%B7%E4%BA%91%E7%9B%98/ALI213-DBZK.DBZKakarotModManager-209313/DBZ%20Kakarot%20Mod%20Manager-34-3-0-1582381108/DBZKModManager.exe ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: <configuration> <system.windows.forms jitDebugging="true" /> </configuration> When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
最新发布
10-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值