TStringGrid OnDrawCell Problem

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #46398
    JCSF
    Participant

      If i try to retrieve info from Cell this don´t work too!!!

      ShowMessage(Lista.Cells[5, Lista.Row]); in OnDblClick don´t word too.

      Plsss i need help!!! :a1:

      #46402
      mol
      Participant

        Have you tried to put the sImagelist onto Frame1 instead of the main form?

        #46403
        JCSF
        Participant

          Thanks.

          But now i´m using sTListView and now i have a new problem. :a8:

          How to put a image in collumns?

          CustomDrawSubItem

          Code:
          var
          I, K : Integer;
          X : String;
          begin
          for I := 0 to Lista.Items.Count -1 do
          begin
          for K := 0 to Lista.Items.SubItems.Count -1 do
          begin
          If Lista.Items.SubItems[6] = 'X' Then
          Item.ImageIndex := 0;
          end;
          end;
          end;

          Error: List index out of bounds(6). 🙁

          I want to put a image when find X.

          Thanks for all!

          #45966
          JCSF
          Participant

            Solution:

            Code:
            procedure TFrame1.ListaCustomDrawSubItem(Sender: TCustomListView;
            Item: TListItem; SubItem: Integer; State: TCustomDrawState;
            var DefaultDraw: Boolean);
            Var
            I : Integer;
            Begin
            For I := 0 to Item.SubItems.Count -1 Do
            Begin
            If Item.SubItems = 'S' Then
            Begin
            Item.SubItems[5] := '';
            Item.SubItemImages[5] := 0;
            End;
            End;
            End;
            #46436
            Support
            Keymaster

              Hello

              Your problem is solved already?

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.