当前位置:网站首页>Zero basis learning canoe panel (5) -- change the value of the variable, and the control image also changes. What's going on?
Zero basis learning canoe panel (5) -- change the value of the variable, and the control image also changes. What's going on?
2022-07-24 10:46:00 【Ant soldier】
- I am a Ant soldier , Focus on the field of on-board diagnosis , Especially good at CANoe Tool use
- Looking for organizations , Answer questions and solve doubts , Fishing and chatting , Blog source code , Click to add 【 Love each other and family 】
- Zero base learning CANoe Panel Summary of design catalogue , Click the jump
Preface
Here's the picture , We see Panel Many controls in have images , And the image can be changed ; The main content of this section
How to make these bmp perhaps png picture ( stay panel Can be used in )
To make the bmp How does the picture correspond to the variable value
Demonstrate hardware and software environment Win11 x64 ; CANoe 11 SP2 x64


Example (1)
- 1️⃣ The most commonly used control is
Switch/IndicatorControl , Let's see the default style is the following , But when we actually use it , Often according to the physical meaning of this parameter , Bind a picture (bmp perhaps png Format , As an example at the beginning )

2️⃣ We can choose paint ,photoshop Wait for the drawing tool to draw a .bmp perhaps .png Format picture
- Here's the picture , I use paint Painted in three colors
rectangular,150 x 50 px

3️⃣ Put the Image Attribute selection This picture
- Add the image created above , And on and on
Test_1System variables are related - Note that the color of the control is gray at this time , And designed
test.bmpThe first circle in the picture is also gray

4️⃣ stay CANoe In Engineering , Loaded this Panel after , Control is Red Of course. , Because the system variable Test_1 The value of is 0

5️⃣ Click the left mouse button on the control , Control is green Of course. . At this point, the system variable Test_1 The value of is 1

6️⃣ summary :
- bmp Bitmap has three colors , Corresponding to two values of system variables
- In the design Panel On the panel , The color of the control is the first color of the bitmap , gray ; stay CANoe The control in the project is the color corresponding to the variable
Example 2
1️⃣ Here's the picture , I drew another 300x 50px Of BMP Icon
- What I want to achieve is : When the system variable Test_2 From 0 To 4 change , Then the color of the control will also change

2️⃣ To configure Image attribute
- Drag in another
Switch/IndicatorControl And putTest_4.bmpPicture selected , And on and onTest_2System variables are related - Be careful : At this time, we should
State CountChoose to be 5 , because 0-4 yes 5 It's worth it , After setting up ,Switch ValueAutomatically fill in 0,1,2,3,4 - And then click again
Fit Image Size, This function is to make the display size of your control consistent with the size of the loaded image , For example, the size of this control is 50x50 Pixels

3️⃣ Run CANoe Look at the color change of the second control
- Click the left mouse button continuously , You can see Test_2 from 0 To 4, Controls are also rotating

draw BMP Rules for icon files
- One bmp The icon should contain n A small icon element (stage), This icon is a rectangle , Length is a multiple of width .
- But the first stage It's not effective , Because the first one stage Used in design panel It shows , From the second color = Just and symbol Corresponding to the value of
- therefore If you want to design one that can express n Icon file of values , Then it should include n+1 individual stage

summary


- Have the most simple life , The furthest dream , Even if it's freezing tomorrow , Lu Yao's horse died !
- If this blog is helpful to you , please “ give the thumbs-up ” “ Comment on ”“ Collection ” One key, three links Oh ! It's not easy to code words , Everyone's support is my driving force to stick to it .
边栏推荐
- Rtklib source code, RTK difference calculation, rtkpos and replos function process sorting
- Set up mail server with dynamic ip+mdaemon
- After the QT program minimizes the tray, a msgbox pops up. Click OK and the program exits. The problem is solved
- Sentinel three flow control modes
- 分布式事务处理方案大 PK!
- 测试左移和测试右移,我们为何要“上下求索”?
- Image processing: floating point number to fixed point number
- Sentinel 三种流控效果
- Simply use golang SQLC to generate MySQL query code
- 每日三题 7.21
猜你喜欢

Distributed lock implementation scheme (glory collection version)

Princeton chendanqi: how to make the "big model" smaller

QT create application tray and related functions

Call bind apply simple summary

PC博物馆(1) 1970年 Datapoint 2000

Ffmpeg splash screen solution (modify the source code and discard incomplete frames)

零基础学习CANoe Panel(8)—— 数据/文本编辑控件(Hex/Text Editor )

零基础学习CANoe Panel(7)—— 文件选择(PathDiaglog)

Machine learning quiz (10) using QT and tensorflow to create cnn/fnn test environment

Sentinel 三种流控效果
随机推荐
Distributed lock implementation scheme (glory collection version)
Arduino + AD9833 波形发生器
Sentinel implements the persistence of pull pattern rules
用 Signal Processing Toolbox 软件对数据进行滤波
redis 缓存设置,实现类似putIfAbsent功能
Hash, bitmap and bloom filter for mass data De duplication
Arduino + AD9833 waveform generator
I admire a Google boss very much, and he left..
题解——Leetcode题库第283题
pom文件dependency中的 scope用法
零基础学习CANoe Panel(10)—— 复选框(CheckBox)
Call bind apply simple summary
PC博物馆(1) 1970年 Datapoint 2000
How to build a node development environment efficiently
PyTorch 常用 Tricks 总结
binlog、iptables防止nmap扫描、xtrabackup全量+增量备份以及redlog和binlog两者的关系
零基础学习CANoe Panel(7)—— 开关/显示控件(Input/Output Box )
[FPGA]: IP core - multiplier
App automation and simple environment construction
Web Security Foundation - file upload (file upload bypass)
