当前位置:网站首页>基于LabVIEW实现的几种滚动字幕
基于LabVIEW实现的几种滚动字幕
2020-11-09 07:30:00 【osc_jklrr90y】
学了小技巧还是要CSDN一下,以免下次需要的时候找不到。。
(1)基于字符串数组和字符串控件的向下滚动字幕
基本思路是依次从数组中取每一个字符串送显示;滚动是用循环次数与数组行数的大小进行求余数运算获得循环的索引值。


(2)基于长字符串和字符串控件的滚动字幕
基本思路是采用截取字符串函数,每次偏移量加2,长度不变即可。


(3)基于字符串控件整体移动的横向钟摆型滚动字幕
这是对应的字符串长度小于显示区宽度的情况。
思路:字符串作为一个整体,其左侧在显示区的位置是可以通过属性节点进行写入的。改变它,整个字符串就在移动。设计模式采用基本状态机模式。



(4)基于数值显示控件滑动杆和字符串图片的横向滚动字幕
思路:在自定义控件中,用要显示的图片替换滑动杆上的滑块图片。依次改变要显示的数值的大小就可以让滑块滚动起来。


滚动字幕,前面板截图能做成执行动图就好了,还不会做;其中的字号大小差别比较大,浏览起来可能显得没有章法。程序较为简单,就不附下载地址了。这么点东西,竟然写了1个多小时吗?什么效率这是,打工人!哪个算是默认标题,存不得发不得?
版权声明
本文为[osc_jklrr90y]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/4415966/blog/4708508
边栏推荐
猜你喜欢

表连接

android开发中提示:requires permission android.permission write_settings解决方法

How to reduce the resource consumption of istio agent through sidecar custom resource

云计算之路-出海记-小目标:Hello World from .NET 5.0 on AWS

上线1周,B.Protocal已有7000ETH资产!

File queue in Bifrost (1)

1.操作系统是干什么的?

23张图,带你入门推荐系统

Oschina plays disorderly on Monday

centos7下安装iperf时出现 make: *** No targets specified and no makefile found. Stop.的解决方案
随机推荐
代码保存
Review of API knowledge
20201108 programming exercise exercise 3
Have you ever thought about why the transaction and refund have to be split into different tables
Introduction to nmon
3.你知道计算机是如何启动的吗?
API部分的知识点复习
When we talk about data quality, what are we talking about?
C++邻接矩阵
Have you ever thought about why the transaction and refund have to be split into different tables
C + + adjacency matrix
Factory Pattern模式(简单工厂、工厂方法、抽象工厂模式)
Leetcode-11: container with the most water
A brief introduction of C code to open or close the firewall example
How does semaphore, a thread synchronization tool that uses an up counter, look like?
Pipedrive如何在每天部署50+次的情况下支持质量发布?
Leetcode-15: sum of three numbers
2.计算机硬件简介
架构中台图
Concurrent linked queue: a non blocking unbounded thread safe queue