Profile Picture

Enabling of Print Range groupbox in NPrintManager dialog

Posted By Lee Harris 12 Years Ago

Enabling of Print Range groupbox in NPrintManager dialog

Author
Message
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Lee,

In order to achieve this you need to customize the settings of the print dialog - the following code snippet shows how to create your own print dialog and update the printer manager settings:

   NPrintManager pm = new NPrintManager(nChartControl1.Document);

   using (PrintDialog dlg = new PrintDialog())
   {
    dlg.UseEXDialog = true;

    PrinterSettings settings = (PrinterSettings)pm.PrinterSettings.Clone();
    settings.MinimumPage = 1;
    settings.MaximumPage = 10;
    settings.FromPage = 1;
    settings.ToPage = 1;
    settings.Copies = 2;
    settings.PrintRange = PrintRange.Selection;

    dlg.AllowSomePages = true;
    dlg.PrinterSettings = settings;

    if (dlg.ShowDialog() == DialogResult.OK)
    {
     pm.PageSettings.PrinterSettings = dlg.PrinterSettings;
     pm.PrinterSettings = dlg.PrinterSettings;
    }
   }

Hope this helps - let us know if you meet any problems...



Best Regards,
Nevron Support Team



Lee Harris
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 7, Visits: 12
I'm successfully printing multiple charts on a single page. What I'd like to add is the ability for the user to selecting a specific chart, and then when they click Print... to have the Print Range groupbox in the dialog that appears from the pm.ShowDialog() have both 'All' and 'Selection' enabled so the user can decide whether to print just the selected chart, or all charts.

Is there a way to affect the enabling of the groupbox and its radiobuttons?

Thanks,
Lee



Similar Topics


Reading This Topic