(Delphi) 是否可以将标签更改为 .html 文件中的内容?
(Delphi) Is it possible to change a label to whats in a .html file?
是否可以将标签标题更改为 .html
文件中的内容?假设 .html
文件中包含 1.0
。我可以让 Label 检索它并将其 Caption
更改为该值吗?
例如。 lbl1.caption := http://www.example.com/example.html;
可以这样做吗?
TLabel
无法为您加载内容,无论是来自文件还是远程 URL。您必须自己编写代码来自己检索内容,然后才能将其分配给TLabel
。例如:
// using the Indy TIdHTTP component...
lbl1.Caption := IdHTTP1.Get('http://www.example.com/example.html');
是否可以将标签标题更改为 .html
文件中的内容?假设 .html
文件中包含 1.0
。我可以让 Label 检索它并将其 Caption
更改为该值吗?
例如。 lbl1.caption := http://www.example.com/example.html;
可以这样做吗?
TLabel
无法为您加载内容,无论是来自文件还是远程 URL。您必须自己编写代码来自己检索内容,然后才能将其分配给TLabel
。例如:
// using the Indy TIdHTTP component...
lbl1.Caption := IdHTTP1.Get('http://www.example.com/example.html');