Hi!
How can I set the red marked borders by code?
[](http://www.logview.info/frage.jpg)
Hi!
How can I set the red marked borders by code?
[](http://www.logview.info/frage.jpg)
Hi !
I use an enhanced labelprinting dialog. I´ve added the two rulers to the wprichtext.
In the Formactivate procedure I tried this:
procedure TLabelDruckenForm.FormActivate(Sender: TObject);
begin
ColCountChange(nil);
WPRichText1.Header.SetPageWH(
WPSuperPrint1.Width,
WPSuperPrint1.Height,
0, 0, 0, 0);
//WPRichText1.ReformatAll;
WPRichText1.Header.LeftMargin := 20;
WPRichText1.Header.RightMargin := 20;
WPRichText1.ReformatAll;
end;
But the result looks like this (new picture):
[](http://www.logview.info/frage.jpg)
Must I change some other values?
Thats basically the code I am using (You can pass the margis to SetPageWH instead of the zeros)
Did you set the WPRuler property in TWPRichText ?
Maybe SuperPrint does not use updated columns values, in this case Width will be wrong.
See the original code:
procedure TWPLabelForm.ColCountChange(Sender: TObject);
begin
if FLocked then exit;
WPSuperPrint1.PageWidth := PageWidth.Value;
WPSuperPrint1.PageHeight := PageHeight.Value;
WPSuperPrint1.Rows := RowCount.IntValue;
WPSuperPrint1.Columns := ColCount.IntValue;
WPSuperPrint1.MarginTop := TopMargin.Value;
WPSuperPrint1.MarginLeft := LeftMargin.Value;
WPSuperPrint1.MarginRight := RightMargin.Value;
WPSuperPrint1.MarginBottom := BottomMargin.Value;
WPSuperPrint1.InbetweenHorz := HorzMargin.Value;
WPSuperPrint1.InbetweenVert := VertMargin.Value;
WPSuperPrint1.LabelStartRow := StartRow.Value;
WPSuperPrint1.LabelStartColumn := StartCol.Value;
WPSuperPrint1.Copies := Copies.Value;
WPRichText1.Header.SetPageWH(
WPSuperPrint1.Width,
WPSuperPrint1.Height,
0, 0, 0, 0);
WPRichText1.ReformatAll;
end;
Hi !
You can pass the margis to SetPageWH instead of the zeros
If set all 0 to 20. But the result is like this:
[](http://www.logview.info/frage.jpg)
Did you set the WPRuler property in TWPRichText ?
Of course.
Maybe SuperPrint does not use updated columns values, in this case Width will be wrong.
And what can I do in this case?
I don't know whats wrong, the label demo does it perfectly. Sometiong got broken during the reconstruction.
Juliuan
Hi Julian!
If I use your Labelprinting demo and this code:
procedure TWPLabelForm.ColCountChange(Sender: TObject);
begin
if FLocked then exit;
WPSuperPrint1.PageWidth := PageWidth.Value;
WPSuperPrint1.PageHeight := PageHeight.Value;
WPSuperPrint1.Rows := RowCount.IntValue;
WPSuperPrint1.Columns := ColCount.IntValue;
WPSuperPrint1.MarginTop := TopMargin.Value;
WPSuperPrint1.MarginLeft := LeftMargin.Value;
WPSuperPrint1.MarginRight := RightMargin.Value;
WPSuperPrint1.MarginBottom := BottomMargin.Value;
WPSuperPrint1.InbetweenHorz := HorzMargin.Value;
WPSuperPrint1.InbetweenVert := VertMargin.Value;
WPSuperPrint1.LabelStartRow := StartRow.Value;
WPSuperPrint1.LabelStartColumn := StartCol.Value;
WPSuperPrint1.Copies := Copies.Value;
WPRichText1.Header.SetPageWH(
WPSuperPrint1.Width,
WPSuperPrint1.Height,
100, 100, 100, 100);
WPRichText1.ReformatAll;
end;
I got this result:
[](http://www.logview.info/frage.jpg)
So I don´t really works for me. No matter which label format is selected.
Maybe it is simply so that the editor does not have the focus
WPRichText1.SetFocusvalues(true)