Project: Abakus VCL
Bug report

State: All

User infoMark DiVecchio
04.May.15 4:54
Subject:
TAbColBitBtn response to MouseDown Event

Description:
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.

Steps to reproduce:
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;
}
//---------------------------------------------------------------------------



User infoadmin
04.May.15 15:30
Comment:
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.


You are not logged-in
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot upload files in this forum