You can do the following:

const cbxAllowedState = unchecked;

procedure Tform1.mycbxonchange (Sender : TObject);
begin
 mycbx.checked := cbxAllowedState;
end;

That's the easiest way ... now if you have more then one checkbox that
you need to make it read only do the following:

cbxStates : array [0..numberofcbx] = (unchecked, checked ....);

procedure Tform1.mycbxonchange (Sender : TObject);
begin
 TCheckbox(Sender).Checked := cbxStates[TCheckbox(Sender).tag];
end;

There are other ways to do it... but this one will work on all widget
types without the need to create a new component.

Ido

On 9/7/06, Fabio H Souza <[EMAIL PROTECTED]> wrote:
Hi,

I need a component "TCheckBox" with the ReadOnly property.
In Delphi I use the "TLMDCheckBox" component.

Exists some similar component in the Lazarus?

How I implement this?

Thanks
Fabio


_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to