Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
12_组件-任意组件
Search
powerhope
August 11, 2016
390
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
12_组件-任意组件
App Inventor移动应用开发
powerhope
August 11, 2016
More Decks by powerhope
See All by powerhope
1_App Inventor初步
powerhope
0
290
2_1_HelloPurr
powerhope
0
160
2_2_8-Ball(魔术8球)
powerhope
2
170
3_App Inventor编程基础
powerhope
0
150
4_组件-用户界面
powerhope
0
190
5_组件-界面布局
powerhope
0
180
6_组件-多媒体
powerhope
0
140
7_组件-绘图动画
powerhope
0
160
8_组件-传感器
powerhope
0
160
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
460
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
500
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
410
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
440
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Paper Plane
katiecoart
PRO
4
53k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
310
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
450
Building an army of robots
kneath
307
47k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Transcript
College of Mathematics and Computer Science, Hunan Normal University 瞿绍军
湖南师范大学数学与计算机科学学院
College of Mathematics and Computer Science, Hunan Normal University
任意组件是用App Inventor进行高级编程的一项非 常重要的功能,可以实现对某个组件属性的动态修 改,或成批的修改多个组件的属性。在任意组件的 块中都增加了一个“组件”参数,用来指定需要修改 属性的组件对象或获取组件对象的对应属性值 任意组件
College of Mathematics and Computer Science, Hunan Normal University
在组件设计窗口的组件列表中是没有任意组件显示 的,因为任意组件不是一个真正的组件。当添加了 某个组件到组件设计视图中后,在逻辑设计的模块 下面的任意组件下才会出现该类组件的任意组件。 如下图是添加了按钮和标签后出现的任意按钮和任 意标签。 任意组件
College of Mathematics and Computer Science, Hunan Normal University 成批修改标签文本颜色和大小
College of Mathematics and Computer Science, Hunan Normal University 成批修改标签文本颜色和大小
College of Mathematics and Computer Science, Hunan Normal University 成批修改标签文本颜色和大小
College of Mathematics and Computer Science, Hunan Normal University
这里的实现中是直接在逐项循环中创建的列表,然 后把四个标签组件对象放到列表中的。 成批修改标签文本颜色和大小
College of Mathematics and Computer Science, Hunan Normal University
此外,也可以先创建一个全局变量,并初始化为空 列表,然后在某个事件(如屏幕初始化事件)中通 过设置全局变量的值处创建列表并添加对象。但是 不能直接定义全局变量后就创建列表,因为此时组 件对象都还没有加载,如下图是不允许的。 成批修改标签文本颜色和大小
College of Mathematics and Computer Science, Hunan Normal University
正确的创建组件列表的方式 成批修改标签文本颜色和大小
College of Mathematics and Computer Science, Hunan Normal University 成批修改标签文本颜色和大小
College of Mathematics and Computer Science, Hunan Normal University 成批修改标签文本颜色和大小