Procedure

TfrmTemplateEditor.cbxTypeDrawItem

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public/Published

Owner

TfrmTemplateEditor

Declaration

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


Source

3759  procedure TfrmTemplateEditor.cbxTypeDrawItem(Control: TWinControl;
3760    Index: Integer; Rect: TRect; State: TOwnerDrawState);
3761  var
3762    ImgIdx: integer;
3763  
3764  begin
3765    cbxType.Canvas.FillRect(Rect);
3766    case IdxForced[FForceContainer, Index] of
3767      tiTemplate: ImgIdx := 4;
3768      tiFolder: ImgIdx := 3;
3769      tiGroup: ImgIdx := 5;
3770      tiDialog: ImgIdx := 23;
3771      tiRemDlg: ImgIdx := 27;
3772      tiCOMObj: ImgIdx := 28;
3773    else
3774      ImgIdx := ord(tiNone);
3775    end;
3776    if ImgIdx >= 0 then
3777      dmodShared.imgTemplates.Draw(cbxType.Canvas, Rect.Left + 1, Rect.Top + 1, ImgIdx);
3778    if Index >= 0 then
3779      cbxType.Canvas.TextOut(Rect.Left + 21, Rect.Top + 2, cbxType.Items[Index]);
3780  end;