21.12.2022 Views

python_para_desenvolvedores_2ed

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

220 Interface Gráfica

<packing>

<property name="expand">False</property>

</packing>

</child>

<child>

<widget class="GtkLabel" id="lbl_hora">

<property name="width_request">300</property>

<property name="height_request">150</property>

<property name="visible">True</property>

<property name="xpad">5</property>

<property name="ypad">5</property>

</widget>

<packing>

<property name="position">1</property>

</packing>

</child>

<child>

<widget class="GtkStatusbar" id="sts_data">

<property name="visible">True</property>

<property name="spacing">2</property>

</widget>

<packing>

<property name="expand">False</property>

<property name="position">2</property>

</packing>

</child>

</widget>

</child>

</widget>

</glade-interface>

Exemplo (rodando programas):

No Glade:

▪ Crie uma janela com o nome “main” com o manipulador

“on_main_destroy” para o sinal “destroy”.

▪ Crie um container fixo para receber os controles.

▪ Crie uma caixa de texto chamada “ntr_cmd”. Esta caixa receberá

comandos para serem executados.

▪ Crie um botão de verificação chamado “chk_shell”, com o texto “Janela

de texto”. Se o botão estiver marcado, o comando será executado em

uma janela de texto.

▪ Crie um botão chamado “btn_rodar” com o manipulador

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!