- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一个固定位置的 CssLayout 和一个 DDVerticalLayout 子组件。我根据用户交互动态填充此垂直布局以创建 ListView 。当列表变得比显示区域大时,我遇到了问题。它可以正确滚动,但拖动不会自动滚动。这迫使用户拖动、滚动、拖动、滚动、拖动...
例如,如果我选择了列表底部的一个元素,而 View 一次只显示 6 个元素,我不能一次将它向上拖动超过 5 个空格。 View 不会根据鼠标悬停自动滚动。
带有子 DDVerticalLayout CSS 的父 CssLayout:
.list {
z-index: 9999;
position: fixed;
right: 1%;
top: 20%;
max-width: 25%;
max-height: 70%;
min-height: 150px;
.v-verticallayout {
background-color: #EEEEEE;
overflow-y: scroll;
overflow-x: hidden;
display: block;
margin-left: 6px;
margin-right: 6px;
max-height: 350px;
min-height: 100px;
border-radius: 4px;
border: 1px solid #d5d5d5;
}
}
CssLayout 类中的 DDVerticalLayout 设置:
private final DDVerticalLayout layout = new DDVerticalLayout();
//...
layout.setDragMode(LayoutDragMode.CLONE);
layout.setSizeUndefined();
layout.setDropHandler(new DefaultVerticalLayoutDropHandler()
@Override
protected void handleComponentReordering(DragAndDropEvent event) {
super.handleComponentReordering(event);
//custom code omitted
}
});
我正在使用 drag and drop add-on Vaadin v7.7.6 的 v1.3.2。
最佳答案
这是一个旧帖子,但可能对遇到此问题的其他人有用。您需要将 VerticalLayout 包装在面板中才能使用 DNDScroll 附加组件。像这样的 -
Panel panel = new Panel();
panel.setContent(content);
panel.setHeight(200, Unit.PIXELS); //optional - could be setSizeFull();
PanelAutoScrollExtension extension = new PanelAutoScrollExtension();
extension.extend(panel);
关于java - 拖动时自动滚动 - Vaadin DragDrop 附加组件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42773658/
在Wpf中拖动期间,如何更改鼠标光标(或使用装饰器)以指示droptarget将不接受拖动的项目? 我曾尝试在e.Effects = DragDropEffects.None事件期间设置DragEnt
我真的很难在 Silverlight 4 中获得一个简单的拖放示例。 这是我所拥有的: XAML 代码隐藏 public partial c
我找不到将文件放入富文本框后会发生的事件。 *当您将文件放入 Rtb 时,如果您下载了从 richtextbox 派生的用户控件,则图标的图像将复制到控件上,此控件有一些方法可以操作 RTF,其中包括
System.InvalidOperationException: DragDrop registration did not succeed. ---> System.Threading.Threa
我们在 Visual Studio 解决方案中有一些安装项目(其他项目类型 -> 安装和部署 -> 安装项目)。该项目有另一个库类型项目,其安装类名为 InstallationCore,如项目输出。在
在 WPF 中,我想使用右键单击来启动拖放。类似于 Windows 资源管理器,右键单击,稍微移动,你会得到装饰器来指示操作中的拖放。不要移动,松开按钮时会出现上下文菜单。 我已经启动了这一切,但是当
情况: 我有一个使用 angular-dragdrop 的应用程序在三个单独的列表之间移动项目。 拖放工作正常。但我还需要对同一列表中的项目重新排序。 我在文档中看到也可以在 onDrop 上检索索引
我正在尝试编写一些代码以允许我的应用程序的用户拖放 DataGridView 中的行以重新排序。问题是,被拖动的行在被拖放时消失了——所以拖放的效果只是删除该行。这是我的代码: private R
我已经使用以下方法在列表框中成功实现了拖放: Bea Stollnitz - 如何在数据绑定(bind)的 ItemsControl 之间拖放项目: http://www.zagstudio.com/
我有一个带有用于拖放文件的按钮的 C# 应用程序。我可以从我的桌面上获取 6 个文件并将其放到按钮上并让它处理这 6 个文件。 但是,当我从 DragDrop 事件启动线程并将文件路径传递到从 Dra
该方法连续执行两次,没有明显的理由这样做。它发生在 VS2010 Express (4.0) 和 VS2008 (3.5) 中。 public GUI() { InitializeCompon
我正在尝试以 wpf 形式实现拖放功能。目的是通过拖拽实现用户控件的复制(类似于windows 7文件夹复制使用ctrl + Mouseleftbutton拖放)。当 ctrl 键没有按下时,drop
我在 Canvas 上有一个拖放操作,当一个对象被拖入和拖出它时,它应该做一些事情。我的问题是 DragEnter/DragLeave 事件在鼠标将对象移动到它上面时不断触发,而不仅仅是在进入/退出时
我使用这个组件来处理拖放文件 http://melander.dk/delphi/dragdrop unit DragThread; interface uses Classes,DragDrop
我正在寻找一种方法来确定在发生 DragDrop 事件后拖动了 toolStrip 中的哪个项目,我想要做的就是为工具条中的每个项目创建一个具有不同案例的切换案例,但我似乎无法找到一种比较它们的方法。
我有以下代码,我试图在其中实现拖放功能: public Location_Alert() { InitializeComponent(); #region Fo
从过去几个月开始,我就开始研究它。我在处理拖放事件时遇到问题。 我有两个并排放置的网格,我正在执行从左侧网格(网格 A)到右侧网格(网格 B)的拖放操作。我在 Grid B 上同时使用了 Before
我有一个固定位置的 CssLayout 和一个 DDVerticalLayout 子组件。我根据用户交互动态填充此垂直布局以创建 ListView 。当列表变得比显示区域大时,我遇到了问题。它可以正确
我使用 DragDrop.DoDragDrop 将文件从我的 C# WPF 应用程序复制到 Windows 资源管理器。但是,文件的实际复制导致我的 WPF 应用程序卡住,直到复制完成。此复制操作可能
我正在尝试 TDropFileTarget Melander 的 DragDrop 的组成部分套房。目标是在拖放文件后执行某些任务。另外,如果在处理过程中出现问题,我希望收到异常。 似乎 OnDrop
我是一名优秀的程序员,十分优秀!