当前位置:网站首页>零基础学习CANoe Panel(4)——按钮(Button )
零基础学习CANoe Panel(4)——按钮(Button )
2022-07-24 10:41:00 【蚂蚁小兵】
- 我是蚂蚁小兵,专注于车载诊断领域,尤其擅长于对CANoe工具的使用
- 寻找组织 ,答疑解惑,摸鱼聊天,博客源码,点击加入【相亲相爱一家人】
- 零基础学习CANoe Panel设计目录汇总,点击跳转
前言
- 本节讲解 基础但是最常用的控件——按钮(
Button) - 演示软硬件环境 Win11 x64 ; CANoe 11 SP2 x64


按钮(Button )
- 1️⃣ Button是一个可以触发指定动作的控件.

Button 控件的电平信号
1️⃣ 如下图,新建个panel ,命名ToolBox_button ,且设置了关联symbol 系统变量 Test_3,

2️⃣ Run CANoe ,点击一下Button 系统变量Test_3 值就设置成1,只要不放手,值不变,然后放开手,Test_3的值就设置成0
- 所以说Button 控件时自恢复的
- 所以在我们CAPL 脚本响应Button 的代码要注意加上非零判断,否则就会重复触发

on sysvar Panel::Test_3
{
if(@this)
{
//do somethng
}
}
name 和 text 属性的区别
1️⃣
name :是控件的标识ID,是CAPL脚本控制控件时识别的参数
text:对控件的描述信息,交互时的显示信息,Font属性的设置时针对Text的
后面所有控件将不再对此做任何解释说明

button 怎么设计的花里胡哨
1️⃣ 默认情况下 Use Windows Style 选项是True , Background Color 属性是灰色不可选的,这样的button 不太好看哈

2️⃣ 将 Use Windows Style 选项设置成False, Background Color 属性就可以用了

3️⃣ 大家注意,默认 Button Style 的属性是Standard的,仍然有很多属性数灰色不可选择的,所以我们可以把Button Style 选择 CostomFlat 模式,这样我们就可以设置下button 的 边框颜色(Border Color)和 鼠标悬浮颜色(Hover Color) 了.

- 鼠标悬浮就改变颜色了


总结


- 要有最朴素的生活,最遥远的梦想,即使明天天寒地冻,路遥马亡!
- 如果这篇博客对你有帮助,请 “点赞” “评论”“收藏”一键三连 哦!码字不易,大家的支持就是我坚持下去的动力。
边栏推荐
- MySQL - normal index
- 谷歌联合高校研发通用模型ProteoGAN,可设计生成具有新功能的蛋白质
- Try the video for 5 minutes [easy to understand]
- CMS vulnerability recurrence - ultra vires vulnerability
- PC博物馆(1) 1970年 Datapoint 2000
- NLP introduction + practice: Chapter 2: introduction to pytorch
- MySQL - 普通索引
- When to use obj['attribute name'] for the attribute name of an object
- ECCV 2022 | Tsinghua proposes the first transformer to embed spectral sparsity
- [personal summary] end of July 17, 2022
猜你喜欢

Arduino + AD9833 waveform generator

Overview of basic knowledge of binary tree

563 pages (300000 words) overall design scheme of smart Chemical Park (phase I)

Intranet remote control tool under Windows

Hongmeng's first note
![[AHK] AutoHotKey tutorial ①](/img/70/20f2e19e3e268ffe2f1e2956719c09.png)
[AHK] AutoHotKey tutorial ①

WEB安全基础 - - -文件上传(文件上传绕过)

机器学习小试(11)验证码识别测试-使用Qt与Tensorflow2进行深度学习实验

App automation and simple environment construction

常量指针、指针常量
随机推荐
协议圣经-谈端口和四元组
Chapter V Modification implementation (impl) class
ECCV 2022 | 清华提出首个嵌入光谱稀疏性的Transformer
Simply use golang SQLC to generate MySQL query code
Sentinel 三种流控模式
CMS vulnerability recurrence - foreground arbitrary user password modification vulnerability
When to use obj['attribute name'] for the attribute name of an object
Daily three questions 7.22
跨平台音频播放库
[carving master learning programming] Arduino hands-on (59) - RS232 to TTL serial port module
DSP CCS software simulation
38. REM adaptive layout
Qt应用程序防止多开,即单例运行
zoj-Swordfish-2022-5-6
【微服务】Eureka+Ribbon实现注册中心与负载均衡
脚手架文件目录说明、文件暴露
Constant pointer, pointer constant
Programmers can't JVM? Ashes Engineer: all waiting to be eliminated! This is a must skill!
题解——Leetcode题库第283题
SQL Server 2012 download and installation detailed tutorial
