in wxMaxima the following code pops up a printer dialog. Unfortunately in wxWidgets 3.1.0 the paper size selection is grayed out leaving the users with only A4 as a Choice.
Is there any way to re-enable it?
The application itself would be able to print on any arbitrary page size.
Thanks a lot,
and kind regards,
Gunter.
Code: Select all
{
wxPrintDialogData printDialogData;
if (m_printData)
printDialogData.SetPrintData(*m_printData);
wxPrinter printer(&printDialogData);
wxString title(_("wxMaxima document")), suffix;
if (m_console->m_currentFile.Length())
{
wxString suffix;
wxFileName::SplitPath(m_console->m_currentFile, NULL, NULL, &title, &suffix);
title << wxT(".") << suffix;
}
MathPrintout printout(title);
MathCell* copy = m_console->CopyTree();
printout.SetData(copy);
if (printer.Print(this, &printout, true))
{
if (m_printData != NULL)
delete m_printData;
m_printData = new wxPrintData(printer.GetPrintDialogData().GetPrintData());
}
break;
}