- Fixed string type in TfrmAccountControl

This commit is contained in:
Andreas Schneider 2009-12-20 15:49:19 +01:00
parent 158403e41a
commit ee9a44219f
2 changed files with 414 additions and 415 deletions

View File

@ -15,7 +15,7 @@ object frmAccountControl: TfrmAccountControl
OnDestroy = FormDestroy
OnShow = FormShow
Position = poOwnerFormCenter
LCLVersion = '0.9.27'
LCLVersion = '0.9.29'
object tbMain: TToolBar
Left = 0
Height = 26
@ -95,9 +95,10 @@ object frmAccountControl: TfrmAccountControl
Text = 'Accesslevel'
Width = 100
end>
Header.DefaultHeight = 17
Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.Style = hsPlates
Header.Style = hsFlatButtons
Images = ilAccesslevel
TabOrder = 1
TreeOptions.AutoOptions = [toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
@ -110,7 +111,6 @@ object frmAccountControl: TfrmAccountControl
OnGetImageIndex = vstAccountsGetImageIndex
end
object ilToolbar: TImageList
Masked = False
left = 144
Bitmap = {
4C69040000001000000010000000000000000000000000000000000000000000
@ -245,7 +245,6 @@ object frmAccountControl: TfrmAccountControl
}
end
object ilAccesslevel: TImageList
Masked = False
left = 176
Bitmap = {
4C69040000001000000010000000000000000000000000000000000000000000

View File

@ -61,7 +61,7 @@ type
Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex;
var Ghosted: Boolean; var ImageIndex: Integer);
procedure vstAccountsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String);
Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);
protected
procedure OnModifyUserResponse(ABuffer: TEnhancedMemoryStream);
procedure OnDeleteUserResponse(ABuffer: TEnhancedMemoryStream);
@ -279,14 +279,14 @@ end;
procedure TfrmAccountControl.vstAccountsGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: UTF8String);
var CellText: String);
var
accountInfo: PAccountInfo;
begin
accountInfo := Sender.GetNodeData(Node);
case Column of
1: CellText := UTF8Encode(accountInfo^.Username);
2: CellText := UTF8Encode(GetAccessLevelString(accountInfo^.AccessLevel));
1: CellText := accountInfo^.Username;
2: CellText := GetAccessLevelString(accountInfo^.AccessLevel);
else
CellText := '';
end;