创建SwitchButton控件 Create a SwitchButton control _id: 控件ID,不可与其他控件重复 text: 控件文本 coordinate: x,y坐标 默认 (400,500) width: 控件宽度,默认 400 height: 控件高度,默认 60 is_select: 是否开/关 默认 关 return: True或者F
(self, _id: int, text: str, coordinate: tuple = (400,500), width: int = 400, height: int = 60,is_select: bool = False)
| 72 | return "true" in self.SendData("createCheckBox", _id, text, coordinate[0], coordinate[1], width, height, is_select) |
| 73 | |
| 74 | def create_switch_button(self, _id: int, text: str, coordinate: tuple = (400,500), width: int = 400, height: int = 60,is_select: bool = False) -> bool: |
| 75 | """ |
| 76 | 创建SwitchButton控件 |
| 77 | Create a SwitchButton control |
| 78 | |
| 79 | _id: 控件ID,不可与其他控件重复 |
| 80 | text: 控件文本 |
| 81 | coordinate: x,y坐标 默认 (400,500) |
| 82 | width: 控件宽度,默认 400 |
| 83 | height: 控件高度,默认 60 |
| 84 | is_select: 是否开/关 默认 关 |
| 85 | return: True或者False |
| 86 | |
| 87 | _id: control id, which cannot be duplicated with other controls |
| 88 | text: control text |
| 89 | coordinate: x,y coordinates default (400,500) |
| 90 | width: the width of the control, which is 400 by default |
| 91 | height: control height, default is 60 |
| 92 | is_select: Whether to turn on/off the default off? |
| 93 | return: True or False |
| 94 | """ |
| 95 | return "true" in self.SendData("createSwitchButton", _id, text, coordinate[0], coordinate[1], width, height, is_select) |
| 96 | |
| 97 | def create_list_text(self, _id: int, hint_text: str, list_text: str, coordinate: tuple = (400,500), width: int = 400, height: int = 400) -> bool: |
| 98 | """ |