是VclStyle Bug吗?T ^ TI试图找到BugFix列表(http://edn.embarcadero.com/article/42090/),但我不能
ProgressBar不起作用
抱歉.我的英语不好 :(
我试图为TLinkLabel应用VCLStyle.
可悲的是,我无法显示下划线(标签的标签)
TLinkLabel.Caption := 'Sma<a>pl</a>e';
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?
要解决这个问题,但是这个"Sample"可能不会出现标签

procedure TgLinkLabelHook.Paint(Canvas: TCanvas);
var
LDetails: TThemedElementDetails;
ParseStr: String;
DrawRect: TRect;
DC: HDC;
TextSize: TSize;
SaveFont: HFont;
ThemeTextColor: TColor;
begin
ParseStr := ParseLinks;
LDetails := StyleServices.GetElementDetails(tbPushButtonPressed);
DC := GetDC(0);
try
SaveFont := SelectObject(DC, TLinkLabel(Control).Font.Handle);
try
GetTextExtentPoint32(DC, PWideChar(ParseStr), Length(ParseStr), TextSize);
finally
SelectObject(DC, SaveFont);
end;
finally
ReleaseDC(0, DC);
end;
Canvas.Font := TLinkLabel(Control).Font;
Canvas.Font.Style := Canvas.Font.Style + [fsUnderline];
Canvas.Font.Size := TLinkLabel(Control).Font.Size;
if StyleServices.GetElementColor(LDetails, ecBodyTextColor, ThemeTextColor) then
Canvas.Font.Color := ThemeTextColor;
// DrawRect := Rect(0, 0, TextSize.cx, TextSize.cy);
DrawRect …Run Code Online (Sandbox Code Playgroud) 我尝试使用 Delphi XE3 插入 SQLite 中的 blob 字段。
我一直像这样使用 TDBXCommand 和 TSQLConnection 。但 blob 字段未插入,甚至我无法从查询中获得任何结果
procedure TDBXCommandHelper.Init(const AQry: String);
begin
Parameters.ClearParameters;
Close;
Prepare;
Text := AQry;
end;
procedure dmDB.InsertPicture;
const
QRY = 'INSERT INTO Memo(Picture) VALUES(?)';
var
LTransaction: TDBXTransaction;
LBlob: TDBXParameter;
LStream: TFileStream;
begin
LTransaction := FDBCon.BeginTransaction;
LStream := TFileStream.Create('d:\sample.bmp', fmOpenRead);
LBlob := TDBXParameter.Create;
try
try
FDBXCmd := FDBCon.DBXConnection.CreateCommand;
FDBXCmd.CommandType := TDBXCommandTypes.DbxSQL;
FDBXCmd.Init(QRY);
LBlob.DataType := TDBXDataTypes.BlobType;
LBlob.SubType := TDBXSubDataTypes.BinarySubType;
LBlob.Value.SetStream(LStream, False);
FDBXCmd.Parameters.AddParameter(LBlob);
FDBXCmd.ExecuteUpdate;
except
on E: Exception do
FDBCon.RollbackFreeAndNil(LTransaction);
end; …Run Code Online (Sandbox Code Playgroud)