我正在构建用于在布局中缩放和平移的 SL 应用程序。一切正常,除了当我使用鼠标滚轮放大时,在一些缩放滚动条开始使用鼠标滚轮之后,我可以滚动而不是缩放。如果我将滚动条放在末尾或开头,我只能再次缩放。如何防止滚动查看器使用鼠标滚轮?我希望只能通过轮操作变焦。先感谢您!
这是我缩放内容时的 MouseWheel 方法代码:
protected override void OnMouseWheel(MouseWheelEventArgs e)
{
base.OnMouseWheel(e);
if (e.Delta > 0)
{
this.aniScaleX.To += 0.2;
this.aniScaleY.To += 0.2;
this.sbScale.Begin();
}
else if (e.Delta < 0 && (this.aniScaleX.To > 1 && this.aniScaleY.To > 1))
{
this.aniScaleX.To -= 0.2;
this.aniScaleY.To -= 0.2;
this.sbScale.Begin();
}
Sizer.Width = Board.ActualWidth * (double)this.aniScaleX.To;
Sizer.Height = Board.ActualHeight * (double)this.aniScaleY.To;
Run Code Online (Sandbox Code Playgroud) 我正在制作一个网站,我注意到我无法使用鼠标上的滚轮滚动。我可以在 chromebook 上使用两指滚动,但不能在电脑上使用滚轮。问题出在我使用的两种浏览器上;火狐和铬。
提前致谢,利亚姆
CSS:
header {
width: 100%;
}
body {
margin: 0;
overflow: hidden;
}
footer {
clear: both;
height: 100px;
width: 100%;
background-color: #3d3d3d;
position: relative;
}
.nav {
width: 100%;
height: 50px;
background-color: #3D3D3D;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0)
}
.navwrap{
position: fixed;
width: 100%;
}
.name-logo {
width: 100%;
height: 350px;
background-color: #4BD150;
overflow: hidden;
}
.content {
float: left;
background-color: #f5fafa;
padding-left: 3%;
padding-right: 2%;
border-right: 4px solid #F5f5f5;
width: calc(65% …Run Code Online (Sandbox Code Playgroud) 现在我正在使用 WPF ScrollViewer。
<ScrollViewer Name="uiPageScrollViewer" ScrollViewerHorizontalScrollBarVisibility="Auto">
...
</ScrollViewer>
Run Code Online (Sandbox Code Playgroud)
我正在向 ScrollViewer 添加元素,并HorizontalScrollBar显示在UI
When I try to get uiPageScrollViewer.HorizontalScrollBarVisibilityin code behind it returns Auto。
我怎样才能得到Visibility?什么时候HorizontalScrollBar在 UI 中显示比它应该返回 Visible 其他不符合。
我想更改 div 的水平滚动条样式。
我成功更改了 x 轴(垂直)滚动条样式,但是当我添加 y 轴滚动时,它采用与我为 y 轴添加的样式相同的样式。
我想以不同的方式设置两个滚动条的样式。有什么可能的方法可以实现这一点吗?
(x 轴)垂直滚动条的当前 CSS:
.list-group {
overflow-y: scroll;
max-height: 335px;
border: 1px solid #bdbdbd;
padding: 10px;
}
.list-group::-webkit-scrollbar {
width:35px;
}
.list-group::-webkit-scrollbar-button:increment {
background-image: url('../images/arrow down.png');
background-repeat: no-repeat;
height: 30px;
border-bottom: 2px solid transparent;
}
.list-group::-webkit-scrollbar-button:decrement {
background-image: url('../images/arrow up.png');
background-repeat: no-repeat;
height: 30px;
border-top: 10px solid transparent;
}
Run Code Online (Sandbox Code Playgroud) 我从文本文件中读取了复选框的输入,并且该输入的增加超过了给定的窗口大小。如何为此添加滚动条以查看复选框的所有内容。提前致谢。
编辑:添加了代码。
from tkinter import *
import os
error = []
window = ""
with open("op.txt") as inp:
for lines in inp:
if lines.strip() == "done":
error.append(window)
window = ""
else:
window += lines
print(len(error))
root = Tk()
root.minsize(500, 500)
cbTexts={}
cbVariables={}
cb={}
for i in error:
cbTexts[i] = StringVar()
cbTexts[i].set(i)
cbVariables[i] = IntVar()
cbVariables[i].set(0)
cb[i] = Checkbutton(root, textvariable=cbTexts[i], variable=cbVariables[i])
cb[i].pack()
mainloop()
Run Code Online (Sandbox Code Playgroud) 任何人都帮助我如何JTextArea使用Swing in Java 添加滚动条?
在JTextArea刚消失的时候我添加滚动条就可以了.
希望有人让我在上面添加一个垂直滚动条.
另外的解释将非常感谢
public class Practice extends JFrame {
JFrame frame = new JFrame("AAA");
JTextArea textarea = new JTextArea();
JScrollPane scroll = new JScrollPane(textarea);
JPanel panelForScroll = new JPanel(null);
public Practice(){
frame.setLayout(null);
frame.setBounds(100,100,400,710);
frame.setResizable(false);
frame.setVisible(true);
textarea.setEditable(false);
textarea.setFont(new Font("arian", Font.BOLD, 16));
textarea.setBounds(20, 280, 340, 70);
panelForScroll.add(scroll);
frame.add(panelForScroll); //can't find text area....
}
public static void main(String[] args) {
new Practice();
}
}
Run Code Online (Sandbox Code Playgroud) 我一直试图研究这个,但没有成功,我会在这里问新鲜.如果我制作了一个自定义jQuery滚动条,如http://manos.malihu.gr/tuts/jquery_custom_scrollbar.html
这会使可滚动内容SEO不友好吗?即使Jquery涉及滚动的外观和感觉,搜索引擎是否能够抓取并读取内容?
如果它不是SEO友好,那么在我看来它毫无意义.
scrollbar ×7
css ×3
html ×2
c# ×1
firefox ×1
java ×1
javascript ×1
jquery ×1
jscrollpane ×1
jtextarea ×1
python ×1
scrollviewer ×1
seo ×1
silverlight ×1
swing ×1
tkinter ×1
wpf ×1
zooming ×1