Procedure

TfrmReminderTree.lbRemDrawItem

Module

fReminderTree

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public/Published

Owner

TfrmReminderTree

Declaration

procedure lbRemDrawItem(Control: TWinControl; Index: Integer;
  Rect: TRect; State: TOwnerDrawState);

Calls Hierarchy


TfrmReminderTree.lbRemDrawItem
 └TfrmReminderTree.SyncTopControls

Calls

Name Declaration Comments
TfrmReminderTree.SyncTopControls procedure SyncTopControls(FromTree: boolean); -


Source

383   procedure TfrmReminderTree.lbRemDrawItem(Control: TWinControl;
384     Index: Integer; Rect: TRect; State: TOwnerDrawState);
385   var
386     Tmp: string;
387     Flags: Longint;
388   
389   begin
390     SyncTopControls(FALSE);
391     if (odSelected in State) then
392     begin
393       if((ActiveControl = lbRem) or (ActiveControl = tvRem)) then
394       begin
395         lbRem.Canvas.Brush.Color := clHighlight;
396         lbRem.Canvas.Font.Color := clHighlightText
397       end
398       else
399       begin
400         lbRem.Canvas.Brush.Color := clInactiveBorder;
401         lbRem.Canvas.Font.Color := clWindowText;
402       end;
403     end;
404     Flags := lbRem.DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER);
405     Tmp := piece(lbRem.Items[Index],U,1);
406     lbRem.Canvas.FillRect(Rect);
407     Inc(Rect.Left, 6);
408     DrawText(lbRem.Canvas.Handle, PChar(Tmp), Length(Tmp), Rect, Flags);
409     inc(Rect.Left, DateColWidth);
410     Tmp := piece(lbRem.Items[Index],U,2);
411     DrawText(lbRem.Canvas.Handle, PChar(Tmp), Length(Tmp), Rect, Flags);
412     inc(Rect.Left, LastDateColWidth);
413     Tmp := piece(lbRem.Items[Index],U,3);
414     DrawText(lbRem.Canvas.Handle, PChar(Tmp), Length(Tmp), Rect, Flags);
415   end;