支持cxcheckbox
This commit is contained in:
parent
1e867f1d48
commit
e76a145688
|
@ -273,13 +273,15 @@ var
|
||||||
combox:TcxCombobox;
|
combox:TcxCombobox;
|
||||||
cxDateEdit:TcxDateEdit;
|
cxDateEdit:TcxDateEdit;
|
||||||
cxButtonEdit:TcxButtonEdit;
|
cxButtonEdit:TcxButtonEdit;
|
||||||
|
cxCheckBox:TcxCheckBox;
|
||||||
mwidth,i,j,cnt:integer;
|
mwidth,i,j,cnt:integer;
|
||||||
mdesignCode :String;
|
mdesignCode :String;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
mdesignCode := fDllFileName +'|'+layOut.Parent.name+ '|' + intTostr(formId) + '|' + gridName;
|
mdesignCode := fDllFileName +'|'+layOut.Parent.name+ '|' + intTostr(formId) + '|' + gridName;
|
||||||
|
|
||||||
|
layOut.BeginUpdate; // Postpones updates
|
||||||
|
try
|
||||||
with AdoTmp do begin close;
|
with AdoTmp do begin close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select A.* ');
|
sql.Add('select A.* ');
|
||||||
|
@ -293,9 +295,6 @@ begin
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
layOut.BeginUpdate; // Postpones updates
|
|
||||||
try
|
|
||||||
// Creates a child group within the root group
|
// Creates a child group within the root group
|
||||||
for i := 0 to layOut.Items.Count - 1 do
|
for i := 0 to layOut.Items.Count - 1 do
|
||||||
begin
|
begin
|
||||||
|
@ -360,6 +359,24 @@ begin
|
||||||
ALayoutItem.Parent := ALayoutGroup;
|
ALayoutItem.Parent := ALayoutGroup;
|
||||||
ALayoutItem.Name:= 'item_'+trim(AdoTmp.FieldByName('fieldName').AsString) ;
|
ALayoutItem.Name:= 'item_'+trim(AdoTmp.FieldByName('fieldName').AsString) ;
|
||||||
|
|
||||||
|
end
|
||||||
|
else if trim(AdoTmp.FieldByName('queryControlType').AsString)='checkBox' then
|
||||||
|
begin
|
||||||
|
cxCheckBox:= TcxCheckBox.Create(nil);
|
||||||
|
cxCheckBox.Name:= trim(AdoTmp.FieldByName('fieldName').AsString);
|
||||||
|
cxCheckBox.AlignWithMargins:=true;
|
||||||
|
cxCheckBox.Style.Font.Size:=gFontSize;
|
||||||
|
cxCheckBox.Caption:= trim(AdoTmp.FieldByName('caption').AsString) ;
|
||||||
|
cxCheckBox.TabOrder:=cnt;
|
||||||
|
cxCheckBox.Tag:=99;
|
||||||
|
//
|
||||||
|
if ALayoutItem=nil then
|
||||||
|
ALayoutItem := TdxLayoutItem(layOut.CreateItem);
|
||||||
|
ALayoutItem.Control := cxCheckBox;
|
||||||
|
ALayoutItem.CaptionOptions.Text:='';//trim(AdoTmp.FieldByName('caption').AsString) ;
|
||||||
|
ALayoutItem.Parent := ALayoutGroup;
|
||||||
|
ALayoutItem.Name:= 'item_'+trim(AdoTmp.FieldByName('fieldName').AsString) ;
|
||||||
|
|
||||||
end
|
end
|
||||||
else if trim(AdoTmp.FieldByName('queryControlType').AsString)='date' then
|
else if trim(AdoTmp.FieldByName('queryControlType').AsString)='date' then
|
||||||
begin
|
begin
|
||||||
|
@ -449,6 +466,7 @@ begin
|
||||||
|
|
||||||
finally
|
finally
|
||||||
layOut.EndUpdate; // Resumes updates, even if an exception occurs
|
layOut.EndUpdate; // Resumes updates, even if an exception occurs
|
||||||
|
if layout.Items.VisibleCount=0 then layout.Visible:=false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user