insert method
Leave feedback
On this page
Inserts a formatted text fragment into the collection at a given index.
def insert(self, index, text):
...
| Parameter | Type | Description |
|---|---|---|
| index | int |
The zero-based index at which formatted text fragment should be inserted. |
| text | str |
The fragment text. |
Inserts a formatted text fragment into the collection at a given index.
def insert(self, index, text, font):
...
| Parameter | Type | Description |
|---|---|---|
| index | int |
The zero-based index at which formatted text fragment should be inserted. |
| text | str |
The fragment text. |
| font | Font |
The font of the text. |
Inserts a formatted text fragment into the collection at a given index.
def insert(self, index, text, font, foreground_color):
...
| Parameter | Type | Description |
|---|---|---|
| index | int |
The zero-based index at which the formatted text fragment should be inserted. |
| text | str |
The fragment text. |
| font | Font |
The font of the text. |
| foreground_color | Color |
The foreground color of the text. |
Inserts a formatted text fragment into the collection at a given index.
def insert(self, index, text, font, foreground_color, background_color):
...
| Parameter | Type | Description |
|---|---|---|
| index | int |
The zero-based index at which formatted text fragment should be inserted. |
| text | str |
The fragment text. |
| font | Font |
The font of the text. |
| foreground_color | Color |
The foreground color of the text. |
| background_color | Color |
The background color of the text. |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.