phoenix_title wx.PrintDialogData

This class holds information related to the visual characteristics of wx.PrintDialog.

It contains a wx.PrintData object with underlying printing settings.


class_hierarchy Class Hierarchy

Inheritance diagram for class PrintDialogData:

method_summary Methods Summary

__init__

Default constructor.

EnableCurrentPage

Allows or disallows selecting printing the “Current Page” in the dialog.

EnableHelp

Enables or disables the “Help” button.

EnablePageNumbers

Enables or disables the “Page numbers” controls.

EnablePrintToFile

Enables or disables the “Print to file” checkbox.

EnableSelection

Enables or disables the “Selection” radio button.

GetAllPages

Returns True if the user requested that all pages be printed.

GetCollate

Returns True if the user requested that the document(s) be collated.

GetCurrentPage

Returns True if the user requested that the current page be printed.

GetFromPage

Returns the from page number, as entered by the user.

GetMaxPage

Returns the maximum page number.

GetMaxPageRanges

Returns the maximum number of page ranges that the user can specify.

GetMinPage

Returns the minimum page number.

GetNoCopies

Returns the number of copies requested by the user.

GetPageRanges

Returns the page ranges to print.

GetPrintData

Returns a reference to the internal wx.PrintData object.

GetPrintToFile

Returns True if the user has selected printing to a file.

GetSelection

Returns True if the user requested that the selection be printed (where “selection” is a concept specific to the application).

GetSpecifiedPages

Returns True if the user requested printing only the specified pages.

GetToPage

Returns the “print to” page number, as entered by the user.

IsOk

Returns True if the print data is valid for using in print dialogs.

SetAllPages

Selects the “All pages” radio button.

SetCollate

Sets the “Collate” checkbox to True or False.

SetCurrentPage

Selects the “Current Page” radio button when the dialog is initially shown.

SetFromPage

Sets the from page number.

SetMaxPage

Sets the maximum page number.

SetMaxPageRanges

Sets the maximum number of page ranges that the user can specify.

SetMinPage

Sets the minimum page number.

SetNoCopies

Sets the default number of copies the user has requested to be printed out.

SetPrintData

Sets the internal wx.PrintData.

SetPrintToFile

Sets the “Print to file” checkbox to True or False.

SetSelection

Selects the “Selection” radio button.

SetToPage

Sets the “print to” page number.

__bool__

__nonzero__


property_summary Properties Summary

AllPages

See GetAllPages and SetAllPages

Collate

See GetCollate and SetCollate

CurrentPage

See GetCurrentPage and SetCurrentPage

FromPage

See GetFromPage and SetFromPage

MaxPage

See GetMaxPage and SetMaxPage

MaxPageRanges

See GetMaxPageRanges and SetMaxPageRanges

MinPage

See GetMinPage and SetMinPage

NoCopies

See GetNoCopies and SetNoCopies

PageRanges

See GetPageRanges

PrintData

See GetPrintData and SetPrintData

PrintToFile

See GetPrintToFile and SetPrintToFile

Selection

See GetSelection and SetSelection

SpecifiedPages

See GetSpecifiedPages

ToPage

See GetToPage and SetToPage


api Class API

class wx.PrintDialogData(Object)

Possible constructors:

PrintDialogData() -> None

PrintDialogData(dialogData) -> None

PrintDialogData(printData) -> None

This class holds information related to the visual characteristics of PrintDialog.


Methods

__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Default constructor.

Return type:

None



__init__ (self, dialogData)

Copy constructor.

Parameters:

dialogData (wx.PrintDialogData)

Return type:

None



__init__ (self, printData)

Construct an object from a print dialog data object.

Parameters:

printData (wx.PrintData)

Return type:

None





EnableCurrentPage(self, flag)

Allows or disallows selecting printing the “Current Page” in the dialog.

This currently only has an effect under MSW, where the native dialog enables the “Current Page” radio button if this function is called to allow the user to print the current page only.

Parameters:

flag (bool)

Return type:

None

Added in version 4.3/wxWidgets-3.3.0.



EnableHelp(self, flag)

Enables or disables the “Help” button.

Parameters:

flag (bool)

Return type:

None



EnablePageNumbers(self, flag)

Enables or disables the “Page numbers” controls.

Parameters:

flag (bool)

Return type:

None



EnablePrintToFile(self, flag)

Enables or disables the “Print to file” checkbox.

Parameters:

flag (bool)

Return type:

None



EnableSelection(self, flag)

Enables or disables the “Selection” radio button.

Parameters:

flag (bool)

Return type:

None



GetAllPages(self)

Returns True if the user requested that all pages be printed.

Return type:

bool



GetCollate(self)

Returns True if the user requested that the document(s) be collated.

Return type:

bool



GetCurrentPage(self)

Returns True if the user requested that the current page be printed.

Note that the “current page” is defined by the application.

It only makes sense to call this function if EnableCurrentPage had been called before, otherwise it always returns False.

Return type:

bool

Added in version 4.3/wxWidgets-3.3.0.



GetFromPage(self)

Returns the from page number, as entered by the user.

This function can’t be used if multiple page ranges were specified, use GetPageRanges instead.

Return type:

int



GetMaxPage(self)

Returns the maximum page number.

Return type:

int



