Issue ID: 00138 |
Projekt: Abakus VCL![]() State: All ![]() 04.May.15 4:54 |
Betreff: TAbColBitBtn response to MouseDown Event Beschreibung: I use a TAbColBitBtn in my project. I use the Mouse Down event to start a process which takes about 2 seconds to complete. I expect the TextOn to appear as soon as I press the button. It does not work that way. Build the project described. Test it two ways 1) click very fast on the TEST button - the TextOn never appears but the event occurs and 2) click very slow (4-5 seconds), the TextOn does not appear until the 2 second process is complete. It seems to me that the TextOn should appear as soon as the button is pushed and the TextOff should appear as soon as the button is released - even if the 2 second process is still running. Schritte zum Reproduzieren: Create a Form with two TAbLED, a TAbColBitBtn, and a standard button. Name them as shown in the code: void __fastcall TForm1::AbColBitBtn1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { AbLED1->Checked = true; long i, j, k; //Here a process which takes about 1 second for (i = 0 ; i < 1000000L ; i++) { for (j = 0; j < 500 ; j++) { k = j; } } AbLED2->Checked = true; } //--------------------------------------------------------------------------- void __fastcall TForm1::RSTClick(TObject *Sender) { AbLED1->Checked = false; AbLED2->Checked = false; } //--------------------------------------------------------------------------- |
![]() 04.May.15 15:30 | Kommentar: Hi Mark, if you click with the mouse first the OnMouseDown Event is called, before the Status of the button will change. You may use the OnClick Event, then first the Status of the button will change, before Event call. |