0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 11:11:49 +02:00

docs: update outdated text in docs

This commit is contained in:
2024-11-07 12:49:36 +01:00
parent ba76d6bb86
commit 4f0693cae3

View File

@ -29,16 +29,16 @@ In this example, we demonstrate how to add a `TextBox` widget to a `BECDockArea`
text_box = gui.add_dock().add_widget("TextBox")
# Set the text to display
text_box.set_text("Hello, World!")
text_box.set_plain_text("Hello, World!")
```
## Example 2 - Displaying HTML Content
The `TextBox` widget can automatically detect and render HTML content. This example shows how to display formatted HTML text.
The `TextBox` widget can also render HTML content. This example shows how to display formatted HTML text.
```python
# Set the text to display as HTML
text_box.set_text("<h1>Welcome to BEC Widgets</h1><p>This is an example of displaying <strong>HTML</strong> text.</p>")
text_box.set_html_text("<h1>Welcome to BEC Widgets</h1><p>This is an example of displaying <strong>HTML</strong> text.</p>")
```
````