ChinaCock界面控件介绍-TCCBarcodeCreator

条码生成器,可以生成各种条码,包括二维码。这是一个不可视控件。用起来依旧简单。

属性说明:

BarCodeColor:生成条码的颜色

BarcodeFormat:生成条码的类型,支持的条码类型:

BottomText:底部的文字

BottomTextColor:底部文字的颜色

BottomTextLinePaddiung:

BottomTextPadding:

BottomTextSize:

Code:条码的内容

ImageHeight:

ImageWidth:

IncludeLogo:

LogoBitmap:

ShowBottomText:是否显示底部文字

下面是生成一个二维码的代码:

BarcodeCreator.BarcodeFormat:=TCCBarcodeFormat.QR_CODE;
BarcodeCreator.Code:=edtCode.Text;
BarcodeCreator.BarcodeColor:=cbxBarcodeColor.Color;
BarcodeCreator.ImageWidth:=300;
BarcodeCreator.ImageHeight:=300;
BarcodeCreator.LogoBitmap:=self.LogoImage.Bitmap;
BarcodeCreator.IncludeLogo:=self.chxIncludeLogo.IsChecked;
BarcodeCreator.ShowBottomText:=chxShowBottomTex.IsChecked;
BarcodeCreator.BottomText:=self.edtBottomText.Text;
BarcodeCreator.BottomTextColor:=TAlphaColors.Red;
BarcodeCreator.BottomTextSize:=20;
BarcodeCreator.BottomTextPadding:=20;
BarcodeCreator.BottomTextlinePadding:=10;

self.BarcodeImage.Bitmap:=BarcodeCreator.CreateBarcode;//生成二维码图片

简单的都没什么可写的了。

猜你喜欢

转载自www.cnblogs.com/kinglandsoft/p/10597933.html