Delphi-spec-kit DevExpress/DEXT Components
Standards for using DevExpress (DEXT) components in Delphi VCL applications
install
source · Clone the upstream repo
git clone https://github.com/delphicleancode/delphi-spec-kit
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/delphicleancode/delphi-spec-kit "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.gemini/skills/devexpress-components" ~/.claude/skills/delphicleancode-delphi-spec-kit-devexpress-dext-components-da2e47 && rm -rf "$T"
manifest:
.gemini/skills/devexpress-components/SKILL.mdsource content
DevExpress (DEXT) Components — Skill
Use this skill when developing rich interfaces with DevExpress (DEXT) components for Delphi VCL.
When to Use
- When creating advanced grids with
TcxGrid - When using
for hierarchical structuresTcxDBTreeList - When implementing layout managers (
)TdxLayoutControl - When customizing skins and themes
Main Components
| Component | Usage | Prefix |
|---|---|---|
| Advanced grid with grouping, filters, summaries | |
| Data-aware tabular view | |
| View with grouped bands/columns | |
| Card view | |
| TreeList data-aware | |
| Responsive layout manager | |
| Grupo dentro de layout | |
| Item within layout | |
| Edit text data-aware | |
| ComboBox data-aware | |
| Date picker data-aware | |
| Data-aware currency editor | |
| Checkbox data-aware | |
| Lookup combo data-aware | |
| Memo data-aware | |
| Toolbar/ribbon | |
| Ribbon UI | |
| Navigation Bar | |
| Skin controller | |
| Advanced PageControl | |
| Styled GroupBox | |
TcxGrid Configuration
// Criaction programática de colunas procedure TfrmCustomerList.ConfigureGrid; var LView: TcxGridDBTableView; begin LView := grdCustomers.Views[0] as TcxGridDBTableView; LView.DataController.DataSource := dsCustomers; // Configurar comportamento LView.OptionsData.Editing := False; // Somente leitura LView.OptionsData.Deleting := False; LView.OptionsData.Inserting := False; LView.OptionsView.GroupByBox := True; // Agrupamento visual LView.OptionsView.Footer := True; // Rodapé com sumários LView.OptionsView.Indicator := True; // Indicador de linha LView.OptionsCustomize.ColumnFiltering := True; LView.OptionsCustomize.ColumnSorting := True; LView.OptionsSelection.MultiSelect := True; // Configurar colunas individualmente ConfigureColumn(LView.GetColumnByFieldName('name'), 'Nome', 200); ConfigureColumn(LView.GetColumnByFieldName('cpf'), 'CPF', 120); ConfigureColumn(LView.GetColumnByFieldName('email'), 'E-mail', 250); end; procedure TfrmCustomerList.ConfigureColumn( AColumn: TcxGridDBColumn; const ACaption: string; AWidth: Integer); begin if not Assigned(AColumn) then Exit; AColumn.Caption := ACaption; AColumn.Width := AWidth; AColumn.HeaderAlignmentHorz := taCenter; end;
Summaries in the Grid
// Sumário no Footer procedure ConfigureFooterSummary(AView: TcxGridDBTableView); var LSummary: TcxGridDBTableSummaryItem; begin AView.DataController.Summary.FooterSummaryItems.Clear; LSummary := AView.DataController.Summary.FooterSummaryItems.Add as TcxGridDBTableSummaryItem; LSummary.FieldName := 'value'; LSummary.Kind := skSum; LSummary.Format := 'Total: R$ #,##0.00'; LSummary.Column := AView.GetColumnByFieldName('value'); LSummary := AView.DataController.Summary.FooterSummaryItems.Add as TcxGridDBTableSummaryItem; LSummary.FieldName := 'id'; LSummary.Kind := skCount; LSummary.Format := 'Registros: %d'; LSummary.Column := AView.GetColumnByFieldName('name'); end;
TdxLayoutControl (Responsive Layout)
// Organizaction de formulário com LayoutControl // Vantagens: responsivo, reposiciona automaticamente, visual consistente procedure TfrmCustomerEdit.ConfigureLayout; begin lytMain.BeginUpdate; try // Grupo de data pessoais lgrpPersonal.Caption := 'Dados Pessoais'; lgrpPersonal.LayoutDirection := ldHorizontal; // Grupo de address lgrpAddress.Caption := 'Endereço'; lgrpAddress.LayoutDirection := ldHorizontal; // Configurar itens litmName.Control := edtName; litmName.CaptionOptions.Text := 'Nome:'; litmName.CaptionOptions.Width := 80; finally lytMain.EndUpdate; end; end;
Skinning / Themes
// Aplicar skin globalmente uses dxSkinsCore, dxSkinOffice2019Colorful; // Skin específico procedure TfrmMain.ApplySkin; begin // Via SkinController (recomendado) sknController.NativeStyle := False; sknController.SkinName := 'Office2019Colorful'; // OU programaticamente cxLookAndFeelController.NativeStyle := False; cxLookAndFeelController.SkinName := 'Office2019Colorful'; end; // Skins populares: 'Office2019Colorful', 'WXI', 'Metropolis', // 'MetropolisDark', 'TheBezier', 'Fluent', 'Office2019DarkGray'
Filters in the Grid
// Filtro programático procedure TfrmCustomerList.ApplyFilter(const AField, AValue: string); var LView: TcxGridDBTableView; begin LView := grdCustomers.Views[0] as TcxGridDBTableView; LView.DataController.Filter.Root.Clear; LView.DataController.Filter.Root.AddItem( LView.GetColumnByFieldName(AField), foLike, '%' + AValue + '%', AValue ); LView.DataController.Filter.Active := True; end; // Limpar filtro procedure TfrmCustomerList.ClearFilter; begin (grdCustomers.Views[0] as TcxGridDBTableView) .DataController.Filter.Root.Clear; end;
Grid Export
uses cxGridExportLink; // Exportar para Excel procedure TfrmCustomerList.ExportToExcel; begin cxGridExportLink.ExportGridToXLSX( 'customers.xlsx', grdCustomers, False, // AExpand True, // AUseNativeFormat True // AShowProgress ); end; // Exportar para PDF procedure TfrmCustomerList.ExportToPDF; begin cxGridExportLink.ExportGridToPDF( 'customers.pdf', grdCustomers ); end;
DEXT Conventions
| Appearance | Convention |
|---|---|
| Prefixes | Follow the table above (, , , etc.) |
| Skins | Use in the main form |
| Layout | Prefer to manual positioning |
| Grid | Configure at , never at design-time for dynamic columns |
| Filters | Use — do not filter via SQL when possible |
| Summaries | Configure instead of calculating manually |
| Exports | Use — do not redeploy export |
Checklist for DEXT Projects
-
configured in the main form?TdxSkinController - Grids configured with
(read-only when appropriate)?OptionsData - Footer summaries configured with BR formats (
)?R$ #,##0.00 -
used for editing forms?TdxLayoutControl - Grid columns with
,Caption
andWidth
?Alignment - Filters using
(not SQL)?DataController.Filter - Export via
?cxGridExportLink - Component prefixes following the standard table?