Column Widths of da...
Clear all

Column Widths of data view


Topic starter

Dear all,

I have problems with setting the colwidths in advance.

Below you will find my code.

What I need is to set the width of col(0) to 60 and the rest of the columns to 80.

Furthermore it should be possible to resize the cols by user but resizing is not working at all and the setting to have different colwidths for column 0 and the rest can be at 80 is not working.

I face all the time problems. I have tried everything with mincolwidth with defaults and so on with different results.

I put code before the loops (below) after and in between. 

Can you help?

Thank you and best regards



dim nCols as Integer = 32
dim nRows as Integer = 128

lst_data1.ColumnCount = nCols + 1



lst_data1.EditDelay = -1

for c as Integer = 1 to lst_data1.ColumnCount - 1

lst_data1.Heading(c) = "C" + c.ToText


lst_data1.Column(c).TextWrapMode = 0

lst_data1.Column(c).Alignment = 3

lst_data1.column(c).HeadingAlignment = 2

next c


dim v() as String
v.AddRow ""
for r as Integer = 1 to nRows
v.AddRow r.ToText
next r
call lst_data1.AddRows(v())

lst_data1.RowBackgroundColor(0) = &c696969
lst_data1.RowTextColor(0) = &cffffff

lst_data1.HeadingTextColor = &cffffff
lst_data1.HeadingBGColor = &c696969

lst_data1.column(0).BGColor = &c696969
lst_data1.column(0).TextColor = &cffffff