Board index » cppbuilder » disable: discard event click

disable: discard event click

hi, im writing a button from TCustomComponent and i have this question:
how can i discard the OnClick exent?
i'd like to create an Enable proprety so, if it is false, the paint method
works in a different way and the OnClick Event does not appen

thanks

Teo

 

Re:disable: discard event click


Quote
> hi, im writing a button from TCustomComponent and i have this question:
> how can i discard the OnClick exent?
> i'd like to create an Enable proprety
>so, if it is false, the paint method
> works in a different way and the OnClick Event does not appen

void __fastcall GreatestButtonAllOverTheWorld::MouseButtonClicked( TObject*
Sender )
{
    if (Enable)
  {
  }
  else
  {
  }

Quote
}

void __fastcall GreatestButtonAllOverTheWorld::Paint( void )
{
    if (Enable)
  {
  }
  else
  {
  }
Quote
}

Re:disable: discard event click


thanks

"Gnum" <m...@oscreator.com> ha scritto nel messaggio
news:3ea36740@newsgroups.borland.com...

Quote

> > hi, im writing a button from TCustomComponent and i have this question:
> > how can i discard the OnClick exent?
> > i'd like to create an Enable proprety
> >so, if it is false, the paint method
> > works in a different way and the OnClick Event does not appen

> void __fastcall GreatestButtonAllOverTheWorld::MouseButtonClicked(
TObject*
> Sender )
> {
>     if (Enable)
>   {
>   }
>   else
>   {
>   }
> }

> void __fastcall GreatestButtonAllOverTheWorld::Paint( void )
> {
>     if (Enable)
>   {
>   }
>   else
>   {
>   }
> }

Other Threads