简体   繁体   English

在脚本中为B4A(basic4android)中的按钮或标签添加边框和样式吗?

[英]Adding and styling border to a button or label in B4A (basic4android) with script?

I'm new to B4A. 我是B4A的新手。 I want to add border to a button and change it's color with writing script in activity module, in B4A. 我想在按钮上添加边框并通过在B4A中的活动模块中编写脚本来更改其颜色。 What should I do? 我该怎么办? Tnx TNX

您需要创建一个ColorDrawable并将其分配给按钮

Dim cd As ColorDrawable cd.Initialize(Colors.Green, 5dip) Btn.background = cd

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM