[lazarus] TCheckListBox
I have a little issue with TCheckListBox. It is impossible to set by han if an items is checked or not. After reading the code, I have found the following code : procedure TCustomCheckListBox.SetChecked(const AIndex: Integer; const AValue: Boolean); begin SetState(AIndex, cbChecked); end; May be it should be : procedure TCustomCheckListBox.SetChecked(const AIndex: Integer; const AValue: Boolean); begin if AValue then SetState(AIndex, cbChecked) else SetState(AIndex, cbUnchecked); end; With this modification it works well for me. -- Damien Gerard [EMAIL PROTECTED] Le temps n'a pas d'importance. Seul le code est important -- (f00ty) _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TCheckListBox
On Jan 11, 2008, at 2:23 AM, Paul Ishenin wrote: Damien Gerard wrote: I have a little issue with TCheckListBox. It is impossible to set by han if an items is checked or not. After reading the code, I have found the following code : procedure TCustomCheckListBox.SetChecked(const AIndex: Integer; const AValue: Boolean); begin SetState(AIndex, cbChecked); end; May be it should be : procedure TCustomCheckListBox.SetChecked(const AIndex: Integer; const AValue: Boolean); begin if AValue then SetState(AIndex, cbChecked) else SetState(AIndex, cbUnchecked); end; With this modification it works well for me. Thanks, my fault. Applied in r13718. Thanks -- Damien Gerard [EMAIL PROTECTED] Le temps n'a pas d'importance. Seul le code est important -- (f00ty) _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] TCheckListBox: 2 problems
Lazarus 0.9.15 svn r9356, Linux, gtk1 first problem: OnClick event is not fired, when changing the selection using the cursor keys. In Delpih7 it is fired and for Lazarus/TListBox it is also fired. second problem: Sometime when selecting an item with the mouse, the (check)listbox scolls to the last item and selects that instaed of the clicked item. This is the same for TListBox and TCheckListBox Any idea? _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives