Satimage Previous | Next
PDF Holder
Home Documentation Smile Custom GUI Developing your own custom dialog The controls PDF Holder  
control kind: 256

Event(s): clicking sends click in to the control's container.
The contextual menu displays two commands: Import PDF and Import PDF full scale. Both commands let you choose a PDF file and display it in the control. Import PDF scales (if required) the graphic so as to fit the sizes of the control. Import PDF full scale rescales the control so as to fit the sizes of the PDF.

Instead of an existing PDF document, you can have the control display a PDF graphic that you create programatically, on the fly or once for all when you create the dialog. How to generate a PDF record by script is described in other pages. Basically, you write a program with the graphic functions provided in Smile's graphic library (such as LineTo or CirclePath), encapsulating them with BeginPDF [...] EndPDF. EndPDF() is the command which returns the PDF data.

Finally you set either the back pdf or the front pdf property of the PDF holder to the returned PDF data, and you force a graphic update by draw the_dlog where the_dlog is a reference to the dialog window which contains the PDF holder.

The script of the PDF Holder provided in the Controls palette contains a routine which generates a (random) colored pattern in the control.
Copyright ©2008 Paris, Satimage