如何在FMX网格中使用右至左语言

发布于 2025-01-29 07:58:09 字数 69 浏览 3 评论 0原文

FMX创建支持Bidimode和Right Toleft语言的网格的最佳方法是什么 我尝试过FMXRTL,但有很多错误 谢谢

What is the best way in FMX to create a grid that supports bidimode and righttoleft languages
I have tried fmxrtl but it has many errors
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

楠木可依 2025-02-05 07:58:09

您的应用仅适用于Windows吗? 如果是,我使用函数来检测它是否是BIDI字符串,然后使用ttextlayout 我的测试在这里
使用skia4delphi(xe7+)

否则,尝试 Android Little App screenshot

procedure TForm1.Grid1DrawColumnCell(Sender: TObject; const Canvas: TCanvas;
  const Column: TColumn; const Bounds: TRectF; const Row: Integer;
  const Value: TValue; const State: TGridDrawStates);
begin
if (Column.Index=1) AND (Row>=1)
then begin
      Canvas.Fill.Color:=TAlphaColors.Red;
      Canvas.FillText(Bounds,Value.ToString,false,1,[TFillTextFlag.RightToLeft],TTextAlign.Leading);
end
else Column.DefaultDrawCell(Canvas,bounds,row,value,state);
end;

Is your app only for Windows ? If yes, I use a function to detect if it's a Bidi string and then use TTextLayout my test here
Else, try to use SKIA4Delphi (XE7+)Supporting right to left

I test an Android little app ScreenShot

procedure TForm1.Grid1DrawColumnCell(Sender: TObject; const Canvas: TCanvas;
  const Column: TColumn; const Bounds: TRectF; const Row: Integer;
  const Value: TValue; const State: TGridDrawStates);
begin
if (Column.Index=1) AND (Row>=1)
then begin
      Canvas.Fill.Color:=TAlphaColors.Red;
      Canvas.FillText(Bounds,Value.ToString,false,1,[TFillTextFlag.RightToLeft],TTextAlign.Leading);
end
else Column.DefaultDrawCell(Canvas,bounds,row,value,state);
end;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文