简体   繁体   English

如何在 Nattable 中添加放大和缩小按钮

[英]How to add zoom in and zoom out buttons in Nattable

There is way to zoom in and zoom out in Nattable 2.0 onwards.在 Nattable 2.0 以后有放大和缩小的方法。

( http://blog.vogella.com/2020/03/05/nattable-dynamic-scaling-enhancements/ ) http://blog.vogella.com/2020/03/05/nattable-dynamic-scaling-enhancements/

But how to make this functionality work on button clicks similar to browser.但是如何使此功能在类似于浏览器的按钮单击上起作用。

Expected zoom in and zoom out view预期的放大和缩小视图

The blog post says:博客文章说:

The dynamic scaling can be triggered programmatically by executing the ConfigureScalingCommand on the NatTable instance.动态缩放可以通过在 NatTable 实例上执行 ConfigureScalingCommand 以编程方式触发。

So you need to implement such buttons in your UI that execute the ConfigureScalingCommand with the according parameters.因此,您需要在您的 UI 中实现此类按钮,以使用相应的参数执行ConfigureScalingCommand

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM