Re: [Lazarus] How to make TCheckListBox read only

2011-08-04 Thread Felipe Monteiro de Carvalho
2011/8/4 corps...@web.de

 A simple

 checklistbox1.enabled := false wouldnt do it.


I just tested in Gtk2 and setting enabled to false made the checklistbox
read-only.

Why do you think that it doesn't work?

-- 
Felipe Monteiro de Carvalho
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to make TCheckListBox read only

2011-08-04 Thread Zaher Dirkey
2011/8/4 Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com


 2011/8/4 corps...@web.de

 A simple

 checklistbox1.enabled := false wouldnt do it.


 I just tested in Gtk2 and setting enabled to false made the checklistbox
 read-only.

 Why do you think that it doesn't work?


Enable := False In Windows make the list in light gray colors and scrollbars
not work (also disabled)

-- 
 Felipe Monteiro de Carvalho

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
Zaher Dirkey
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to make TCheckListBox read only

2011-08-04 Thread Alberto Narduzzi

I saw that my reply posted from the web was not readable... :-(

So here it is again.



A simple

checklistbox1.enabled := false wouldnt do it.

Try this code :

procedure TForm1.CheckListBox1ItemClick(Sender: TObject; Index: integer);
begin
checklistbox1.Checked[index] := not checklistbox1.Checked[index] ;
end;


that _of_course_ wouldn't work. It's not the user changing the 
checkboxes... it's your code!


if you disable the checklistbox, that will only keep the users from 
being able to change the status of the single checkboxes.
Moreover, why are you toggling the checked propery, in the onclick? It 
gets changes its state already...


Cheers, A.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to make TCheckListBox read only

2011-08-04 Thread Zaher Dirkey
On Thu, Aug 4, 2011 at 11:16 PM, Alberto Narduzzi albertonardu...@yahoo.com
 wrote:

 I saw that my reply posted from the web was not readable... :-(

 So here it is again.



  A simple

 checklistbox1.enabled := false wouldnt do it.

 Try this code :

 procedure TForm1.CheckListBox1ItemClick(**Sender: TObject; Index:
 integer);
 begin
 checklistbox1.Checked[index] := not checklistbox1.Checked[index] ;
 end;



For me that not a good solution, imagen we have no readonly in memo, can we
have same solution like this?.
I prefer to add ReadOnly to that components.

that _of_course_ wouldn't work. It's not the user changing the checkboxes...
 it's your code!

 if you disable the checklistbox, that will only keep the users from being
 able to change the status of the single checkboxes.
 Moreover, why are you toggling the checked propery, in the onclick? It
 gets changes its state already...

 Cheers, A.

 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
Zaher Dirkey
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] How to make TCheckListBox read only

2011-08-03 Thread Zaher Dirkey
Hi,
How to make TCheckListBox read only, the user can not change the checked for
item?.

Thanks in advance
Zaher Dirkey
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to make TCheckListBox read only

2011-08-03 Thread Corpsman
A simplechecklistbox1.enabled := false wouldnt do it.Try this code :procedure TForm1.CheckListBox1ItemClick(Sender: TObject; Index: integer);begin checklistbox1.Checked[index] := not checklistbox1.Checked[index] ;end;--AufmeinerHomepagewww.Corpsman.deistimmerwaslos,stndigwirdsieaktualisiertunderweitert.Daistfrjedenwasdabei.Von: Zaher Dirkey parm...@gmail.comGesendet: 04.08.2011 00:20:06An: Lazarus mailing list lazarus@lists.lazarus.freepascal.orgBetreff: [Lazarus] How to make TCheckListBox read onlyHi,How to make TCheckListBox read only, the user can not change the checked for item?.Thanks in advanceZaher DirkeySchon gehrt? WEB.DE hat einen genialen Phishing-Filter in dieToolbar eingebaut! http://produkte.web.de/go/toolbar


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus