ExtJS 中的递增/递减按钮
ExtJS 中是否有一个具有递增/递减功能的按钮(类似于 那个)?我有一些数字字段,其值在编辑时通常会递增/递减,此按钮将非常有用。请注意,将按钮粘贴到数字字段对我来说并不重要,我的意思是我可以将其作为单独的对象进行处理。
有什么好主意吗?提前致谢!
更新:两个窄按钮粘在一起也是一个解决方案。有人知道如何在单个网格工具栏中放置两个按钮吗?
Is there a button in ExtJS with increment/decrement feature (something like that)? I have some numberfields with values that are usually incremented/decremented when edited and this button would be very helpful. Note that it is not critical for me to stick the button to my numberfield, I mean I can handle it as a separate object.
Any bright ideas? Thanks in advance!
UPDATE: Two narrow buttons sticked together would be a solution too.. Anybody knows how to place two buttons that way in a single grid toolbar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用此第 3 方扩展...
http://www.java2s .com/Code/JavaScript/Ext-JS/CustomSpinnerWidget.htm
它可能需要一些调试,因为它适用于 ExtJS 3.0,而不是 3.3
You can use this 3rd party extension...
http://www.java2s.com/Code/JavaScript/Ext-JS/CustomSpinnerWidget.htm
It might require a little debugging as its for ExtJS 3.0, not 3.3
是的,在 Ext 4 中,NumberField 具有完全相同的行为(请参阅 这作为一个例子)。这是对 Ext 3 的更改,我认为 Ext 3 需要一个微调用户扩展才能实现这种行为。
Yes, in Ext 4 the NumberField has exactly that behavior (see this as one example). This is a change from Ext 3, which required a spinner user extension I believe for such behavior.
不,在默认包中没有这样的控制。可能是某个地方的一些外部包。
No, in default package there is no such control. May be as some external package somewhere.