GetMaxPageRanges(self)

Returns the maximum number of page ranges that the user can specify.

Return type:

int

Added in version 4.3/wxWidgets-3.3.0.

See also

SetMaxRanges()



GetMinPage(self)

Returns the minimum page number.

Return type:

int



GetNoCopies(self)

Returns the number of copies requested by the user.

Return type:

int



GetPageRanges(self)

Returns the page ranges to print.

This vector contains the page ranges to be printed. If it is empty, all pages are printed, otherwise only the pages in the specified ranges are.

Return type:

PrintPageRanges

Added in version 4.3/wxWidgets-3.3.0.

See also

SetPageRanges



GetPrintData(self)

Returns a reference to the internal wx.PrintData object.

Return type:

wx.PrintData



GetPrintToFile(self)

Returns True if the user has selected printing to a file.

Return type:

bool



GetSelection(self)

Returns True if the user requested that the selection be printed (where “selection” is a concept specific to the application).

Return type:

bool



GetSpecifiedPages(self)

Returns True if the user requested printing only the specified pages.

The pages to print can be retrieved using GetPageRanges .

Return type:

bool

Added in version 4.3/wxWidgets-3.3.0.



GetToPage(self)

Returns the “print to” page number, as entered by the user.

This function can’t be used if multiple page ranges were specified, use GetPageRanges instead.

Return type:

int



IsOk(self)

Returns True if the print data is valid for using in print dialogs.

This can return False on Windows if the current printer is not set, for example. On all other platforms, it returns True.

Return type:

bool



SetAllPages(self, flag=True)

Selects the “All pages” radio button.

When called with True value, enables printing all pages. This is the default behaviour.

If flag is False, this function doesn’t do anything unless it had been called with True value before and in this case it switches to printing the selected pages only (see GetSpecifiedPages ).

Parameters:

flag (bool)

Return type:

None



SetCollate(self, flag)

Sets the “Collate” checkbox to True or False.

Parameters:

flag (bool)

Return type:

None



SetCurrentPage(self, flag=True)

Selects the “Current Page” radio button when the dialog is initially shown.

This function can only be called when EnableCurrentPage is used as well.

If flag is False, this function doesn’t do anything unless it had been called with True value before and in this case it switches to printing the selected pages only (see GetSpecifiedPages ).

Parameters:

flag (bool)

Return type:

None

Added in version 4.3/wxWidgets-3.3.0.

See also

GetCurrentPage



SetFromPage(self, page)

Sets the from page number.

Together with SetToPage , this function can be used to define a single range of pages to print. If you need to specify multiple ranges, use SetPageRanges instead.

Parameters:

page (int)

Return type:

None

Note

If SetPageRanges was used to specify multiple ranges, this function cannot be used as there is no single “from” page to set.



SetMaxPage(self, page)

Sets the maximum page number.

Parameters:

page (int)

Return type:

None



SetMaxPageRanges(self, maxRanges)

Sets the maximum number of page ranges that the user can specify.

This value is used as a limit for the number of page ranges that can be used in the print dialog. The default value is 64.

Currently this is only used in wxMSW.

Parameters:

maxRanges (int)

Return type:

None

Added in version 4.3/wxWidgets-3.3.0.



SetMinPage(self, page)

Sets the minimum page number.

Parameters:

page (int)

Return type:

None



SetNoCopies(self, n)

Sets the default number of copies the user has requested to be printed out.

Parameters:

n (int)

Return type:

None



SetPrintData(self, printData)

Sets the internal wx.PrintData.

Parameters:

printData (wx.PrintData)

Return type:

None



SetPrintToFile(self, flag)

Sets the “Print to file” checkbox to True or False.

Parameters:

flag (bool)

Return type:

None



SetSelection(self, flag=True)

Selects the “Selection” radio button.

The effect of printing the selection depends on how the application implements this command, if at all.

This function should only be called when EnableSelection is used as well.

If flag is False, this function doesn’t do anything unless it had been called with True value before and in this case it switches to printing the selected pages only (see GetSpecifiedPages ).

Parameters:

flag (bool)

Return type:

None



SetToPage(self, page)

Sets the “print to” page number.

Together with SetFromPage , this function can be used to define a single range of pages to print. If you need to specify multiple ranges, use SetPageRanges instead.

Parameters:

page (int)

Return type:

None

Note

If SetPageRanges was used to specify multiple ranges, this function cannot be used as there is no single “to” page to set.



__bool__(self)
Return type:

bool



__nonzero__(self)
Return type:

bool


Properties

AllPages

See GetAllPages and SetAllPages



Collate

See GetCollate and SetCollate



CurrentPage

See GetCurrentPage and SetCurrentPage



FromPage

See GetFromPage and SetFromPage



MaxPage

See GetMaxPage and SetMaxPage



MaxPageRanges

See GetMaxPageRanges and SetMaxPageRanges



MinPage

See GetMinPage and SetMinPage



NoCopies

See GetNoCopies and SetNoCopies



PageRanges

See GetPageRanges



PrintData

See GetPrintData and SetPrintData



PrintToFile

See GetPrintToFile and SetPrintToFile



Selection

See GetSelection and SetSelection



SpecifiedPages

See GetSpecifiedPages



ToPage

See GetToPage and SetToPage