Changing Font
Posted: Thu Dec 14, 2006 8:44 pm
I am using Delphi 2006 BDS. I am populating a DBTree at runtime. My code is below. How do I change the font for the labels of the nodes and shapes?
ModelTree_Query1.Close;
ModelTree_Query1.Database := frmSearch.Extractor_Database1;
ModelTree_Query1.SQL.Clear;
ModelTree_Query1.SQL.Add('Select A.ModelName,A.ModelID,B.SubModelName, B.SubModelID, C.Subject, C.SubjectID, ');
ModelTree_Query1.SQL.Add(' D.Element, D.ElementID From Models as A, ProfileSubmodel as B, ProfileSubModelSubject as C, ');
ModelTree_Query1.SQL.Add(' ProfileSubjectElement as D Where A.ModelID = B.ModelID and B.SubModelID = C.SubModelID and ');
ModelTree_Query1.SQL.Add(' C.SubjectID = D.SubjectID and A.ModelID=:intModelID;');
ModelTree_Query1.ParamByName('intModelID').asInteger := intModelID;
ModelTree_Query1.ActiveRuntime := True;
DBTree1.Layout.Clear;
with DBTree1.Layout.Add do
begin
DataSet := ModelTree_Query1;
CodeField := '' ;
ParentField := 'ModelName;SubModelName;Subject;Element';
Fields := 'ElementID';
end;
DBTree1.MultiLineText := True;
DBTree1.Refresh;
DBTree1.Roots[0].Expanded := True;
Thanks
ModelTree_Query1.Close;
ModelTree_Query1.Database := frmSearch.Extractor_Database1;
ModelTree_Query1.SQL.Clear;
ModelTree_Query1.SQL.Add('Select A.ModelName,A.ModelID,B.SubModelName, B.SubModelID, C.Subject, C.SubjectID, ');
ModelTree_Query1.SQL.Add(' D.Element, D.ElementID From Models as A, ProfileSubmodel as B, ProfileSubModelSubject as C, ');
ModelTree_Query1.SQL.Add(' ProfileSubjectElement as D Where A.ModelID = B.ModelID and B.SubModelID = C.SubModelID and ');
ModelTree_Query1.SQL.Add(' C.SubjectID = D.SubjectID and A.ModelID=:intModelID;');
ModelTree_Query1.ParamByName('intModelID').asInteger := intModelID;
ModelTree_Query1.ActiveRuntime := True;
DBTree1.Layout.Clear;
with DBTree1.Layout.Add do
begin
DataSet := ModelTree_Query1;
CodeField := '' ;
ParentField := 'ModelName;SubModelName;Subject;Element';
Fields := 'ElementID';
end;
DBTree1.MultiLineText := True;
DBTree1.Refresh;
DBTree1.Roots[0].Expanded := True;
Thanks