Widgets

在Makepad这个框架中,Widgets是用来构建用户界面(UI)的基本构建块。它们类似于其他UI框架中的组件或控件,用于创建和管理各种UI元素,如按钮、文本框、标签、布局容器等。通过组合和配置这些Widgets,开发者能够构建出复杂且互动的用户界面。

本节将对所有内置小部件进行说明。

In the Makepad, Widgets are the basic building blocks used to build user interfaces (UI). They are similar to components or controls in other UI frameworks, used to create and manage various UI elements such as buttons, text boxes, labels, layout containers, etc. By combining and configuring these Widgets, developers can build complex and interactive user interfaces.

This section will explain all built-in widgets.

Attention

Makepad中的所有内置小部件都遵循XXXBase的命名约定。在开发应用程序时,很少直接使用这些小部件。相反,它们主要在创建组件时使用。在本章中,讨论的所有小部件都遵循XXXBase命名约定,且使用默认属性。我把这些称为内置小工具。当这些小部件被修改或扩展时,它们被称为组件。

All built-in widgets in Makepad follow the naming convention of XXXBase. These widgets are rarely used directly when developing applications. Instead, they are primarily utilized when creating components. In this chapter, all the widgets discussed follow the XXXBase naming convention and use default properties. I refer to these as Built-in Widgets. When these widgets are modified or extended, they are referred to as Components.

在本章节中你不会获得任何例子! 所有的例子将会在Component章节中。

In this chapter, you will not get any examples! All Examples are in the Component chapter.

但请不要忽略这个章节,它是你学习Makepad的重要基础!

But please do not ignore this chapter, it is the basic of Makepad learning!