Board index » delphi » Tlistview vslist viewstyle items caption width not shown completely

Tlistview vslist viewstyle items caption width not shown completely

I have attached a demo program with the source here:-

 type
  TForm1 = class(TForm)
   ListView1: TListView;
    ListView2: TListView;
    ListView3: TListView;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  end;

var
  Form1: TForm1;

implementation

procedure TForm1.FormCreate(Sender: TObject);
var i:integer; J:Tlistitem;
begin
for i:=1 to 12 do
begin
  J:=Listview2.items.add;
  J.caption:='These 12 items are created WHEN Formcreate';
end;
end;
I have attached the source code of the demo program here:=

procedure TForm1.Button1Click(Sender: TObject);
var i:integer; J:Tlistitem;
begin
for i:=1 to 12 do
begin
J:=Listview3.items.add;
J.caption:='These 12 items are created WHEN click button1';
end;
end;

end.

The question is why I cant show all the width of the caption when I
click the button????  How to adjust the width of the item caption
shown in the Tlistview view in the "vsList' viewstyle?

Hope any one can help because I get stuck in this question for a long
time.

Thank very much

KC out

 

Re:Tlistview vslist viewstyle items caption width not shown completely


Because of the possibility of a virus, as well as the Borland Newsgroup
Guideline quoted below, I've cancelled the message with your EXE file.

12) Do not post messages with large attachments.

Large files fill up our servers more quickly, and are an annoyance for
people who download and read the newsgroups off-line. If you need help
with a program, briefly describe your problem and include a small code
snippet that illustrates the problem. Post a small demonstration
application or large blocks of code only when requested to do so by
TeamB or Borland employees.

Other Threads