更改 Rebol 按钮的颜色
我想在 Rebol 中问多项选择题。可能的答案将在按钮上。我想在单击按钮时将其变为红色,这是错误的答案。当按下正确的按钮时,我想继续下一个问题。
我可以更改盒子的颜色(mybox/color: red show mybox)。我可以设置具有两种颜色的切换(但我无法根据任意测试的结果更改它(答案正确吗?)。
似乎可能有一种简单的方法来更改按钮的颜色,无需创建我自己的类似按钮的面部对象,不是吗?
I want to ask multiple choice questions in Rebol. Possible answers will be on buttons. I want to turn a button red when it is clicked and it is the wrong answer. When the correct button is pressed, I want to proceed to the next question.
I can change the color of a box (mybox/color: red show mybox). I can set up a toggle with two colors (but I can't change it based on the result of an arbitrary test (is the answer correct?).
It seems like there is probably a simple way to change the color of a button, without having to create my own button-like face objects. Isn't there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是你想要的吗?该按钮开始呈红色。左键单击将其变为蓝色,右键单击将其变为绿色:
您可以在 STYLE 中定义它,以便任何其他按钮都可以继承该行为。
Does this do what you want? The button starts RED. Left click turns it BLUE, right click turns it GREEN:
You can define that in a STYLE so any other button can inherit the behavior.