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

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

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

#1 Post by digitsoft »

Hello Roger
using DCADDCELLITEM how can I know the width of the column in DCBROWSE
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

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

#2 Post 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]
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

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

#3 Post by digitsoft »

I am using this code
oColumn := oBrowse:GetColumn(1)
nCellWidth := oColumn:dataArea:currentSize()[1]

and it generates this error
Attachments
error.jpg
error.jpg (70.57 KiB) Viewed 2267 times
Nolberto Paulino
Regards

Maxz
Posts: 49
Joined: Sun Jan 09, 2022 12:11 pm

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

#4 Post by Maxz »

should be:

oColumn := oBrowse:GetColumn( n )

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

Post Reply