Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003111 [JEDI VCL] 00 JVCL Components minor always 2005-07-24 07:15 2005-08-16 09:02
Reporter anonymous View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0003111: TJvgAskListBox Only Push down 2 Buttons
Description SetPushedButtonInLine 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;
Additional Information
Tags No tags attached.
Attached Files

- Relationships
duplicate of 0002978closed JVGASKListBox 

-  Notes
(0007613)
anonymous (viewer)
2005-07-25 07:58

Better
if (Index < Items.Count) and (Value <= FButtons.Count) then
(0007638)
obones (administrator)
2005-07-28 00:44

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.
(0007648)
anonymous (viewer)
2005-07-31 11:55

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)
(0007803)
obones (administrator)
2005-08-16 09:02

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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker