How to programmatically change a TCBrowse column's width?

Post Reply
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

How to programmatically change a TCBrowse column's width?

Post by hua »

I tried using

Code: Select all

oBrw:aColumns[1]:nWidth := 1
oBrw:refresh()
but that doesn't seem to work.

TIA
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: How to programmatically change a TCBrowse column's width?

Post by MarcoBoschi »

I'm also interested
Marco Boschi
info@marcoboschi.it
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: How to programmatically change a TCBrowse column's width?

Post by James Bott »

Did you try:

DEFINE COLUMN...WIDTH nWidth...[ PIXELS ]

// general data columns
#command DEFINE COLUMN <oCol> ;
[ <dat: DATA, SHOWBLOCK> <uData> ] ;
[ <tit: TITLE, HEADER> <cHead> [ <oem: OEM, ANSI, CONVERT>] ];
[ <clr: COLORS, COLOURS> <uClrFore> [,<uClrBack>] ] ;
[ ALIGN ] [ <al: LEFT, CENTERED, RIGHT> ] ;
[ <wid: WIDTH, SIZE> <nWidth> [ PIXELS ] ] ;
[ <pict: PICT, PICTURE> <cPicture> ] ;
[ <bit: BITMAP> ] ;
[ <edit: EDITABLE> ] ;
[ MESSAGE <cMsg> ] ;
[ VALID <uValid> ] ;
[ ERROR [MSG] [MESSAGE] <cErr> ] ;
[ <lite: NOBAR, NOHILITE> ] ;
[ <idx: ORDER, INDEX, TAG> <cOrder> ] ;
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

Re: How to programmatically change a TCBrowse column's width?

Post by hua »

I'm trying to change the widths after the TCBrowse is already displayed James. Specifying the widths prior to that is not a problem
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: How to programmatically change a TCBrowse column's width?

Post by Enrico Maria Giordano »

hua wrote:I tried using

Code: Select all

oBrw:aColumns[1]:nWidth := 1
oBrw:refresh()
but that doesn't seem to work.

TIA
Try

Code: Select all

oBrw:aColumns[1]:nWidth := 1
oBrw:Default()
oBrw:refresh()
EMG
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

Re: How to programmatically change a TCBrowse column's width?

Post by hua »

Enrico,
Enrico Maria Giordano wrote: Try

Code: Select all

oBrw:aColumns[1]:nWidth := 1
oBrw:Default()
oBrw:refresh()
That works! Thank you!
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
Post Reply