Dialog Events.frx 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Report ScriptLanguage="CSharp" ReportInfo.Description="This report demonstrates how to handle the dialog controls' events to modify the state of other controls. " ReportInfo.Created="05/29/2008 20:21:07" ReportInfo.Modified="03/30/2023 02:34:13" ReportInfo.CreatorVersion="1.0.0.0">
  3. <ScriptText>using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Windows.Forms;
  8. using System.Drawing;
  9. using System.Data;
  10. using FastReport;
  11. using FastReport.Data;
  12. using FastReport.Dialog;
  13. using FastReport.Barcode;
  14. using FastReport.Table;
  15. using FastReport.Utils;
  16. namespace FastReport
  17. {
  18. public class ReportScript
  19. {
  20. private void CheckBox1_CheckedChanged(object sender, EventArgs e)
  21. {
  22. TextBox1.Enabled = CheckBox1.Checked;
  23. }
  24. }
  25. }
  26. </ScriptText>
  27. <Dictionary/>
  28. <DialogPage Name="Form1" AcceptButton="btnOk" CancelButton="btnCancel" AutoScaleDimensions="192, 192" Font="Segoe UI, 9pt" LoadEvent="" ClientSize="634, 322">
  29. <ButtonControl Name="btnCancel" Left="462" Top="254" Width="150" Height="46" Anchor="Bottom, Right" Font="Segoe UI, 9pt" TabIndex="0" Text="Cancel" DialogResult="Cancel"/>
  30. <ButtonControl Name="btnOk" Left="300" Top="254" Width="150" Height="46" Anchor="Bottom, Right" Font="Segoe UI, 9pt" TabIndex="1" Text="OK" DialogResult="OK"/>
  31. <CheckBoxControl Name="CheckBox1" Left="24" Top="36" Width="558" Font="Segoe UI, 9pt" TabIndex="2" Text="Click this checkbox to enable/disable the TextBox" ClickEvent="" AutoFilter="false" DetailControl="TextBox1" Checked="true" CheckState="Checked" CheckedChangedEvent="CheckBox1_CheckedChanged"/>
  32. <TextBoxControl Name="TextBox1" Left="24" Top="84" Width="584" Height="40" BackColor="255, 255, 255" Font="Segoe UI, 9pt" TabIndex="3" Text="TextBox1"/>
  33. </DialogPage>
  34. <ReportPage Name="Page1" Watermark.Font="Arial, 60pt">
  35. <DataBand Name="Data1" Width="718.2" Height="75.6">
  36. <TextObject Name="Text1" Left="9.45" Top="9.45" Width="387.45" Height="56.7" Text="CheckBox checked: [CheckBox1.Checked]&#13;&#10;TextBox enabled: [TextBox1.Enabled]" Font="Segoe UI, 14pt"/>
  37. </DataBand>
  38. <PageFooterBand Name="PageFooter1" Top="77.6" Width="718.2" Height="28.35" Fill.Color="WhiteSmoke">
  39. <TextObject Name="Text12" Left="9.45" Width="217.35" Height="28.35" Cursor="Hand" Hyperlink.Value="https://www.fast-report.com/en/product/fast-report-net/" Text="Generated by FastReport" VertAlign="Center" Font="Segoe UI, 9pt, style=Underline" TextFill.Color="Blue"/>
  40. </PageFooterBand>
  41. </ReportPage>
  42. </Report>