Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

button problem

Status
Not open for further replies.

earlrainer

Programmer
Mar 1, 2002
170
IN
Hello guys,

I have tried to make a new button component that shows two images when normal and when clicked.
one problem I am facing is that the button does not respond fast enough on mouse clicks.
say i click the mouse twice very fast but the button executes button click only once.
something is wrong somewhere but i am not able to identify what.
could it be that it is trapping doubleclick .
I have inherited the component from TCustomControl
 
I tried searching another component.
I found one here but it also has same problem I face

if you install this component and write this code on click
label1.caption := inttostr(strtoint(label1.caption)+1) ;

and this code on mousedown
label2.caption := inttostr(strtoint(label2.caption)+1) ;

then when you run the program and keep clicking fast then you will notice that label2 counter rises much faster than label1.

but if you try same thing with a normal button then both counters are always the same

my problem is what is wrong with the component
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top