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