From 3f60d711e7fd6fe29bf23935de2f2deb7b3779a6 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 14 Jun 2010 06:04:39 +0000 Subject: [PATCH] Enhancement: Disable "Indexes" and "Foreign keys" node to indicate they have 0 child nodes --- source/copytable.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/copytable.pas b/source/copytable.pas index 527320e7..c629527d 100644 --- a/source/copytable.pas +++ b/source/copytable.pas @@ -233,6 +233,10 @@ begin if GetRegValue(Option, True) then Node.CheckState := csCheckedNormal; (Sender as TVirtualStringTree).OnChecked(Sender, Node); + // Disable node to indicate 0 children + if ((Node.Index = nKeys) and (FKeys.Count = 0)) + or ((Node.Index = nForeignKeys) and (FForeignKeys.Count = 0)) then + Node.States := Node.States + [vsDisabled]; end; 1: if Node.Parent.CheckState in [csCheckedNormal, csCheckedPressed, csMixedNormal, csMixedPressed] then