J
John Rogers
I just found this code and I am eager to get it working to
see if it really works. I am having a few problems with
some lines that are not referencing peoperly. Can someone
show me how to correct these errors.
..Items and .Columns the compiler does not like.
public System.Windows.Forms.ProgressBar ListView_AddProgressBar(ref
System.Windows.Forms.ListView pListView, int ListViewItemIndex, int
ColumnIndex)
{
Rectangle r;
System.Windows.Forms.ProgressBar pb = new
System.Windows.Forms.ProgressBar();
// .Items here
r = pListView.Items(ListViewItemIndex).Bounds();
// .Columns here
r.Width = pListView.Columns(ColumnIndex).Width;
if (ColumnIndex > 0)
{
// .Columns here
r.X = r.X + pListView.Columns(ColumnIndex - 1).Width;
}
pb.Parent = pListView;
pb.SetBounds(r.X, r.Y, r.Width, r.Height);
pb.Visible = true;
return pb;
}
Appreciate it
John-
see if it really works. I am having a few problems with
some lines that are not referencing peoperly. Can someone
show me how to correct these errors.
..Items and .Columns the compiler does not like.
public System.Windows.Forms.ProgressBar ListView_AddProgressBar(ref
System.Windows.Forms.ListView pListView, int ListViewItemIndex, int
ColumnIndex)
{
Rectangle r;
System.Windows.Forms.ProgressBar pb = new
System.Windows.Forms.ProgressBar();
// .Items here
r = pListView.Items(ListViewItemIndex).Bounds();
// .Columns here
r.Width = pListView.Columns(ColumnIndex).Width;
if (ColumnIndex > 0)
{
// .Columns here
r.X = r.X + pListView.Columns(ColumnIndex - 1).Width;
}
pb.Parent = pListView;
pb.SetBounds(r.X, r.Y, r.Width, r.Height);
pb.Visible = true;
return pb;
}
Appreciate it
John-