View Issue Details

IDProjectCategoryView StatusLast Update
0003111JEDI VCL00 JVCL Componentspublic2005-08-16 09:02
ReporteranonymousAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0003111: TJvgAskListBox Only Push down 2 Buttons
DescriptionSetPushedButtonInLine only works with the first two buttons.

The original code

function TJvgAskListBox.SetPushedButtonInLine(Index: Word; Value: Word): Boolean;
var
  R: TRect;
begin
  if (Index < Items.Count) and (Value in [0..2]) then
//I suggest somethin like
//if (Index < Items.Count) and (Value < FButtons.Count) then
  begin
    Result := True;
    if FPushedButton[Index] = Value then
      Exit;
    FPushedButton[Index] := Value;
    SendMessage(Handle, LB_GETITEMRECT, Index, Longint(@R));
    R.Left := FSegment1Width;
    InvalidateRect(Handle, @R, True);
    //ButtonClicked;
    if (aloAutoScroll in Options) and (Value <> 0) then
      SendMessage(Handle, LB_SETCURSEL, FSelectedItem + 1, Longint(0));
  end
  else
    Result := False;
end;
TagsNo tags attached.

Relationships

duplicate of 0002978 closed JVGASKListBox 

Activities

anonymous

2005-07-25 07:58

viewer   ~0007613

Better
if (Index < Items.Count) and (Value <= FButtons.Count) then

obones

2005-07-28 00:44

administrator   ~0007638

Last time I looked at this, the Value was used for the state of the button: 0 is normal, 1 is checked, 2 is greyed. Hence, I doubt this works, as I also tried it. I'm even convinced there already is an issue about this very same problem here in mantis.

anonymous

2005-07-31 11:55

viewer   ~0007648

Thats right 0 is normal, 1 is first button down, 2 second button down, etc....

But with this code, you only can push down by code the first 2 buttons of the ask list. But you can define many buttons (answers)

obones

2005-08-16 09:02

administrator   ~0007803

This is now solved in CVS.

Issue History

Date Modified Username Field Change
2005-07-24 07:15 anonymous New Issue
2005-07-25 07:58 anonymous Note Added: 0007613
2005-07-28 00:44 obones Note Added: 0007638
2005-07-28 00:44 obones Status new => feedback
2005-07-31 11:55 anonymous Note Added: 0007648
2005-08-09 06:07 obones Relationship added duplicate of 0002978
2005-08-16 09:02 obones Status feedback => resolved
2005-08-16 09:02 obones Resolution open => fixed
2005-08-16 09:02 obones Assigned To => obones
2005-08-16 09:02 obones Note Added: 0007803