gx198727 2019-09-09 16:45 采纳率: 33.3%
浏览 569
已结题

Devexpress 18 gridcontrol 打印功能

写完以下代码点按钮没反应 是为什么?大神帮啊
private void simpleButton1_Click(object sender, EventArgs e)
{

        PrintableComponentLink link = new PrintableComponentLink(new PrintingSystem());
        link.Component = Dgv;
        link.Landscape = true;
        link.PaperKind = System.Drawing.Printing.PaperKind.A3;
        link.CreateMarginalHeaderArea += new CreateAreaEventHandler(Link_CreateMarginalHeaderArea);
        link.CreateDocument();
        link.ShowPreview();
    }
    private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
    {
        string title = string.Format("压力灭菌监测记录");
        PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.None, title, Color.Black,
           new RectangleF(0, 0, 100, 21), BorderSide.None);

        brick.LineAlignment = BrickAlignment.Center;
        brick.Alignment = BrickAlignment.Center;
        brick.AutoWidth = true;
        brick.Font = new System.Drawing.Font("宋体", 11f, FontStyle.Bold);


    }
  • 写回答

2条回答 默认 最新

  • threenewbee 2019-09-09 18:40
    关注

    直接在开头写一个 MessageBox.Show("ok")
    如果不能弹框,说明事件没有触发或者没有关联正确

    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料