Skip to Main Content
USE A CABEÇA! PROGRAMAÇÃO
book

USE A CABEÇA! PROGRAMAÇÃO

by David Griffiths, Paul Barry
January 2009
Beginner to intermediate content levelBeginner to intermediate
440 pages
13h 6m
Portuguese (Portugal, Brazil)
Alta Books
Content preview from USE A CABEÇA! PROGRAMAÇÃO
262 Capítulo 8
controle os campos de texto
Leia e escreva dados nos campos de texto
Quando alguém fornece texto em um componente Entry, o Python
armazena esse texto em algum lugar na memória como uma string.
Se você quiser ler a string, simplesmente chame o método get() do
componente:
my_entry_eld.get()
Isso retornará a string “ice cream”.
Mas, e se você quiser mudar o conteúdo do componente, poderá fazer
isso também? Sim, você pode: adicione texto ao componente usando
o método insert(). É um pouco mais complicado do que apenas ler
o texto, pois você precisa dizer onde deseja o texto inserido:
my_entry_eld.insert(0, "banana ")
Este é o ÍNDICE do ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

USE A CABEÇA! ÁLGEBRA

USE A CABEÇA! ÁLGEBRA

Tracey Pilon, Dan Pilon
Use A Cabeça Ágil

Use A Cabeça Ágil

Jennifer Stellman, Andrew Greene
Use A Cabeça Padrões E Projetos

Use A Cabeça Padrões E Projetos

Eric Freeman, Elisabeth Freeman, Kathy Sierra, Bert Bates

Publisher Resources

ISBN: 9788576084730