kanzi: How to use ToggleButton correctly

At present, the Kanzi tool is one of the most popular tools in the vehicle industry. I still want to share some experience and hope to actively pick up


Today, let's talk about the togglebutton button.

Why discuss this in the first place, or suffer a loss on this button.

In the general processing of clicking to change the state, similar to the switch and the like, the first time I think of the togglebutton, but there are often many unknown situations in this processing, as listed below:

1. The general processing is to change when the correct state is returned, which violates the togglebutton

2. When you set the state of the togglebutton once in the program, and you capture the click message in the code, sorry, it has to be clicked once by default

3. But only as UI processing, togglebutton is undoubtedly better than ordinary buttons


Personal suggestion, in some cases, it would be better to use button instead of togglebutton. But it's not that this space is bad. If it's just interface click processing, the better way is togglebutton.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325475613&siteId=291194637