Re: Setting margins for printing

heeb@oberon.ch
Fri, 30 Aug 1996 11:45:42 +0200

> I am currently having problems setting the margins for printing in the
> 1.2 Windows version of Oberon/F.
>
> For documents on disk, altering the settings with "File ... Page Setup
> .." and saving is sufficient.
>
> However, When I create a new view programmatically (a type of ObxTwins,
> actually) the page margins default to 2.0 cm each.
>
> Does anyone know how to change these settings programmatically. I have
> already tried simulating a call to the "Page Setup" dialog, but without
> success.
>
> Thanks,
>
> Don
>

try this:

VAR v: Views.View; d: Documents.Document;

v := NewMyView(...);
d := Documents.dir.New(v, w, h);
d.SetPage(w, h, l, t, r, b, decorate);
(* w, h: page size, l, t, r, b: content on page *)
Views.OpenView(d); (* instead of Views.OpenView(v) *)

- Beat Heeb

====================================================================
Beat Heeb Oberon microsystems, Inc.
heeb@oberon.ch Technoparkstrasse 1
voice ++41-1-445-1751 CH-8005 Zurich
fax ++41-1-445-1752 http://www.oberon.ch/customers/omi
====================================================================

BooksJournal