问题标签 [movable]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
168 浏览

c++ - 提升序列化 - 序列化不可复制但可移动的对象?

有可能吗?它不能开箱即用,因为它会在对象未序列化时尝试复制对象

更新 1:这些对象是不可复制的,因为它们分配内存,一旦分配,我看不出有任何理由在可以移动它时进行复制。反序列化部分应尽可能快。

0 投票
1 回答
787 浏览

transparent - 如何在 Visual Basic 中制作可移动的透明表单?

我创建了一个非常简单的数字时钟,就像练习帮助我的 vb 技能一样。我基本上复制了屏幕右下角的计时器,除了我可以在屏幕上移动它,只有当它有彩色背景时。如果我使面板(计时器的父级)透明,则应用程序不再允许我移动它。我想知道是否可以用鼠标移动透明物体?

(下面的整个代码,非常简单)

将 X、Y 调暗为整数 将 NewPoint 调暗为新 System.Drawing.Point

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub

Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 处理 Label1.Click End Sub

Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) 处理 Timer1.Tick Label1.Text = TimeOfDay End Sub

Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown X = Control.MousePosition.X - Me.Location.X Y = Control.MousePosition.Y - Me.Location.Y End子

Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove If e.Button = Windows.Forms.MouseButtons.Left Then NewPoint = Control.MousePosition NewPoint.X -= (X) NewPoint.Y -= (Y) Me.Location = NewPoint End If End Sub

Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) 处理 Panel1.Paint

结束子

私有共享函数 hwnd() 只要抛出新的 NotImplementedException 结束函数

结束类

0 投票
3 回答
67298 浏览

c# - 在 C# 中通过鼠标拖动来移动控件

我试图通过拖动来移动名为pictureBox1 的控件。问题是,当它移动时,它会不断从鼠标周围的一个位置移动到另一个位置,但它确实跟随它......这是我的代码。如果你能帮助我,我将不胜感激

0 投票
1 回答
215 浏览

image - 将图像动态添加到可移动画布上

http://jsfiddle.net/ZQ99r/

我正在尝试从文本框中添加图像,通过文本框调整宽度和高度,当我点击确认将这些值添加到新画布中时。我以为我知道自己在做什么,但显然我不会因为简单的事情而烦恼。想知道是否有人可以帮助我。

HTML

CSS

jQuery/JavaScript

0 投票
1 回答
683 浏览

java - mxHierarchicalLayout 忽略 isVertexMovable

在 JGraphX 中,大多数布局算法不会移动不可移动的顶点。不幸的是 mxHierarchicalLayout 忽略了顶点是否可移动。我发现,这个布局算法根本不使用 isVertexMovable 。我必须在哪里添加检查顶点是否可移动。

我尝试过的位置,产生了无限循环或没有任何效果。

[编辑]

0 投票
1 回答
1020 浏览

jquery - 可移动(可拖动)和可更换的 DIV

我想创建一些<div>s。我希望能够移动和替换这些 Div。我想我可以使用 jQuery,我发现了这个:

但这并不是我想要的。
我想要一些这样的代码: varzesh3

0 投票
2 回答
7114 浏览

c++ - 为什么 std::lock_guard 不可移动?

为什么std::lock_guard不可移动,它会使代码变得更好:

代替

创建自己的版本是否有问题,例如:

?

使其可移动是一个坏主意的任何根本原因?

0 投票
2 回答
1921 浏览

c++ - Qt:限制另一个QGraphicsItem C ++中的QGraphicsItem的可移动区域

我认为我的问题与这篇文章类似,但在 C++ 和 QGraphicsItem 中。

我想在另一个 QGraphicsItem 中修复我的对象的可移动区域。如果我试图将它移到外面,我希望我的对象留在里面。

也许这个想法是使用setParentItem().

请问有人知道如何限制 QGraphicsItem 内的可移动区域吗?

0 投票
1 回答
42 浏览

regex - Using positive lookbehind in Movable Type templates causes error due to < in pattern string

I'm attempting to limit the length of a displayed string to the first 50 characters plus any needed to end at the next word boundary. I'm using the regex_replace filter in the template tag to replace all the characters after the pattern match with "...". However, using the positive lookbehind requires the less-than symbol which apparently MT is interpreting as the start of a tag. This is causing nearby tags to break and the template fails to publish, reporting an error. It there any way to incorporate the positive lookbehind into the template?

0 投票
1 回答
89 浏览

java - libgdx 拖放演员

我一直致力于制作可抓取/可移动的小部件,我希望堆栈中的某个人可以为我指明实现这一目标的方向。我最初想使用来自 com.badlogic.gdx.scene.scene2d.ui.Window 的移动 & 很好奇是否有更简单的方法。我已经查看了从 GDXwiki 上的其他类继承的所有方法,但仍然没有运气。