Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. 知识库
  3. 二维积木
  4. 设置控件样式

设置控件样式

Scheduled Pinned Locked Moved 二维积木
1 Posts 1 Posters 595 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    creaticodeteacher2-mail
    wrote on last edited by admin
    #1

     

    先修科目

    • 标签控件

     

    介绍

    下面介绍的2个积木可用来修改任意控件的文本样式和背景样式。

     

    设置控件背景

    这个积木用来设置控件的背景:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/3be874d8-93ac-43aa-915d-33677d6b93f5.png" width="600" style="">

     

    参数

    • 背景颜色:可选择背景颜色,还可以带透明度。
    • 边框颜色:可以用同样的方法设置边框颜色。
    • 边框半径:如果你想让按钮带圆角,就可以把边框半径设为大于0。
    • 控件名称:选择更改哪个控件。必须先把控件添加到舞台中,其名称才会出现于下拉列表中。

     

    设置控件文本样式

    这个积木用来设置控件的文本样式:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/a3bbad7c-8b59-4f58-90dc-0d38ec0928a6.png" width="800" style="">

     

    参数

    • 文本样式:你可以从下拉列表中选择文本样式。
    • 字体大小:字符的大小。
    • 字体颜色:通常你应该选一个与背景色差别较大的颜色。:
    • 粗度:是否用粗体。
    • 控件名称:要更改的控件的名称。必须先把控件添加到舞台中,其名称才会出现于下拉列表中。

     

    范例

    下方录屏展示了如何用这些参数创建不同样式的按钮。

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/94be21a3-1689-42d1-a8e5-4dfa8d97b1e6.gif" width="1000" style="border-radius: 5px; border: 1px solid #29622d;">

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode