How to programmatically change a TCBrowse column's width?

How to programmatically change a TCBrowse column's width?

Postby hua » Wed Aug 29, 2018 5:21 am

I tried using
Code: Select all  Expand view

oBrw:aColumns[1]:nWidth := 1
oBrw:refresh()


but that doesn't seem to work.

TIA
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

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

Postby MarcoBoschi » Wed Aug 29, 2018 9:28 am

I'm also interested
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

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

Postby James Bott » Sat Sep 08, 2018 12:09 am

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

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

Postby hua » Sat Sep 08, 2018 5:52 am

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.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

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

Postby Enrico Maria Giordano » Sat Sep 08, 2018 7:46 am

hua wrote:I tried using
Code: Select all  Expand view

oBrw:aColumns[1]:nWidth := 1
oBrw:refresh()


but that doesn't seem to work.

TIA


Try

Code: Select all  Expand view
oBrw:aColumns[1]:nWidth := 1
oBrw:Default()
oBrw:refresh()


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

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

Postby hua » Wed Sep 12, 2018 2:52 am

Enrico,

Enrico Maria Giordano wrote:Try

Code: Select all  Expand view
oBrw:aColumns[1]:nWidth := 1
oBrw:Default()
oBrw:refresh()


That works! Thank you!
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests