diff options
Diffstat (limited to 'uidesigner/vfdutils.pas')
-rw-r--r-- | uidesigner/vfdutils.pas | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/uidesigner/vfdutils.pas b/uidesigner/vfdutils.pas index 14b1c561..1fef3792 100644 --- a/uidesigner/vfdutils.pas +++ b/uidesigner/vfdutils.pas @@ -34,11 +34,22 @@ uses procedure SetWidgetText(wg: TfpgWidget; txt: string); -function GetWidgetText(wg: TfpgWidget; out txt: string): boolean; +function GetWidgetText(wg: TfpgWidget; out txt: string): boolean; +{ generates a string based on Indentation Style specified in UI Designer } +function Ind(const ACount: integer): string; implementation +uses + fpg_base, + fpg_iniutils, + strutils; + +var + IndentCharacters: array[0..1] of TfpgString = (' ', #9); + + procedure SetWidgetText(wg: TfpgWidget; txt: string); begin if wg is TfpgForm then @@ -77,6 +88,10 @@ begin end; end; +function Ind(const ACount: integer): string; +begin + Result := DupeString(IndentCharacters[gINI.ReadInteger('Options', 'IndentationType', 0)], ACount); +end; end. |