I am using CheckListbox to get 3 Fields(String) value of a tble.
i should show it on the checklist box as 3 column with relevent space one after
one.but when i add data to the checklistbox the thirdstring value column not not
aligned even i use a function to adjust the space.
now the result is showing like this:
code Benefit Type
-------------------------------------
BEN-0001 BASIC SALARY AMOUNT
BEN-0002 HOUSING LTB-BEN
BEN-0003 OT AMOUNT
BEN-0004 X Allowance EXPENSE
i want to show the result like this:
BEN-0001 BASIC SALARY AMOUNT
BEN-0002 HOUSING LTB-BEN
BEN-0003 OT AMOUNT
BEN-0004 X Allowance EXPENSE
here is my code:
checkListBox.Items.Add(' '+FindField('bnfCod').AsString+ ' '+
AddSpace(FindField('bnfDsc').AsString,40)+FindField('Type').Asstring);
function TfrmSelBnf.AddSpace(Value:string;MaxLength:integer): String;
var I:integer;S:String;
begin
if length(Value)>=MaxLength then
result:=Value
else
for I := 1 to MaxLength-length(Value) do
S := S+' ';
Result:=Value+S;
end;
Thanks in advance.
Biju.
[Non-text portions of this message have been removed]
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/