Page 1 of 1

using DCADDCELLITEM how can I know the width of the column in DCBROWSE

Posted: Wed Apr 06, 2022 6:59 am
by digitsoft
Hello Roger
using DCADDCELLITEM how can I know the width of the column in DCBROWSE

Re: using DCADDCELLITEM how can I know the width of the column in DCBROWSE

Posted: Wed Apr 06, 2022 7:11 am
by rdonnay
Users can change the width of a column, so I'm not sure that this can help you, but you would get the width as follows:

nWidth := oColumn:dataArea:currentSize()[1]

Re: using DCADDCELLITEM how can I know the width of the column in DCBROWSE

Posted: Wed Apr 06, 2022 7:24 am
by digitsoft
I am using this code
oColumn := oBrowse:GetColumn(1)
nCellWidth := oColumn:dataArea:currentSize()[1]

and it generates this error

Re: using DCADDCELLITEM how can I know the width of the column in DCBROWSE

Posted: Wed Apr 06, 2022 10:53 am
by Maxz
should be:

oColumn := oBrowse:GetColumn( n )

nCellWidth := oColumn:currentSize()[1] // width of the column n