This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Noviseda_FactuGES2/Source/Modulos/Contactos/Views/uViewProveedores.pas
2009-12-17 18:51:39 +00:00

67 lines
2.6 KiB
ObjectPascal

unit uViewProveedores;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewContactos, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
cxDataStorage, cxEdit, DB, cxDBData, dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg,
dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
dxPSEdgePatterns, ImgList, PngImageList, cxGridCustomPopupMenu,
cxGridPopupMenu, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk, uDADataTable,
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
cxClasses, cxControls, cxGridCustomView, cxGrid, dxPgsDlg, ActnList, TB2Item,
TBX, TB2Toolbar, TBXDkPanels, TB2Dock, uViewFiltroBase, cxImageComboBox,
uDAInterfaces, Menus, uCustomView, uViewBase;
type
IViewProveedores = interface(IViewContactos)
['{C64C0439-5D1D-4B60-9FC0-4E75E58F7384}']
end;
TfrViewProveedores = class(TfrViewContactos, IViewProveedores)
cxGridViewTIENDA_WEB: TcxGridDBColumn;
cxGridViewHOMOLOGADO: TcxGridDBColumn;
procedure cxGridViewICONOGetCellHint(Sender: TcxCustomGridTableItem;
ARecord: TcxCustomGridRecord; ACellViewInfo: TcxGridTableDataCellViewInfo;
const AMousePos: TPoint; var AHintText: TCaption;
var AIsHintMultiLine: Boolean; var AHintTextRect: TRect);
procedure cxGridViewICONOCustomDrawCell(Sender: TcxCustomGridTableView;
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
var ADone: Boolean);
end;
implementation
{$R *.dfm}
procedure TfrViewProveedores.cxGridViewICONOCustomDrawCell(
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
var
R : TRect;
begin
//inherited; <- No llamamos al padre porque queremos hacer tratamiento especial
R := AViewInfo.ContentBounds;
ACanvas.FillRect(R);
if (cxGridView.DataController.DisplayTexts[AViewInfo.GridRecord.RecordIndex,
cxGridViewHOMOLOGADO.Index] = '1') then
ACanvas.DrawImage(GridPNGImageList, R.Left + 2, R.Top + 2, 2)
else
ACanvas.DrawImage(GridPNGImageList, R.Left + 2, R.Top + 2, 1);
ADone := True;
end;
procedure TfrViewProveedores.cxGridViewICONOGetCellHint(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
ACellViewInfo: TcxGridTableDataCellViewInfo; const AMousePos: TPoint;
var AHintText: TCaption; var AIsHintMultiLine: Boolean;
var AHintTextRect: TRect);
begin
inherited;
if (cxGridView.DataController.DisplayTexts[ARecord.Index, cxGridViewHOMOLOGADO.Index] = '1') then
AHintText := 'Proveedor homologado';
end;
end.