1
This commit is contained in:
parent
e2605b9981
commit
97408f18a7
|
@ -10,7 +10,7 @@ uses
|
|||
cxGridCustomTableView, cxGraphics, cxCalendar, cxCheckBox, cxGridDBTableView,
|
||||
cxGridDBBandedTableView, cxStyles, cxPc, cxGroupBox, U_cxGridCustomCss,dxSkinsCore, dxSkinWXI,dxSkinsDefaultPainters,
|
||||
cxCustomData, cxClasses, cxTimeEdit, cxEdit, cxLookAndFeels,dxLayoutControl,
|
||||
cxLookAndFeelPainters, cxGridCustomView, Buttons, cxDropDownEdit;
|
||||
cxLookAndFeelPainters, cxGridCustomView, Buttons, cxDropDownEdit,FrameDateSel;
|
||||
|
||||
type
|
||||
TWindowFormDeSign = class(TObject)
|
||||
|
@ -86,63 +86,83 @@ begin
|
|||
mStyleCode := '01';
|
||||
|
||||
fFontSize:= getSystemFontSize(ADOTmp,PWideChar(mStyleCode));
|
||||
if fFontSize <= 9 then
|
||||
fFontSize := 9;
|
||||
if fFontSize < 9 then
|
||||
fFontSize := 12;
|
||||
|
||||
mForm.Font.Size := fFontSize;
|
||||
// ´°¿Ú±³¾°É«
|
||||
if mIsCustomBackColor then
|
||||
mForm.Color := clFormBack;
|
||||
// if mIsCustomBackColor then
|
||||
// mForm.Color := clFormBack;
|
||||
|
||||
|
||||
for i := 0 to mForm.ComponentCount - 1 do
|
||||
begin
|
||||
if (fFontSize > 9) then
|
||||
if not(mForm.Components[i] is Twincontrol) then
|
||||
begin
|
||||
if mForm.Components[i] is Tlabel then
|
||||
begin
|
||||
if mForm.Components[i].Tag<>10 then
|
||||
Tlabel(mForm.Components[i]).Font.Size:= fFontSize ;
|
||||
if Tlabel(mForm.Components[i]).Left >= fFontSize then
|
||||
Tlabel(mForm.Components[i]).Left := Tlabel(mForm.Components[i]).Left - fFontSize;
|
||||
continue;
|
||||
end;
|
||||
if mForm.Components[i] is TdatetimePicker then
|
||||
begin
|
||||
if TdatetimePicker(mForm.Components[i]).Width <= 90 then
|
||||
TdatetimePicker(mForm.Components[i]).Width := TdatetimePicker(mForm.Components[i]).Width + ffontsize * 2;
|
||||
continue;
|
||||
end;
|
||||
continue;
|
||||
end;
|
||||
// if (fFontSize > 9) then
|
||||
// begin
|
||||
if (mForm.Components[i] is Tlabel) or (mForm.Components[i] is Tcxlabel) then
|
||||
begin
|
||||
// mForm.Components[i] is TfrmFrameDateSel
|
||||
//if (mForm.Components[i].Tag<>10) and (Tlabel(mForm.Components[i]).Font.Size<>fFontSize) then
|
||||
// Tlabel(mForm.Components[i]).Font.Size:= fFontSize ;
|
||||
// if Tlabel(mForm.Components[i]).Left >= fFontSize then
|
||||
// Tlabel(mForm.Components[i]).Left := Tlabel(mForm.Components[i]).Left - fFontSize;
|
||||
continue;
|
||||
end;
|
||||
if mForm.Components[i] is TcxTextEdit then
|
||||
begin
|
||||
if (mForm.Components[i].Tag<999) and not TcxTextEdit(mForm.Components[i]).ParentFont then
|
||||
TcxTextEdit(mForm.Components[i]).ParentFont:=True;
|
||||
continue;
|
||||
end;
|
||||
if (mForm.Components[i] is TcxComboBox) then
|
||||
begin
|
||||
if (mForm.Components[i].Tag<999) and not TcxComboBox(mForm.Components[i]).ParentFont then
|
||||
TcxComboBox(mForm.Components[i]).ParentFont:=True;
|
||||
continue;
|
||||
end;
|
||||
if mForm.Components[i] is TcxButtonEdit then
|
||||
begin
|
||||
if (mForm.Components[i].Tag<999) and not TcxButtonEdit(mForm.Components[i]).ParentFont then
|
||||
TcxButtonEdit(mForm.Components[i]).ParentFont:=True;
|
||||
continue;
|
||||
end;
|
||||
if mForm.Components[i] is TcxdateEdit then
|
||||
begin
|
||||
if mForm.Components[i].Tag<999 then
|
||||
TcxdateEdit(mForm.Components[i]).ParentFont:=True;
|
||||
continue;
|
||||
end;
|
||||
if mForm.Components[i] is TcxTextEdit then
|
||||
begin
|
||||
if mForm.Components[i].Tag<999 then
|
||||
TcxTextEdit(mForm.Components[i]).ParentFont:=True;
|
||||
if mForm.Components[i] is TfrmFrameDateSel then
|
||||
begin
|
||||
TfrmFrameDateSel(mForm.Components[i]).Font.Size:= fFontSize;
|
||||
TfrmFrameDateSel(mForm.Components[i]).cbbType.ParentFont:= true;
|
||||
TfrmFrameDateSel(mForm.Components[i]).BegDate.ParentFont:=true;
|
||||
TfrmFrameDateSel(mForm.Components[i]).endDate.ParentFont:=true;
|
||||
continue;
|
||||
end;
|
||||
if mForm.Components[i] is TcxButtonEdit then
|
||||
begin
|
||||
if mForm.Components[i].Tag<999 then
|
||||
TcxButtonEdit(mForm.Components[i]).ParentFont:=True;
|
||||
continue;
|
||||
end;
|
||||
end;
|
||||
if mForm.Components[i] is TcxMemo then
|
||||
begin
|
||||
if mForm.Components[i].Tag<999 then
|
||||
TcxMemo(mForm.Components[i]).ParentFont:=True;
|
||||
continue;
|
||||
end;
|
||||
if mForm.Components[i] is Tlabel and (mForm.Components[i].Tag=99) then
|
||||
begin
|
||||
Tlabel(mForm.Components[i]).Font.Size:=fFontSize;
|
||||
Tlabel(mForm.Components[i]).Font.Name:=mForm.Font.Name ;
|
||||
continue;
|
||||
end;
|
||||
// Tcxgroup
|
||||
if mForm.Components[i] is TcxgroupBox then
|
||||
begin
|
||||
if mForm.Components[i].Tag<999 then
|
||||
TcxgroupBox(mForm.Components[i]).ParentFont:=True;
|
||||
if mIsCustomBackColor then
|
||||
TcxgroupBox(mForm.Components[i]).Color := clPanelBack;
|
||||
TcxgroupBox(mForm.Components[i]).Ctl3D := mCtl3D;
|
||||
mdesignCode := fFormName + '_' + intTostr(fFormId) + '_' + TcxgroupBox(mForm.Components[i]).name;
|
||||
|
||||
continue;
|
||||
end;
|
||||
|
||||
if mForm.Components[i] is TToolBar then
|
||||
begin
|
||||
if mForm.Components[i].Tag<999 then
|
||||
|
@ -223,6 +243,16 @@ begin
|
|||
|
||||
continue;
|
||||
end;
|
||||
if mForm.Components[i] is TdatetimePicker then
|
||||
begin
|
||||
if TdatetimePicker(mForm.Components[i]).Width <= 90 then
|
||||
TdatetimePicker(mForm.Components[i]).Width := TdatetimePicker(mForm.Components[i]).Width + ffontsize * 2;
|
||||
continue;
|
||||
end;
|
||||
|
||||
|
||||
// end;
|
||||
|
||||
// TcxPageControl
|
||||
if mForm.Components[i] is TcxPageControl then
|
||||
begin
|
||||
|
@ -233,18 +263,7 @@ begin
|
|||
|
||||
continue;
|
||||
end;
|
||||
// Tcxgroup
|
||||
if mForm.Components[i] is TcxgroupBox then
|
||||
begin
|
||||
if mForm.Components[i].Tag<999 then
|
||||
TcxgroupBox(mForm.Components[i]).ParentFont:=True;
|
||||
if mIsCustomBackColor then
|
||||
TcxgroupBox(mForm.Components[i]).Color := clPanelBack;
|
||||
TcxgroupBox(mForm.Components[i]).Ctl3D := mCtl3D;
|
||||
mdesignCode := fFormName + '_' + intTostr(fFormId) + '_' + TcxgroupBox(mForm.Components[i]).name;
|
||||
|
||||
continue;
|
||||
end;
|
||||
if mForm.Components[i] is Tcxtimeedit then
|
||||
begin
|
||||
if mForm.Components[i].Tag<999 then
|
||||
|
@ -305,7 +324,7 @@ begin
|
|||
//
|
||||
|
||||
|
||||
TcxGridDBTableView(TcxGrid(mForm.Components[i]).Views[0]).optionsView.groupByBox := false;
|
||||
// TcxGridDBTableView(TcxGrid(mForm.Components[i]).Views[0]).optionsView.groupByBox := false;
|
||||
// if mIsDrawGridHeader and (TcxGrid(mForm.Components[i]).Tag <> 1) then
|
||||
// begin
|
||||
// TcxGridDBTableView(TcxGrid(mForm.Components[i]).Views[0]).optionsCustomize.columnfiltering := true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user