|
''' |
|
title: Textarea |
|
''' |
|
|
|
import streamsync as ss |
|
|
|
ss.md("## ss.textarea") |
|
|
|
ss.space() |
|
ss.md("#### π
Example") |
|
|
|
ss.md("---") |
|
|
|
|
|
|
|
mytext = ss.textarea("hello, world") |
|
|
|
ss.write("---") |
|
ss.write("#### π Code") |
|
|
|
ss.md(''' |
|
```python |
|
import simplestart as ss |
|
|
|
mytext = ss.textarea("hello, world") |
|
|
|
''') |
|
|
|
ss.space() |
|
ss.md("#### π
Get the text value of the textarea") |
|
ss.md("---") |
|
|
|
def myclick(): |
|
ss.message(mytext.value) |
|
|
|
ss.button("Get Text", onclick=myclick) |
|
|
|
ss.write("---") |
|
ss.write("#### π Code Snippet") |
|
|
|
ss.md(''' |
|
```python |
|
#... |
|
def myclick(): |
|
ss.message(mytext.value) |
|
|
|
ss.button("Get Text", onclick=myclick) |
|
''') |
|
|
|
mytext.width = 500 |
|
mytext.variant = "filled" |
|
|