GWT 选项卡面板关闭
我正在 GWT 中构建一个应用程序。我有一个装饰过的标签面板 我的应用程序。在哪里动态添加面板。现在我想要 来实现这些选项卡的关闭。我想添加一张近距离图像 将选项卡栏和事件添加到该图像以进行关闭。我正在使用 UIbinder。
I am building an application in GWT. I have a decorated tabpanel in
my application.Where in am adding panels to it dynamically.Now i want
to achieve the closing of these tabs. I want to add a close image to
the tab bar and event to that image for closing. I am using UIbinder.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您有点需要按照此
标题中的 GWT 关闭按钮 做一些事情DialogBox 的 bar
首先,创建新选项卡时需要传入选项卡标题。您传入的标头应包含选项卡文本以及可供单击的 X 图像或文本标签。然后在 close 对象上添加一个事件处理程序,该事件处理程序获取要添加到 tabPanel 的小部件并将其删除。这是一些有效的内联代码
You kinda need to do something along the lines of this
GWT Close button in title bar of DialogBox
First you need to pass in the tab header when you create the new tab. The header you pass in should have your tab text and also an X image or text label to click on. Then add a event handler on the close object that gets the widget you are adding to the tabPanel and removes it. Here is some inline code that works
GWT 本身不支持它。
您可以手动尝试添加。
请阅读此内容 - http://groups.google。 com/group/google-web-toolkit/browse_thread/thread/006bc886c1ccf5e1?pli=1
我个人没有尝试过,但看看gregor 的解决方案(最后一个)。
It isn't supported natively in GWT.
You can manually try to add it.
Read this - http://groups.google.com/group/google-web-toolkit/browse_thread/thread/006bc886c1ccf5e1?pli=1
I haven't tried it personally, but look at the solution by gregor (last one).
工作代码是这样的;
为了添加选项卡,
您将需要 ImageAnchorClass
the working code is like that;
In order to add tab,
You'll going to need, ImageAnchorClass