Board index » delphi » Make TEdit invisible when clicking on a component other than the TEdit

Make TEdit invisible when clicking on a component other than the TEdit

Hello !

I have a form on which a TEdit component is placed and a number of non-focus
components, like scrollbars and toolbuttons.

I would like to make the TEdit component invisible if any of these
components is clicked without having to do this in each of the components'
OnClick handler.

Any suggestions ?

Thanks,

Roy

 

Re:Make TEdit invisible when clicking on a component other than the TEdit


Quote
"Roy Rutten" <roy.rut...@xarmac.nl.remove.nospam> wrote in message
> I have a form on which a TEdit component is placed and a number of
non-focus
> components, like scrollbars and toolbuttons.

> I would like to make the TEdit component invisible if any of these
> components is clicked without having to do this in each of the components'
> OnClick handler.

If you don't need any other code in any of the OnClick handlers, simply
assign them all to the same handler.

Re:Make TEdit invisible when clicking on a component other than the TEdit


Bruce Roberts <b...@bounceitattcanada.xnet> schreef in berichtnieuws
oduR7.3681$Q06.25...@tor-nn1.netcom.ca...

Quote

> "Roy Rutten" <roy.rut...@xarmac.nl.remove.nospam> wrote in message

> > I have a form on which a TEdit component is placed and a number of
> non-focus
> > components, like scrollbars and toolbuttons.

> > I would like to make the TEdit component invisible if any of these
> > components is clicked without having to do this in each of the
components'
> > OnClick handler.

> If you don't need any other code in any of the OnClick handlers, simply
> assign them all to the same handler.

Unfortunately, each OnClick handler has it's own code.

Thanks anyway !

Roy

Re:Make TEdit invisible when clicking on a component other than the TEdit


In article <9v6vmh$pc...@reader06.wxs.nl>, "Roy Rutten"

Quote
<roy.rut...@xarmac.nl.remove.nospam> writes:
>> If you don't need any other code in any of the OnClick handlers, simply
>> assign them all to the same handler.

>Unfortunately, each OnClick handler has it's own code.

Then either call a common event handler from each of the individual event
handlers, or put the additional edit-visibility code in a common mouse-up or a
common mouse-down event handler (or the visibility code in a common mouse-up
_and_ mouse-down event handler).

Alan Lloyd
alangll...@aol.com

Other Threads