GetCharsetValues (Delphi)
Description
The following example uses the GetCharsetValues procedure to fill a string list with the names of all the available character set constants. This string list can then be used to allow you to select a character set.
Code
{ Here is the callback that adds the character sets to the string list}
var
CharSetList : TStringList;
procedure TForm1.AddCharacterSet(const S: string);
begin
CharSetList.Add(S);
end;
{ Here is the code that creates the string list, fills it, and sorts the character set names }
procedure TForm1.Button1Click(Sender: TObject);
begin
CharSetList := TStringList.Create;
Graphics.GetCharsetValues(AddCharacterSet);
CharSetList.Sort;
ListBox1.Items := CharSetList;
CharSetList.Destroy;
end;
Uses
- Vcl.Graphics.GetCharsetValues ( fr | de | ja )