Board index » delphi » Disablecontrols or HOW ?

Disablecontrols or HOW ?

Hi,

Within my database application there a field where
the user has to choose a value 'Ja' or 'Nee''....sorry
Yes or No (I'm using a dbcombobox)
When the value will be NO....the user may NOT
change any db-aware components, only this dbcombobox
to change the value into YES. Also some controls on
the navigator must be enabled:=True of enabled:=False.

How to do this...do I need to set every db component to
enabled:=true / enabled:=false when the value change....???

Greetings Peter

 

Re:Disablecontrols or HOW ?


You might consider putting logic in the datasource's OnDataChange event that
enables and disables other components accordingly.

--
Steve F (Team B)
"Peter van Mierlo" <p.van.mie...@eindhoven.nl> wrote in message
news:39584D5D.F9D48042@eindhoven.nl...

Quote
> Hi,

> Within my database application there a field where
> the user has to choose a value 'Ja' or 'Nee''....sorry
> Yes or No (I'm using a dbcombobox)
> When the value will be NO....the user may NOT
> change any db-aware components, only this dbcombobox
> to change the value into YES. Also some controls on
> the navigator must be enabled:=True of enabled:=False.

> How to do this...do I need to set every db component to
> enabled:=true / enabled:=false when the value change....???

> Greetings Peter

Re:Disablecontrols or HOW ?


Peter,

The easiest way is to put all the DB controls except the dbcombobox on
a panel and then enable/disable the panel.

Regards,
Colin Acheson

On Tue, 27 Jun 2000 08:44:45 +0200, Peter van Mierlo

Quote
<p.van.mie...@eindhoven.nl> wrote:

>How to do this...do I need to set every db component to
>enabled:=true / enabled:=false when the value change....???

Other Threads