Saber qual foi o botão clicado

Delphi

24/05/2004

Olá se for possível aguém me ajudar, desde já agradeço.
Bom, No mesmo form, tenho os botões incluir, excluir, alterar que ficam visiveis, e os botões ok e cancelar, que ficam invisiveis até que seja clicado em um dos 3 botões citados acima.
Quando clicar no botão OK, preciso saber qual foi o botão clicado antes, para poder, por exemplo habilitar algum edit, desabilitar outro, etc.
Ou seja, preciso saber qual botão foi clicado(incluir, alterar ou excluir ), lembrando que estão todos no mesmo form.


Bossoni

Bossoni

Curtidas 0

Respostas

Adilsond

Adilsond

24/05/2004

Verifique o estado de sua tabela/query.

if Table.State = dsInsert then // voce fez um insert ou append (Incluir)
if Table.State = dsEdit then // voce fez um edit (Alterar)
if Table.State = dsBrowse then // voce apenas abilitou o OK/cancel (Excluir)


GOSTEI 0
Rômulo Barros

Rômulo Barros

24/05/2004

Verifique o estado de sua tabela/query. if Table.State = dsInsert then // voce fez um insert ou append (Incluir) if Table.State = dsEdit then // voce fez um edit (Alterar) if Table.State = dsBrowse then // voce apenas abilitou o OK/cancel (Excluir)


Muito bom he he he :roll:


GOSTEI 0
POSTAR