c# - 如何修复“在 C# 中用一些空间连续移动文本(标签)”?
问题描述
我有一些用于移动文本的 c# 代码,例如 HTML 中的选框标记。我想在不消失的情况下将第二个文本移到第一个文本之后。
string[] ss;
int index = 0;
private void timer1_Tick(object sender, EventArgs e)
{
if (clsBas.SCREEN_TEXT != "") //multiline text
{
lblScreenText.Text = ss[index];
if (lblScreenText.Left < 0 && (Math.Abs(lblScreenText.Left) > lblScreenText.Width))
{
lblScreenText.Left = 1920;//panel width
index++;
}
lblScreenText.Left = lblScreenText.Left - 15;
if (index == ss.Length)
{
index = 0;
}
}
}
解决方案
推荐阅读
- java - Java - 检测垃圾收集器?
- webpack - 出口未定义 webpack 4
- mysql - 使用 proguard 6.02 混淆后,战争未在 tomcat 中部署
- docker - 从清单构建 Docker 映像
- c# - 我想在我的媒体播放器上添加轨迹栏
- sql - 如何拥有Sql表列的历史记录。?
- javascript - jQuery如何将值相乘并得到总数
- c - 表达式类型之间的 Bison 强制转换
- python-3.x - Google Colab:打开 Python 笔记本时出现 API 错误?
- go - 在 Windows CMD 中的 GoLang 中运行 shell 命令