Como desabilitar um bitbtn ao chegar no final da tabela?
Gostaria de saber como desbilitar automaticamente um bitbtn ao chegar no final da tabela, pois não uso dbnavigator e sim bitbtn como navegador.
Desde já agradeço a todos q puderam me ajudar
Desde já agradeço a todos q puderam me ajudar
Exvasp
Curtidas 0
Respostas
Edilcimar
20/03/2006
If table1.last then
bitbtn1.enabled := false
else
bitbtn1.enabled := true;
bitbtn1.enabled := false
else
bitbtn1.enabled := true;
GOSTEI 0
Paullsoftware
20/03/2006
BitBtn1.Enabled := Not Tabela.Eof;
acho que isso serve! :wink:
GOSTEI 0
Adriano Santos
20/03/2006
If table1.last then
bitbtn1.enabled := false
else
bitbtn1.enabled := true;
Edilcimar se você der um .Last a tabela irá para o final, ao invés de retornar se está ou não no final. O certo é usar EOF (end of file) ou BOF (begin of file), final de arquivo e inicio de arquivo respectivamente.
GOSTEI 0
Edilcimar
20/03/2006
vc está confundindo table1.last com if table1.last, no primeiro caso eu estou ORDENANDO que a tabela vá para o último e no segundo estou verificando, quanto ao eof faz a mesma verificação, é que na hora me veio a mente o last e não o eof, mas da maneira que fiz as duas fazem a mesma coisa
GOSTEI 0
Exvasp
20/03/2006
If table1.last then
bitbtn1.enabled := false
else
bitbtn1.enabled := true;
Muito Obrigado por ter tirado essa dúvida
GOSTEI 0
Exvasp
20/03/2006
BitBtn1.Enabled := Not Tabela.Eof;
Muito Obrigado por ter tirado esta minha dúvida
GOSTEI 0