以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  扫码结果左对齐  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=137235)

--  作者:nxdx112
--  发布时间:2019/7/1 15:42:00
--  扫码结果左对齐
这是别人的二维码设置代码,现在想让扫码显示为左对齐,而非居中显示,怎么设置?
If CurrentTable.ShowCheckBox = False Then
    messagebox.show("请先点击\'打印前置\'按钮,在想要打印二维码的行的复选框里打√,谢谢!","友情提示")
Else
    Dim doc As New PrintDoc
    Dim Bar As New BarCodeBuilder
    Dim rt As new prt.RenderText
    Bar.Symbology = Barpro.Symbology.QRCode
    Bar.BarRatio = 0.3
    Bar.BarWidth = 1
    Bar.BarHeight = 1
    Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
    For Each r As Row In CurrentTable.GetCheckedRows
        Dim ra As New prt.RenderArea
        ra.SplitHorzBehavior = prt.SplitBehaviorEnum.Never \'禁止水平分割
        ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never \'禁止垂直分割
        ra.width = 40
        ra.height = 40

        Dim i As Integer = 0
        Dim temp As String = ""
        For Each c As Col In CurrentTable.cols
            temp = temp & c.name & ":"  & r(i) & vbcrlf 
            i = i + 1
        Next
        bar.Code = temp.Substring(0,temp.length-1)

        Dim rg1 As New prt.RenderGraphics()
        rg1.Graphics.DrawImage(bar.GetImage,0,0,120,120)
        rg1.Graphics.DrawImage(getImage("archives.ico"),45,45,30,30)
        ra.Children.Add(rg1)

        rt = New prt.RenderText
        rt.Text = "姓名:" & r("姓名")
        rt.Width = 50
        rt.Height = 5
        rt.Style.TextAlignHorz = prt.AlignHorzEnum.left \'水平居中
        ra.Children.Add(rt) \'添加到容器中

        Doc.Body.Children.Add(ra)
    Next
    Doc.Preview()

------------
图片点击可在新窗口打开查看此主题相关图片如下:微信图片_20190701154003.png
图片点击可在新窗口打开查看

[此贴子已经被作者于2019/7/1 15:42:21编辑过]

--  作者:有点甜
--  发布时间:2019/7/1 16:03:00
--  

 

测试了一下,没办法。这个无法控制