muttalip65 Posted March 27, 2018 Share Posted March 27, 2018 procedure TFrmEkders_sinav.UniButton1Click(Sender: TObject);beginunibutton1.Enabled:=false; PersonelDSET.First; while (not PersonelDSET.Eof) do begin LBL_SICIL.Caption:=Trim(PersonelDSET.fieldbyname('kurum_sicil_no').AsString); LBL_ADI.Caption:=Trim(PersonelDSET.fieldbyname('kurum_sicil_no').AsString)+' '+Trim(PersonelDSET.fieldbyname('ad').AsString)+' '+Trim(PersonelDSET.fieldbyname('soyad').AsString); PersonelDSET.next; end;END; unibutton1 e tıklandığındaunibutton1 false olmuyor. personeldset tablosunda 5000 kayıt var. Döngü tamamlanana kadar button1 disable olamıyor. öncelikle while döngüsündeki işlem bittikten sonraunibutton1 false oluyor. bu sorunu nasıl çözebiliriz... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 27, 2018 Share Posted March 27, 2018 Hi, Try this approach: 1. procedure TMainForm.UniButton1Click(Sender: TObject); begin UniButton1.Enabled := False; Sleep(5000); UniButton1.Enabled := True; end; 2. MainForm -> OnCreate event procedure TMainForm.UniFormCreate(Sender: TObject); begin UniButton1.JSInterface.JSAddListener('click', 'function(me){me.setDisabled(true)}'); end; Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 27, 2018 Administrators Share Posted March 27, 2018 Or simply enable the screen mask for that button. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.