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 748 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/ccac2ea5-8225-4bdf-a2ce-958e5f93237d.png" width="300" style="">

     

    参数

    • 新值:为控件(比如标签)设置的新值。
    • 控件名称:要选择更改哪个控件。必须先把控件添加到舞台中,其名称才会出现于下拉列表中。

     

    在现有文字后面增添文字

    这个积木会保留控件上的现有文字,并在后面增添文字:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/7d8f0ec8-47b7-4468-8b5b-c37ef09e354f.png" width="300" style="">

     

    参数

    • 要增添的文字:要增添的文字字符串。
    • 控件名称:要选择更改哪个控件。必须先把控件添加到舞台中,其名称才会出现于下拉列表中。

     

    范例

    下方录屏展示了如何用这2个积木更改标签上的文字。

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/8fd5c0c1-3fc7-46de-ba04-505878877e52.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